Best Way to rewrite the Dev-C++ installer?
Hello
I am trying to make a new Dev-C++ package. The first new feature included will be updated MinGW. After that, other features can be added, but first I want to get everything working properly.
So here's what needs to be done;
- Install the program to the Program Files directory (user interaction here, so can change if wanted).
Install MinGW Libraries (this option can be deselected
Create file associations
Create uninstaller
!include MUI2.nsh
!define PRODUCT_NAME "Dev-C++"
!define PRODUCT_VERSION "5"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE license.txt
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE English
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Dev-C++" "DisplayName" "${DISPLAY_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Dev-C++" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Dev-C++" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Dev-C++" "NoRepair" 1
WriteUninstaller "$INSTDIR\uninstall.exe"
SubSectionEnd
BrandingText `Installer created by Chip D. Panarchy`
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "UNDEFINED"
SetOutPath "$SYSDIR"
SetOutPath "$SMPROGRAMS\Dev-C++\"
CreateShortCut "$SMPROGRAMS\Dev-C++\Dev-C++.lnk" \
"$PROGRAMFILES\Dev-C++\UNDEFINED"
SectionEnd
How is it so far?
Also, File "UNDEFINED"... does that mean it will install all files from the directory I run the script?
Please tell me the best way to rewrite the .nsi script.
Thanks in advance,
Panarchy
PS: Instead of using the original .nsi included with Dev-C++ (source) I think it best to rewrite it. As it currently seems more complicated then it should be.
Here is the original .nsi: pastebin.com/f6a705da9