Skip to content
Browse files

installer: BIG CHANGE: Moved the wixel-sdk to its own sub-installer.

  • Loading branch information...
1 parent a68b383 commit d161e315e9b06efe6030aaa3af0687f62a290373 @DavidEGrayson DavidEGrayson committed
Showing with 59 additions and 62 deletions.
  1. +17 −58 installer/dev_bundle.nsi
  2. +38 −0 installer/sdk.nsi
  3. +4 −4 installer/utils.nsi
View
75 installer/dev_bundle.nsi
@@ -1,18 +1,16 @@
# wixel_tools_mui.nsi - installer script for the wixel development bundle
-!define BUNDLE_VER "120126"
+!define BUNDLE_VER "120127"
+!define SDK_VER "120127"
!define SDCC_VER "3.1.0"
-!define NPP_VER "5.9.8"
!define UTILS_VER "120126"
+!define NPP_VER "5.9.8"
!define STARTDIR ".\build"
OutFile ".\build\wixel_dev_bundle_${BUNDLE_VER}.exe"
-# TODO: improve the user experience in the case where they choose to not install the Wixel SDK
-
!include FileFunc.nsh
!include EnvVarUpdate.nsh
-#Modern UI for fun and profit
!include MUI.nsh
SetCompressor /solid lzma
@@ -23,23 +21,11 @@ RequestExecutionLevel admin
!define MUI_HEADERIMAGE_BITMAP "${STARTDIR}\wixel-sdk\installer\wixel_fullname_sm.bmp"
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
!define MUI_FINISHPAGE_NOAUTOCLOSE
-!define MUI_UNFINISHPAGE_NOAUTOCLOSE
-
-!define MUI_FINISHPAGE_RUN_TEXT "Show the installed wixel-sdk files"
-!define MUI_FINISHPAGE_RUN_FUNCTION "ShowSDKFiles"
-
-!define MUI_FINISHPAGE_RUN
-
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
-!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
-!insertmacro MUI_UNPAGE_WELCOME
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-!insertmacro MUI_UNPAGE_FINISH
InstallDir "C:\wixel-sdk"
Name "The Pololu Wixel Development Bundle"
@@ -55,16 +41,24 @@ LangString DESC_NPP ${LANG_ENGLISH} "Notepad++ is a free source code editor whic
Section "Wixel SDK" SDK
DetailPrint "Installing wixel-sdk..."
- Call SDKexists
- SetOutPath "$INSTDIR"
- File /r "${STARTDIR}\wixel-sdk\"
+ SetOutPath "$TEMP"
+ File "${STARTDIR}\pololu-wixel-sdk-${SDK_VER}.exe"
+ ExecWait "$TEMP\pololu-wixel-sdk-${SDK_VER}.exe"
+SectionEnd
+
+Section "Pololu GNU Build Utilities" UTILS
+ DetailPrint "Installing Pololu GNU Build Utilities..."
+ SetOutPath "$TEMP"
+ File "${STARTDIR}\pololu-gnu-build-utils-${UTILS_VER}.exe"
+ #MessageBox MB_OK "The Wixel Dev Bundle will now launch the installer for the Pololu GNU Build Utilities"
+ ExecWait "$TEMP\pololu-gnu-build-utils-${UTILS_VER}.exe"
SectionEnd
Section "SDCC ${SDCC_VER}" SDCC
DetailPrint "Installing SDCC..."
SetOutPath "$TEMP"
File "${STARTDIR}\sdcc-${SDCC_VER}-setup.exe"
- MessageBox MB_OK "The Wixel Dev Bundle will now launch the installer for SDCC ${SDCC_VER} - the small device C compiler"
+ MessageBox MB_OK "The Wixel Development Bundle will now launch the installer for SDCC ${SDCC_VER}."
ExecWait "$TEMP\sdcc-${SDCC_VER}-setup.exe"
DetailPrint "Making sure that SDCC's path is set properly..."
ReadRegStr $9 HKLM "Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" 'InstallLocation'
@@ -72,52 +66,17 @@ Section "SDCC ${SDCC_VER}" SDCC
${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$9\bin"
SectionEnd
-Section "Pololu GNU Build Utilities" UTILS
- SetOutPath "$TEMP"
- File "${STARTDIR}\pololu_gnu_build_utils_${UTILS_VER}.exe"
- DetailPrint "Installing Pololu GNU Build Utilities..."
- MessageBox MB_OK "The Wixel Dev Bundle will now launch the installer for the Pololu GNU Build Utilities"
- ExecWait "$TEMP\pololu_gnu_build_tools_${UTILS_VER}.exe"
-SectionEnd
-
Section "Notepad++ Text Editor" NPP
SetOutPath "$TEMP"
DetailPrint "Installing Notepad++..."
File "${STARTDIR}\npp.${NPP_VER}.Installer.exe"
- MessageBox MB_OK "The Wixel Dev Bundle will now launch the installer for Notepad++"
+ MessageBox MB_OK "The Wixel Development Bundle will now launch the installer for Notepad++."
ExecWait "$TEMP\npp.${NPP_VER}.Installer.exe"
SectionEnd
-; Section "Uninstall"
-
- ; DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_wixel_sdk"
-
-; SectionEnd
-
-
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SDK} $(DESC_SDK)
!insertmacro MUI_DESCRIPTION_TEXT ${SDCC} $(DESC_SDCC)
!insertmacro MUI_DESCRIPTION_TEXT ${UTILS} $(DESC_UTILS)
!insertmacro MUI_DESCRIPTION_TEXT ${NPP} $(DESC_NPP)
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-
-Function SDKexists
- ${if} ${FileExists} $INSTDIR
- MessageBox MB_OK "The Wixel Dev Bundle installer has detected a previously-installed version of the Wixel SDK files in $INSTDIR. To avoid conflicts, the new files will be installed to the backup location: $INSTDIR-${BUNDLE_VER}."
- StrCpy $INSTDIR "$INSTDIR-${BUNDLE_VER}"
- ${andif} ${FileExists} $INSTDIR
- ${GetTime} "" "LS" $0 $1 $2 $3 $4 $5 $6
- MessageBox MB_OK "The Wixel Dev Bundle installer has detected a previously-installed version of the Wixel-SDK files in the backup location $INSTDIR. To avoid conflicts, we will now install to $INSTDIR-$2$1$0$4$5$6"
- StrCpy $INSTDIR "$INSTDIR-$2$1$0$4$5$6"
- ${EndIF}
-FunctionEnd
-
-Function ShowSDKFiles
- ExecShell "open" "$INSTDIR"
-FunctionEnd
-
-; Function .oninit
-
-; FunctionEnd
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
View
38 installer/sdk.nsi
@@ -0,0 +1,38 @@
+# sdk.nsi - sub-installer script for the Wixel SDK itself
+
+!define SDK_VER "120127"
+
+!define STARTDIR ".\build\wixel-sdk\"
+OutFile ".\build\pololu-wixel-sdk-${SDK_VER}.exe"
+
+!include LogicLib.nsh
+!include FileFunc.nsh
+
+SetCompressor /solid lzma
+RequestExecutionLevel admin
+InstallDir "C:\wixel-sdk\"
+Name "Wixel SDK"
+ShowInstDetails show
+ShowUninstDetails show
+AllowSkipFiles on
+Page directory
+Page instfiles
+
+Section "Main"
+ Call SDKExists
+ SetOutPath $INSTDIR
+ File /r "${STARTDIR}"
+SectionEnd
+
+Function SDKExists
+ ${if} ${FileExists} $INSTDIR
+ StrCpy $8 "$INSTDIR"
+ StrCpy $INSTDIR "$INSTDIR-${SDK_VER}"
+ MessageBox MB_OK "The installation folder $8 already exists. To avoid conflicts, the new Wixel SDK files will be installed to: $INSTDIR"
+ ${andif} ${FileExists} $INSTDIR
+ ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6
+ StrCpy $8 "$INSTDIR"
+ StrCpy $INSTDIR "$INSTDIR-$2$1$0$4$5$6"
+ MessageBox MB_OK "The installation folder $8 already exists. To avoid conflicts, the new Wixel SDK files will be installed to: $INSTDIR"
+ ${EndIF}
+FunctionEnd
View
8 installer/utils.nsi
@@ -1,10 +1,10 @@
# build_tools.nsi - sub-installer script for the pololu GNU build utils
# designed to be run from within a larger installer
-!define TOOLSVER "120126"
+!define UTILS_VER "120126"
-!define STARTDIR ".\build\pololu_gnu_build_utils_${TOOLSVER}"
-OutFile ".\build\pololu_gnu_build_utils_${TOOLSVER}.exe"
+!define STARTDIR ".\build\pololu-gnu-build-utils-${UTILS_VER}"
+OutFile ".\build\pololu-gnu-build-utils-${UTILS_VER}.exe"
!include EnvVarUpdate.nsh
@@ -27,7 +27,7 @@ Section "Main"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_build_utilities" "DisplayName" "Pololu GNU Build Utilities"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_build_utilities" "UninstallString" "$\"$INSTDIR\Uninstall Pololu GNU Build Utilities.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_build_utilities" "Publisher" "Pololu"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_build_utilities" "DisplayVersion" "${TOOLSVER}"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_build_utilities" "DisplayVersion" "${UTILS_VER}"
WriteUninstaller "$INSTDIR\Uninstall Pololu GNU Build Utilities.exe"
${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR"
SectionEnd

0 comments on commit d161e31

Please sign in to comment.
Something went wrong with that request. Please try again.