在开始inno设置之前先解压缩数据文件 [英] unpack data files before starting inno setup

查看:167
本文介绍了在开始inno设置之前先解压缩数据文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个非常大的数据文件的应用程序.我的客户希望将这些数据文件与安装exe分开压缩,然后安装程序应在开始安装之前解压缩它们.用inno可能吗?我在Pascal上没有太多经验,所以将不胜感激.

I am working on an application which uses a very large size of data files. My client wants to zip those data files separately from the setup exe then the installer should unzip them before starting the installation. Is that possible by inno? I don't have much experience in Pascal so any help will be much appreciated.

推荐答案

没有内置的Pascal脚本支持解压缩

尽管Inno Setup内部具有许多解压缩例程以支持各种在编译过程中可以压缩文件的方式.这些都没有发布到Pascal脚本语言.

No built in Pascal scripting support for uncompression

Although Inno Setup internally has many uncompress routines to support the various ways it can compress the files during compiling. None of these are published to the Pascal Scripting language.

仍然可以执行此操作,但是您必须构建一个DLL才能执行解压缩步骤.然后在卸载时使用此DLL.

It is still possible to do this, but you must build a DLL to perform the unzipping step. Then use this DLL in your uninstall.

在Inno Setup脚本的[Files]中,您可以使用external标志来引用安装程序中未包含的文件.

In the [Files] of your Inno Setup script you can reference files that are not contained in your setup, by using the external flag.

[Files]
Source: "data1.dat" DestDir: "{app}" Flags: external;

这会将位于与Setup.exe相同目录中的data1.dat复制到应用程序安装目录.

This would copy data1.dat located in the same directory as your Setup.exe to your application installation directory.

为数据文件构建一个单独的Inno安装脚本.将此脚本提供给您的客户端,以便他们可以使用编译器而不是Zip程序来运行它.

Build a separate Inno Setup Script for the Data Files. Give this script to your clients so they can run this using the Compiler, instead of a Zip program.

它将压缩数据,就像ZIP一样,尽管默认值为lzma2/max.然后可以通过[Run]部分链接此安装,以在安装应用程序之后直接进行安装.

It will compress the data like ZIP would, although the default is lzma2/max. This install could then be chained through the [Run] section to install directly after the application was installed.

根据您的评论,我会更好地理解您的问题.

Based on your comment I understand your problem a bit better.

您可以将所有MP3文件构建到单个安装设置中.您可以使用[Components]部分对MP3文件进行分组.这使用户可以选择他们要安装的文件组. [Files]部分支持通配符,因此您可以在一个目录中指定所有文件,以使脚本更易于维护.

You could build all the MP3 files into a single installation setup. You could group the MP3 files using the [Components] section. This allows the user to select which group of files they want to install. The [Files] Section supports wild cards so you can specify all the files in a single directory to make the script easier to maintain.

InnoSetup通过设置分解方法来处理大型安装. setup.exe转换为多个文件.

InnoSetup is built to handle large installations by setting up ways to break up the setup.exe into multiple files.

[Setup]
DiskSpanning=Yes
DiskSliceSize=XXX
SlicesPerDisk=XXX
SolidCompression=no (Default but it not recommended to be set 'YES' with Huge installs)

这篇关于在开始inno设置之前先解压缩数据文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆