简体   繁体   English

NSIS:如何在安装过程中手动提取文件

[英]NSIS: How to manually extract files during installation

I have a rather large project whose Installer is written using NSIS. 我有一个相当大的项目,其安装程序是使用NSIS编写的。
My problem is, that I cannot simply add all files to the installer file, because it will exceed the 2GB limit. 我的问题是,我不能简单地将所有文件添加到安装程序文件中,因为它将超过2GB的限制。
I also cannot leave my large files in a flat structure on the dvd and just copy them using the CopyFiles command, because the total size of the directory structure will exceed 4.7GB. 我也不能将大型文件放在DVD上的平面结构中,而只能使用CopyFiles命令复制它们,因为目录结构的总大小将超过4.7GB。

So what I want to do now is to have my big files in a flat but compressed structure on the dvd and manually extract them to the install directory during installation. 因此,我现在要做的是将大文件放在DVD上平坦但压缩的结构中,并在安装过程中将其手动解压缩到安装目录中。 The structure on the dvd would look like this: dvd上的结构如下所示:

/ 
+--+ data
|  +-- <compressed files>
+--setup.exe

Are there any convenient ways of doing this? 有什么方便的方法吗?

Thanks a lot in advance for any ideas. 提前非常感谢您的任何想法。

  • There are several NSIS plugins that can extract from external archives: ZipDLL , NsUnzip , ExtractDLLEx , ExtractDLL , CABSetup or UnTGZ 有几个NSIS插件可以从外部档案中提取: ZipDLLNsUnzipExtractDLLExExtractDLLCABSetupUnTGZ
  • You could execute a external tool like UnRAR.exe or 7z.exe 您可以执行外部工具,例如UnRAR.exe或7z.exe
  • You could create some mini NSIS installers that you execute (Run with /D to set $instdir for sub-installers, you probably want to use /S /D=$instdir ) 您可以创建一些要执行的小型NSIS安装程序(使用/ D运行以为子安装程序设置$ instdir,您可能想使用/S /D=$instdir

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM