NSIS - put EXE version into name of installer

前端 未结 7 778
臣服心动
臣服心动 2020-12-24 03:04

NSIS has a Name variable that you define in the script:

Name \"MyApp\"

It defines the name of the installer, that gets displayed as the win

7条回答
  •  一个人的身影
    2020-12-24 03:48

    You can achieve this using MSBuild.

    1. Just add your .nsi script to project and set this file property Copy to Output Directory value Copy always or Copy if newer.

    2. Add to your project file (e.g. .csproj or .vbproj) following code (suppose your nsi script has name installer.nsi)

      
        
        
          
        
        
        
          
          
        
      
      
    3. Use $Version variable in your nsi script:

      # define installer name
      OutFile "MyApp-${Version}.exe"
      

提交回复
热议问题