more improvements for the NSIS installer

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

View File

@@ -123,9 +123,10 @@ Files: "koch.exe"
Files: "start.bat"
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"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
[UnixBin]

View File

@@ -94,8 +94,8 @@ SectionEnd
#for download in c.downloads:
# inc i
# let d = download.split('|')
# if d.len != 5:
# quit("download string needs 5 parts: " & download)
# if d.len != 5 and d.len != 6:
# quit("download string needs 5..6 parts: " & download)
# end if
# let sectionName = d[0]
# let dir = d[1]
@@ -115,6 +115,12 @@ SectionEnd
MessageBox mb_iconstop "Error: $0" ;Show cancel/error message
${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
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
!insertmacro MUI_STARTMENU_WRITE_END
@@ -149,8 +155,8 @@ FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Remove $(^Name) from your computer." IDYES +2
!insertmacro MULTIUSER_UNINIT
Abort
!insertmacro MULTIUSER_UNINIT
FunctionEnd
Section Uninstall