Template to make a custom MS Windows installer with uninstaller and start menu shortcuts for your own OF_App's using NSIS from Nullsoft.
- Installation Process:
-
Download and install NSIS .
-
Clone this repo somewhere and copy the folder into your OF_APP/bin/ project(s).
-
Check that this folder contains:
- The (copied / renamed) OF_App.exe.
- All the required OF .dll's.
- Your /data/ folder.
-
Look into OF_Windows_Installer/resources/ folders to replace your images, start and finish banners, and icon as desired.
-
Customize the SCRIPT_OF_APP.nsi script:
- Set your .exe app name, app title, and developer name.
- Enable or disable pages.
- Slideshow intro with faded BMP images. Start / Finish image splashes.
- Sound playing during splash intro.
- Your license file.
- Set data files to copy.
- Finish page links.
-
Double click SCRIPT_DEPLOY.bat. This script has two steps:
- Set the icon to your .exe file. (Using rcedit-x64.exe)
- Run the SCRIPT_OF_APP.nsi script with NSIS.
-
Your installer OF_App_Setup.exe will be created there, next to the .bat / .nsi scripts.
- (Optional) Run the pre-made installer \OF_Windows_Installer\example\bin\SCRIPT\guiExample_Setup.exe.
- Delete guiExample_Setup.exe to deploy the installer by your self:
- Double click SCRIPT_DEPLOY.bat using Windows Explorer:
\OF_Windows_Installer\example\bin\SCRIPT\SCRIPT_DEPLOY.bat - Run the generated \OF_Windows_Installer\example\bin\SCRIPT\guiExample_Setup.exe and install the app into your system.
- That's it!
- Required to run the script: NSIS
- Required to run an OF_App in other machines:
Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019
( Usually x64: vc_redist.x64.exe )
- Windows10 / VS2017 / OF ~0.11
OF-Forum topic from @stubbulon5
NSIS Modern UI Scripts
Modern UI README
NSIS Wiki
NSIS GitHub
PNG to ICO Converter
Environtment constants
- To hide the black console window of your OF_App, you can add this line to the file main.cpp, before and out of main(){ } function:
#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
Template by @moebiusSurfing
(ManuMolina). 2021.
MIT License.