more improvements for the NSIS installer

This commit is contained in:
Araq 2014-10-17 18:18:46 +02:00
commit 56f1f3d4bc
2 changed files with 11 additions and 4 deletions

View file

@ -123,9 +123,10 @@ Files: "koch.exe"
Files: "start.bat" Files: "start.bat"
BinPath: r"bin;dist\mingw\bin;dist" BinPath: r"bin;dist\mingw\bin;dist"
; Section | dir | zipFile | size hint (in KB) | url ; Section | dir | zipFile | size hint (in KB) | url | exe start menu entry
Download: r"Documentation|doc|docs.zip|13824|http://nim-lang.org/download/docs-${version}.zip" Download: r"Documentation|doc|docs.zip|13824|http://nim-lang.org/download/docs-${version}.zip"
Download: r"C compiler (mingw)|dist|mingw.zip|82944|http://nim-lang.org/download/${mingw}.zip" Download: r"C compiler (mingw)|dist|mingw.zip|82944|http://nim-lang.org/download/${mingw}.zip"
Download: r"Aporia IDE|dist|aporia.zip|97997|http://nim-lang.org/download/aporia-0.1.3.zip|aporia\bin\aporia.exe"
; for now only NSIS supports optional downloads ; for now only NSIS supports optional downloads
[UnixBin] [UnixBin]

View file

@ -94,8 +94,8 @@ SectionEnd
#for download in c.downloads: #for download in c.downloads:
# inc i # inc i
# let d = download.split('|') # let d = download.split('|')
# if d.len != 5: # if d.len != 5 and d.len != 6:
# quit("download string needs 5 parts: " & download) # quit("download string needs 5..6 parts: " & download)
# end if # end if
# let sectionName = d[0] # let sectionName = d[0]
# let dir = d[1] # let dir = d[1]
@ -115,6 +115,12 @@ SectionEnd
MessageBox mb_iconstop "Error: $0" ;Show cancel/error message MessageBox mb_iconstop "Error: $0" ;Show cancel/error message
${EndIf} ${EndIf}
# if d.len >= 6:
# let startMenuEntry = d[5]
# let e = splitFile(startMenuEntry).name.capitalize
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\?{e}.lnk" "$INSTDIR\?dir\?{startMenuEntry.toWin}"
# end if
; Shortcuts ; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
!insertmacro MUI_STARTMENU_WRITE_END !insertmacro MUI_STARTMENU_WRITE_END
@ -149,8 +155,8 @@ FunctionEnd
Function un.onInit Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Remove $(^Name) from your computer." IDYES +2 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Remove $(^Name) from your computer." IDYES +2
!insertmacro MULTIUSER_UNINIT
Abort Abort
!insertmacro MULTIUSER_UNINIT
FunctionEnd FunctionEnd
Section Uninstall Section Uninstall