X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2Faltos-windows.nsi.in;h=ab5ac4530ecf8ee9493f904d53ac317998e9d287;hp=9886e4a218b2a07f36799097c58a05dee3129ed7;hb=3f4e765c05ddbae83ca0c0176572cd698f285d08;hpb=aa7eac32adf4c2cdf441991d02411758f2682d1e diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index 9886e4a2..ab5ac453 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -1,8 +1,8 @@ !addplugindir Instdrv/NSIS/Plugins -; Definitions for Java 1.6 Detection -!define JRE_VERSION "1.6" -!define JRE_ALTERNATE "1.7" -!define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=52247&/jre-6u27-windows-i586-p.exe" +!addincludedir Instdrv/NSIS/Includes +!include x64.nsh +!include java.nsh + !define PRODUCT_NAME "Altus Metrum Windows Software" Name "Altus Metrum Installer" @@ -23,31 +23,14 @@ ShowInstDetails Show ComponentText "Altus Metrum Software and Driver Installer" -Function GetJRE - MessageBox MB_OK "${PRODUCT_NAME} uses Java ${JRE_VERSION} 32-bit, it will now \ - be downloaded and installed" - - StrCpy $2 "$TEMP\Java Runtime Environment.exe" - nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2 - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Download failed: $R0" - Quit - ExecWait $2 - Delete $2 -FunctionEnd - - -Function DetectJRE - ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ - "CurrentVersion" - StrCmp $2 ${JRE_VERSION} done - - StrCmp $2 ${JRE_ALTERNATE} done - - Call GetJRE - - done: +Function .onInit + DetailPrint "Checking host operating system" + ${If} ${RunningX64} + DetailPrint "Installer running on 64-bit host" + SetRegView 64 + StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum" + ${DisableX64FSRedirection} + ${EndIf} FunctionEnd ; Pages to present @@ -70,15 +53,18 @@ Section "Install Driver" InstDriver InstDrv::DeleteOemInfFiles /NOUNLOAD InstDrv::CreateDevice /NOUNLOAD - SetOutPath $TEMP - File "../telemetrum.inf" - InstDrv::InstallDriver /NOUNLOAD "$TEMP\telemetrum.inf" - SetOutPath $INSTDIR - File "../telemetrum.inf" - - SetOutPath $WINDIR\Inf - File "../telemetrum.inf" + File "../altusmetrum.inf" + File "../altusmetrum.cat" + + ${DisableX64FSRedirection} + IfFileExists $WINDIR\System32\PnPutil.exe 0 nopnp + ${DisableX64FSRedirection} + nsExec::ExecToLog '"$WINDIR\System32\PnPutil.exe" -i -a "$INSTDIR\altusmetrum.inf"' + Goto done +nopnp: + InstDrv::InstallDriver /NOUNLOAD "$INSTDIR\altusmetrum.inf" +done: SectionEnd @@ -111,7 +97,7 @@ Section "AltosUI Desktop Shortcut" CreateShortCut "$DESKTOP\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico" SectionEnd -Section "TeleMetrum and TeleDongle Firmware" +Section "TeleMetrum, TeleDongle and TeleBT Firmware" SetOutPath $INSTDIR @@ -119,7 +105,11 @@ Section "TeleMetrum and TeleDongle Firmware" File "../src/telemetrum-v1.1/telemetrum-v1.1-${VERSION}.ihx" File "../src/telemetrum-v1.2/telemetrum-v1.2-${VERSION}.ihx" File "../src/telemini-v1.0/telemini-v1.0-${VERSION}.ihx" + File "../src/telegps-v1.0/telegps-v1.0-${VERSION}.ihx" File "../src/teledongle-v0.2/teledongle-v0.2-${VERSION}.ihx" + File "../src/telebt-v1.0/telebt-v1.0-${VERSION}.ihx" + File "../src/telemega-v1.0/telemega-v1.0-${VERSION}.ihx" + File "../src/easymini-v1.0/easymini-v1.0-${VERSION}.ihx" SectionEnd @@ -132,6 +122,8 @@ Section "Documentation" File "../doc/telemetry.pdf" File "../doc/telemetrum-outline.pdf" File "../doc/telemega-outline.pdf" + File "../doc/easymini-outline.pdf" + File "../doc/telemini.pdf" SectionEnd Section "Uninstaller" @@ -159,9 +151,6 @@ Section "Uninstall" Delete "$INSTDIR\*.*" RMDir "$INSTDIR" - ; Remove .inf file - Delete "$WINDIR\Inf\telemetrum.inf" - ; Remove devices InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial InstDrv::DeleteOemInfFiles /NOUNLOAD