Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 18th April 2009, 04:54   #1
Panarchy
Member
 
Join Date: Nov 2008
Posts: 72
Question 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
Here is my [incomplete] idea on the best style of writing this;

code:

!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
Panarchy is offline   Reply With Quote
Old 9th May 2009, 06:38   #2
Panarchy
Member
 
Join Date: Nov 2008
Posts: 72
Not to worry, found wxDev-C++, it's missing a few features, well not exactly missing, but replaced with wxWidgets equivalents, however it is still updated... so yeah.



And not just MinGW (and wxWidgets) but it also has new icons!

Panarchy

Panarchy is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump