Permalink
Browse files

Merge branch 'dev/david/new_installer'

  • Loading branch information...
2 parents b4f3ef3 + 6a357a4 commit 31f8584177d1cf8b38992b676238f938cb6a35bd @DavidEGrayson DavidEGrayson committed Jan 28, 2012
View
4 .gitignore
@@ -33,4 +33,6 @@ apps/*/*
/libraries/src/uart/uart0.c
/libraries/src/uart/uart1.c
/libraries/src/spi_master/spi0_master.c
-/libraries/src/spi_master/spi1_master.c
+/libraries/src/spi_master/spi1_master.c
+
+/installer/build/
View
15 installer/README.txt
@@ -14,21 +14,24 @@ First:
1. Install NSIS v2.46+, available from http://nsis.sourceforge.net.
You should add the NSIS installation directory to your path so you
can easily run makensis.
-2. Install the EnvVarUpdate plugin for NSIS, available from
+2. Install the "Large strings" build of NSIS on top of that so we
+ truncate user's paths to 8192 bytes instead of 1024.
+3. Install the EnvVarUpdate plugin for NSIS, available from
http://nsis.sourceforge.net/Environmental_Variables:_append,_prepend,_and_remove_entries
-3. Install Doxygen, available from http://www.stack.nl/~dimitri/doxygen/
-4. Update WIXELTOOLVERSION in wixel_tools_mui.nsi to today's date.
-5. Update TOOLSVER in build_tools.nsi if the Pololu GNU Build
+ EnvVarUpdate.nsh needs to be put in C:\Program Files (x86)\NSIS\include.
+4. Install Doxygen, available from http://www.stack.nl/~dimitri/doxygen/
+5. Update WIXELTOOLVERSION in wixel_tools_mui.nsi to today's date.
+6. Update TOOLSVER in build_tools.nsi if the Pololu GNU Build
Utilities have changed since last time.
Second, create a new folder named "bundle" and assemble the following
in that folder:
1. A folder named "build_tools" that contains the Pololu GNU Build
Utilities.
-2. The SDCC installer (e.g. "sdcc-3.0.0-setup.exe"). The version number
+2. The SDCC installer (renamed to "sdcc-VERSION-setup.exe"). The version number
is specified in the SDCCVER variable in wixel_tools_mui.nsh; update
that variable if needed.
-3. The Notepad++ installer (e.g. "npp.5.9.Installer.exe"). The version
+3. The Notepad++ installer (e.g. "npp.5.9.8.Installer.exe"). The version
number is specified in the NPVER variable in wixel_tools_mui.nsh;
update that variable if needed.
4. The Wixel SDK repository itself, in a folder named "wixel-sdk".
View
78 installer/dev_bundle.nsi
@@ -0,0 +1,78 @@
+# wixel_tools_mui.nsi - installer script for the wixel development bundle
+
+!define BUNDLE_VER "120127"
+!define SDK_VER "120127"
+!define SDCC_VER "3.1.0"
+!define UTILS_VER "120126"
+!define NPP_VER "5.9.8"
+
+!define STARTDIR ".\build"
+OutFile ".\build\wixel-dev-bundle-${BUNDLE_VER}.exe"
+
+!include FileFunc.nsh
+!include EnvVarUpdate.nsh
+!include MUI.nsh
+
+SetCompressor /solid lzma
+RequestExecutionLevel admin
+
+; !define STARTDIR=c:\foo\bar
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
+!define MUI_HEADERIMAGE_BITMAP ".\wixel_fullname_sm.bmp"
+!define MUI_FINISHPAGE_NOAUTOCLOSE
+
+!define MUI_COMPONENTSPAGE_SMALLDESC
+
+!insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_INSTFILES
+
+Name "Pololu Wixel Development Bundle"
+!insertmacro MUI_LANGUAGE "English"
+
+LangString DESC_SDK ${LANG_ENGLISH} "Libraries and example code for the Wixel."
+LangString DESC_SDCC ${LANG_ENGLISH} "Free C compiler that is used to compile the code in the Wixel SDK."
+LangString DESC_UTILS ${LANG_ENGLISH} "Open-source utilities required by the Wixel SDK: cat, cp, echo, grep, make, mv, rm, and sed."
+LangString DESC_NPP ${LANG_ENGLISH} "Free source code editor which is nice to use when editing Wixel code."
+
+Section "Wixel SDK ${SDK_VER}" SDK
+ DetailPrint "Installing 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_VER}" 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 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'
+ ReadRegStr $9 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" 'InstallLocation'
+ ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$9\bin"
+SectionEnd
+
+Section "Notepad++ v${NPP_VER}" NPP
+ SetOutPath "$TEMP"
+ DetailPrint "Installing Notepad++..."
+ File "${STARTDIR}\npp.${NPP_VER}.Installer.exe"
+ #MessageBox MB_OK "The Wixel Development Bundle will now launch the installer for Notepad++."
+ ExecWait "$TEMP\npp.${NPP_VER}.Installer.exe"
+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
View
11 installer/prepare_sdk.bat
@@ -0,0 +1,11 @@
+:: prepare_wixel_sdk_for_bundle.bat clones the Wixel SDK,
+:: and builds the docs so it can be put in to the Wixel
+:: Development Bundle.
+
+cd %~dp0/build
+call git clone -o pololu git://github.com/pololu/wixel-sdk.git
+cd wixel-sdk
+call git config core.autocrlf true
+pause
+make docs
+cd ..
View
41 installer/sdk.nsi
@@ -0,0 +1,41 @@
+# 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 ${SDK_VER}"
+ShowInstDetails show
+ShowUninstDetails show
+AllowSkipFiles on
+Page directory
+Page instfiles
+
+Section "Main"
+ Call SDKExists
+ SetOutPath $INSTDIR
+ File /r "${STARTDIR}"
+ DetailPrint "PLEASE NOTE: This is NOT the latest version of the Wixel SDK."
+ DetailPrint "For the latest version with all the latest apps and libraries,"
+ DetailPrint "go to: https://github.com/pololu/wixel-sdk"
+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
23 installer/build_tools.nsi → installer/utils.nsi
@@ -1,24 +1,17 @@
-####################
-#
# build_tools.nsi - sub-installer script for the pololu GNU build utils
# designed to be run from within a larger installer
-#
-####################
-# This installer expects to be passed the variable "STARTDIR" at the command line
-# The directory you point the installer at should directly contain the executables
-# E.g. "makensis /DSTARTDIR=c:\working\wixel-installer\gnu-build-tools c:\working\wixel-installer\build_tools.nsi"
+!define UTILS_VER "120126"
-!define TOOLSVER "110415"
-!include EnvVarUpdate.nsh
+!define STARTDIR ".\build\pololu-gnu-build-utils-${UTILS_VER}"
+OutFile ".\build\pololu-gnu-build-utils-${UTILS_VER}.exe"
-; !define STARTDIR "c:\foo\bar"
+!include EnvVarUpdate.nsh
SetCompressor /solid lzma
RequestExecutionLevel admin
-OutFile "..\..\pololu_gnu_build_tools.exe"
InstallDir "$PROGRAMFILES\Pololu\GNU Build Utilities\"
-Name "Pololu GNU Build Utilities"
+Name "Pololu GNU Build Utilities ${UTILS_VER}"
ShowInstDetails show
ShowUninstDetails show
AllowSkipFiles on
@@ -34,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
@@ -44,10 +37,10 @@ Section "Uninstall"
Delete "$INSTDIR\cp.exe"
Delete "$INSTDIR\echo.exe"
Delete "$INSTDIR\grep.exe"
- Delete "$INSTDIR\license.txt"
+ Delete "$INSTDIR\LICENSE.txt"
Delete "$INSTDIR\make.exe"
Delete "$INSTDIR\mv.exe"
- Delete "$INSTDIR\readme.txt"
+ Delete "$INSTDIR\README.txt"
Delete "$INSTDIR\rm.exe"
Delete "$INSTDIR\sed.exe"
Delete "$INSTDIR\Uninstall Pololu GNU Build Utilities.exe"
View
BIN installer/wixel_fullname_sm.bmp
Binary file not shown.
View
140 installer/wixel_tools_mui.nsi
@@ -1,140 +0,0 @@
-####################
-#
-# wixel_tools_mui.nsi - installer script for the wixel development bundle
-#
-####################
-
-# This installer expects to be passed the variable "STARTDIR" at the command line
-# E.g. "makensis /DSTARTDIR=c:\working\wixel-installer c:\working\wixel-installer\wixel_tools_mui.nsi"
-
-# 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
-RequestExecutionLevel admin
-
-; !define STARTDIR=c:\foo\bar
-!define WIXELTOOLVERSION "110415"
-!define SDCCVER "3.0.0"
-!define NPVER "5.9"
-!define MUI_HEADERIMAGE
-!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
-
-OutFile "..\..\wixel_dev_bundle_${WIXELTOOLVERSION}.exe"
-InstallDir "C:\wixel-sdk"
-Name "The Pololu Wixel Development Bundle"
-!insertmacro MUI_LANGUAGE "English"
-
-
-
-LangString DESC_SECTION1 ${LANG_ENGLISH} "The Wixel SDK contains source code (for libraries and applications) that will help you develop your own applications for the Wixel."
-LangString DESC_SECTION2 ${LANG_ENGLISH} "The Small Device C Compiler (SDCC) is a free compiler that is used to compile the code in the Wixel SDK."
-LangString DESC_SECTION3 ${LANG_ENGLISH} "The Pololu GNU Build Utilities are open-source utilities that are required by the Wixel SDK: cat, cp, echo, grep, make, mv, rm, and sed."
-LangString DESC_SECTION4 ${LANG_ENGLISH} "Notepad++ is a free source code editor which is convenient to use when editing Wixel code."
-
-
-
-
-Section "Source Code (wixel-sdk)" Section1
- ; SectionIn RO
- DetailPrint "Now installing the wixel-sdk files"
- Call SDKexists
- SetOutPath "$INSTDIR"
- File /r "${STARTDIR}\wixel-sdk\"
- Var /Global SDKLOC
- Strcpy $SDKLOC $INSTDIR
-
- ; DetailPrint "Now writing the uninstaller"
- ; WriteUninstaller "$INSTDIR\uninstall wixel-sdk.exe"
- ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_wixel_sdk" \"DisplayName" "Pololu wixel-sdk"
- ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_wixel_sdk" "UninstallString" "$\"$INSTDIR\uninstall wixel-sdk.exe$\""
- ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_wixel_sdk" "Publisher" "Pololu"
- ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pololu_wixel_sdk" "DisplayVersion" "${WIXELTOOLVERSION}"
-
-SectionEnd
-
-Section "SDCC ${SDCCVER}" Section2
- DetailPrint "Now installing sdcc..."
- SetOutPath "$TEMP"
- File "${STARTDIR}\sdcc-${SDCCVER}-setup.exe"
- MessageBox MB_OK "The Wixel Dev Bundle will now launch the installer for SDCC ${SDCCVER} - the small device C compiler"
- ExecWait "$TEMP\sdcc-${SDCCVER}-setup.exe"
- DetailPrint "Now making sure that SDCC's path is set properly..."
- ReadRegStr $9 HKLM "Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" 'InstallLocation'
- ReadRegStr $9 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" 'InstallLocation'
- ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$9\bin"
-SectionEnd
-
-Section "Pololu GNU Build Utilities" Section3
- SetOutPath "$TEMP"
- File "${STARTDIR}\Pololu_GNU_build_tools.exe"
- DetailPrint "Now running the Pololu GNU Build Utilities installer"
- MessageBox MB_OK "The Wixel Dev Bundle will now launch the installer for the Pololu GNU Build Utilities"
- ExecWait "$TEMP\Pololu_GNU_build_tools.exe"
-SectionEnd
-
-Section "Notepad++ Text Editor" Section4
- SetOutPath "$TEMP"
- DetailPrint "Installing Notepad++"
- File "${STARTDIR}\npp.${NPVER}.Installer.exe"
- MessageBox MB_OK "The Wixel Dev Bundle will now launch the installer for Notepad++"
- ExecWait "$TEMP\npp.${NPVER}.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 ${Section1} $(DESC_SECTION1)
- !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_SECTION2)
- !insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_SECTION3)
- !insertmacro MUI_DESCRIPTION_TEXT ${Section4} $(DESC_SECTION4)
-!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-${WIXELTOOLVERSION}."
- StrCpy $INSTDIR "$INSTDIR-${WIXELTOOLVERSION}"
- ${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" "$SDKLOC"
- ExecShell "open" "$INSTDIR"
-FunctionEnd
-
-; Function .oninit
-
-; FunctionEnd

0 comments on commit 31f8584

Please sign in to comment.