为什么不是所有应用程序都可移植?

It’s a question that nags at anyone who has fallen in love with portable apps: why aren’t all applications portable?

这是一个迷上便携式应用程序的人所困扰的问题:为什么所有应用程序都不都是便携式的?

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-drive grouping of Q&A web sites.

今天的问答环节由SuperUser提供,它是Stack Exchange的一个分支,它是Q&A网站的社区推动组织。

问题 (The Question)

SuperUser reader Tom loves the clean organization portable apps provide and wants to know why everything isn’t portable:

超级用户阅读器汤姆(Tom)喜欢便携式应用程序提供的简洁组织,并想知道为什么所有内容都不便携式:

I’ve recently been trying to ‘install’ stuff a lot less on my Windows machine (I hate installers – I need to know where programs put stuff…), choosing to use portable or standalone versions of applications instead.

最近,我一直在尝试在Windows机器上少安装一些东西(我讨厌安装程序–我需要知道程序在哪里放置东西……),而是选择使用便携式或独立版本的应用程序。

I put them all in a ‘Programs’ dir on a drive separate from my Windows partition, so whenever I reinstall, I have all my applications available with minimal effort and on the plus side, I get a nice clean setup.

我将它们全部放置在与Windows分区分开的驱动器上的“程序”目录中,因此,每当我重新安装时,我都可以以最小的努力获得所有应用程序,从好的方面来说,我得到了一个不错的整洁的安装程序。

Applications like Office and Creative Suite still require me to go through a horribly long installation process where a thousand random libraries and tools are thrown across my system.

Office和Creative Suite之类的应用程序仍然需要我经历极其漫长的安装过程,在该过程中,我的系统中抛出了成千上万个随机库和工具。

Why do Windows apps still need installing? Why can’t we just drag Photoshop to a folder à la OSX and just have it work? Does anyone else focus on portable apps, or am I just being OCD about the whole thing?

为什么Windows应用仍需要安装? 为什么我们不能仅将Photoshop拖到OSX文件夹中并使其正常工作? 是否还有其他人专注于便携式应用程序,还是我只是整个过程的强迫症?

We’re certainly fans of portable apps and would also like to get to the bottom of things.

我们当然是便携式应用程序的爱好者,并且也想深入了解。

答案 (The Answer)

SuperUser contributor David Whitney offers some insight into why many apps aren’t portable and how Windows enforces a sort of anti-portability arrangement:

超级用户贡献者David Whitney深入了解了为什么许多应用程序不可移植以及Windows如何实施某种反可移植性安排:

Installers are a result of years of evolution and a little bit of (simplified) history helps understand why they do what they do..

安装程序是多年发展的结果,并且有一点(简化的)历史可以帮助您理解为什么要执行自己的工作。

The Windows 3.1 model suggested config.ini style configuration files per application with supporting shared libaries going into system folders to prevent duplication and wasted disk space.

Windows 3.1模型建议每个应用程序使用config.ini样式的配置文件,并支持将共享库放入系统文件夹中,以防止重复和浪费磁盘空间。

Windows 95 introduced the registry allowing a central store for application configuration replacing many configuration files. More importantly, windows configuration was stored in the same place.

Windows 95引入了注册表,该注册表允许一个用于存储应用程序配置的中央存储来替换许多配置文件。 更重要的是,Windows配置存储在同一位置。

The registry became bloated due to applications not cleaning up after themselves. DLL hell happened as a result of multiple versions of the same shared libraries overwriting each other.

由于应用程序自身未清除,注册表变得肿。 DLL地狱是由于相同共享库的多个版本相互覆盖而导致的。

.NET introduced the concept of app.config (almost ini files mark 2, this time with a little more structure saving developers wasting time writing manual parsers). The GAC was introduced to version shared assemblies in an attempt to prevent DLL Hell.

.NET引入了app.config的概念(这次几乎将ini文件标记为2,这次有了更多的结构,节省了开发人员在编写手动解析器上的时间)。 GAC引入了版本共享程序集,以防止DLL地狱。

In Windows XP and moreso in Vista, Microsoft attempted to define the userspace as a place to store user data and configuration files in a single standard location to allow for roamning profiles and easy migration (just copy your profile) with the applications installed in Program Files.

在Windows XP中以及在Vista中,Microsoft尝试将用户空间定义为在单个标准位置存储用户数据和配置文件的位置,以允许漫游配置文件并使用程序文件中安装的应用程序轻松迁移(只需复制您的配置文件) 。

So I guess, the reason is that “applications in Windows are designed to live in one place, their shared dependencies in another, and the user specific data in another”, which pretty much works against the concept of xcopying a single location.

所以我想,原因是“ Windows中的应用程序被设计为位于一个位置,共享的依赖项位于另一个位置,而用户特定的数据位于另一个位置”,这与xcopy复制单个位置的概念大相径庭。

.. and that’s before you have to configure user accounts, and setup and ensure security permissions, and download updates, and install windows services…

..那是您必须配置用户帐户,设置和确保安全权限,下载更新并安装Windows服务之前的步骤。

xcopy is the “simple case” and certainly isn’t a best fit for everything.

xcopy是“简单的案例”,当然不是最适合所有情况。

Unfortunately for fans of all things portable, many apps–especially large apps like Office–will remain firmly fixed to and distributed across the operating system.

不幸的是,对于所有便携式产品的爱好者来说,许多应用程序(尤其是Office之类的大型应用程序)将始终牢牢地固定在操作系统中并分布在整个操作系统中。



Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不对。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/127819/why-arent-all-applications-portable/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值