如何为 Windows 应用程序制作一个简单的基于 Wine 的安装程序
我的Windows应用程序在Wine下运行,但是安装对于外行来说有点头疼,而且我在网上看到的包装器(PlayOnLinux、Wine Doors)甚至需要安装更多的软件包。 有没有办法制作一个包,如果用户需要安装 Wine,安装应用程序和快捷方式,所有这些都可以最小化用户的麻烦?
My Windows application runs under Wine, but the installation is a bit of a headache for laymen, and the wrappers I've seen online (PlayOnLinux, Wine Doors) require even more packages to be installed. Is there a way to make a package that will install Wine if the user needs it to be installed, install the application and shortcuts, all with minimal user hassle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我不相信有任何预制的方法可以做到这一点,但您可能可以很容易地制作一个依赖于 Wine 的 Debian 软件包,将 MSI 复制到机器上,然后运行 Wine 的
msiexec /i /q< /code> 作为安装后脚本
编辑:请务必考虑卸载情况! 即在预卸载脚本中,再次运行
msiexec
。I don't believe there's any pre-made way to do this, but you could probably make a Debian package pretty easily that would depend on Wine, copy an MSI onto the machine, then run Wine's
msiexec /i /q
as the post-install scriptEdit: Make sure to think about the uninstall case too! I.e. in the pre-uninstall script, run
msiexec
again as well.您可以捆绑 Wine —— 这就是 Picasa 所做的 —— 或者您可以将您的包列表 Wine 作为依赖项; 那么当用户安装你的包时,用户的包管理器将自动为用户安装 Wine。
理想情况下,您的 Linux 软件包不会运行 Windows 安装程序,而是已解压所有文件。
诀窍是安排您的软件包安装在 /usr 中的文件显示在每个用户的 .wine 目录中。 您可以看看 Picasa 如何做到这一点,但实际上 Wine 社区需要记录如何更好地做到这一点。
与往常一样,如果您需要更多信息,请访问 winehq.org。
You can bundle Wine -- that's what Picasa does -- or you can just make your package list Wine as a dependency; then the user's package manager will automatically install Wine for the user when they install your package.
Ideally your Linux package wouldn't run the Windows installer, but rather have all the files already unpacked.
The trick is to arrange for the files your package installs in /usr to show up in each user's .wine directory. You can look at how Picasa does this, but really the Wine community needs to document how to do this much better.
As always, ask at winehq.org if you need more info.
如果您想针对 Mac 操作系统,可以使用 WineBottler:
http://winebottler.kronenberg.org/
该项目的存在只是为了将 Wine 捆绑到本机 Mac .app 中以对用户相当隐藏的方式进行捆绑。
If you'd like to target the Mac OS, you can use WineBottler:
http://winebottler.kronenberg.org/
This project exists just for bundling Wine into a native Mac .app bundle in a way that's fairly hidden from the user.
答案很简单:
Answer is simple: