简体   繁体   English

使用Inno-Setup将特定任务的文件编译为其他安装文件(setup.exe,files.bin)?

[英]Compile files of specific task to an additional setup file (setup.exe, files.bin) using Inno-Setup?

INTRODUCTION 介绍

The author of a piracy gaming website with name FitGirl , releases from time to time "re-packs" of video games, that are composed by a installer made with Inno-setup. 盗版游戏网站的名称为FitGirl的作者不时发布视频游戏的“重新包装”,这些游戏由使用Inno-setup制作的安装程序组成。

The interesting characteristic of those kind of installers is that are component-based (or task-based, not sure), I mean that for example if a video game re-pack has audio files related to various languages, they are available to install separately, I mean that each "voice pack" is compiled in different files, so you can see: setup.exe, english.bin, spanish.bin, etc... and if one of the .bin files is missing, it does not affect the setup.exe. 这类安装程序的有趣特征是基于组件的(或不确定基于任务的),我的意思是,例如,如果视频游戏重新包装中包含与各种语言相关的音频文件,则可以单独安装它们,我的意思是每个“语音包”都编译在不同的文件中,因此您可以看到:setup.exe,english.bin,spanish.bin等...,如果缺少一个.bin文件,则不会影响setup.exe。

QUESTION

I would like to know how can I reproduce that in my personal installers. 我想知道如何在我的个人安装程序中复制它。 For example I have a program to install, with my personal config files to use for that program, then, I want to create a task to determine whether the personal settings should be installed with the program, and compile those files in another file, not inside the setup.exe. 例如,我有一个要安装的程序,其中包含要用于该程序的个人配置文件,然后,我想创建一个任务来确定是否应在程序中安装个人设置,然后将这些文件编译到另一个文件中,而不是在setup.exe中。 Just the same as the author of the website above does with the "voice packs" of a re-pack installer. 与上述网站的作者相同,使用重新打包安装程序的“语音包”。

As an example of what I would like to do: 作为我想做的事的一个例子:

[Files]
; Public Files
Source: {app}\*; DestDir: {app}; Flags: recursesubdirs createallsubdirs ignoreversion

; Personal files (program file settings that contains sensible data of my person)
Source: {localappdata}\*; DestDir: {localappdata}; Tasks: PersonalData; Flags: recursesubdirs createallsubdirs ignoreversion

[Tasks]
Name: PersonalData; Description: Install ElektroStudios E-mail settings

So, in that example, I would like the files of {localappdata} to be compiled to an additional file, like for example: "personal_settings.bin". 因此,在该示例中,我希望将{localappdata}的文件编译为其他文件,例如:“ personal_settings.bin”。 This way, I can distribute the installer (setup.exe) without distributing also my personal data (personal_settings.bin), and I can use the installer in my personal computer to install the files of {localappdata} having the "personal_settings.bin". 这样,我可以分发安装程序(setup.exe),而不必同时分发我的个人数据(personal_settings.bin),并且可以在我的个人计算机中使用该安装程序来安装具有“ personal_settings.bin”的{localappdata}文件。

RESEARCH 研究

After decompiling a FitGirl installer ( of Jurassic World: Evolution ), this is the most relevant parts of the reconstructed code I get: 在对FitGirl安装程序(《侏罗纪世界:进化》)进行反编译之后,这是我得到的重构代码中最相关的部分:

[Setup]
AppName=Jurassic World: Evolution
...

[Components]
Name: text; Description: Main game files; Types: full custom
Name: local; Description: Game language; Types: full custom
...

[Types]
Name: custom; Description: {cm:TypeCustomDesc}
Name: full; Description: {cm:TypeFullDesc}
...

But I feel like it is missing all... I don't get how is done this installer to have the voice packs compiled separately in .bin files additionaly to the setup.exe, and be all selectable in the setup wizard. 但是我感觉好像丢失了所有东西...我不知道如何完成此安装程序,以将语音包单独打包到setup.exe中的.bin文件中,并在安装向导中将其全部选中。

Inno Setup does not support this. Inno Setup不支持此功能。

So either: 所以:

  • That installer uses a custom build of Inno Setup; 该安装程序使用Inno Setup的自定义版本。 or 要么
  • They implemented their own unpacking in Pascal Script (and they pack the file separately using their own process, when building the installer). 他们在Pascal Script中实现了自己的解压缩(在构建安装程序时,他们使用自己的过程分别打包文件)。

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

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