简体   繁体   中英

How to add file to existing NSIS installer

I have an NSIS-generated installer and I need to create a new installer that is exactly the same, but has one extra file. What is the most direct way to do it? I would prefer if I didn't have to keep the NSIS scripts around. I have tried asking 7-Zip to simply add the file to the archive, but it says it does not support adding for this kind of archive.

I noticed this similar question , but the solution suggested there (to provide the files separately) is not an option, because the installer is for end users.

7zip can extract files from [certain] NSIS installers but it cannot insert new ones. NSIS has specific structure and it is sophisticated system not only simple archive.

If you have script for an old installer that simply add new file to it and recompile installer from sources. There is no other simple way to do it.

If you don't want to keep the .nsi you can store it in the installer instead

Section
goto +2
File "${__FILE__}"
SectionEnd

and just extract the .nsi with 7zip when you need to recompile...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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