简体   繁体   中英

Install a specific dependency using NSIS zip folder

So my project is python-based, and I have already created the .exe file for it using pyinstaller .

Now I have a folder containing,

  • main.exe file
  • README.txt

I am able to make a single executable file, that will install the dependencies related to main.exe, using NSIS . But for my project to run properly, I need to install another software called GhostScript .

I was wondering if there is a way to do so in NSIS itself. Like when it installs the dependencies it automatically installs GhostScript too.

NOTE: It's for a Windows app

Ghostscriptalso uses NSIS so it supports the same silent install switch as other NSIS installers.

InstallDir "$ProgramFiles\MyApp"
RequestExecutionLevel Admin

Page Components
Page Directory
Page InstFiles

!include LogicLib.nsh

Section "Ghostscript"
InitPluginsDir
File "/oname=$pluginsdir\gsinst.exe" "gs9540w32.exe"
ExecWait '"$pluginsdir\gsinst.exe" /S' $0
${If} $0 <> 0
  MessageBox mb_iconstop "Unable to install Ghostscript!"
  Abort
${EndIf}
SectionEnd

Section
SetOutPath $InstDir
File main.exe
File Readme.txt
SectionEnd

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