diff --git a/ground/openpilotgcs/packaging/winx86/make_installer.cmd b/ground/openpilotgcs/packaging/winx86/make_installer.cmd index a487d682e..46c6567ac 100644 --- a/ground/openpilotgcs/packaging/winx86/make_installer.cmd +++ b/ground/openpilotgcs/packaging/winx86/make_installer.cmd @@ -16,4 +16,4 @@ for %%D in (%0) do set NSI=%%~dD%%~pD\openpilotgcs.nsi rem Build installer echo Generating Windows installer... -"%NSISC%" /V2 %NSI% +"%NSISC%" /V3 %NSI% diff --git a/ground/openpilotgcs/packaging/winx86/openpilotgcs.nsi b/ground/openpilotgcs/packaging/winx86/openpilotgcs.nsi index 5d36ab881..47037b59b 100644 --- a/ground/openpilotgcs/packaging/winx86/openpilotgcs.nsi +++ b/ground/openpilotgcs/packaging/winx86/openpilotgcs.nsi @@ -31,7 +31,7 @@ ;-------------------------------- ; Paths - + ; Tree root locations (relative to this script location) !define NSIS_DATA_TREE "." !define GCS_BUILD_TREE "..\..\..\..\build\ground\openpilotgcs" @@ -39,7 +39,7 @@ ; Default installation folder InstallDir "$LOCALAPPDATA\OpenPilot" - + ; Get installation folder from registry if available InstallDirRegKey HKCU "Software\OpenPilot" "Install Location" @@ -83,7 +83,7 @@ ; Compression level SetCompressor /solid lzma - + ;-------------------------------- ; Branding @@ -97,7 +97,7 @@ !define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH !define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIS_DATA_TREE}\resources\welcome.bmp" !define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH - + ;-------------------------------- ; Language selection dialog settings @@ -105,6 +105,12 @@ !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" !define MUI_LANGDLL_REGISTRY_KEY "Software\OpenPilot" !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" + !define MUI_LANGDLL_ALWAYSSHOW + +;-------------------------------- +; Settings for MUI_PAGE_FINISH + !define MUI_FINISHPAGE_RUN + !define MUI_FINISHPAGE_RUN_FUNCTION "RunApplication" ;-------------------------------- ; Pages @@ -115,27 +121,25 @@ !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH - + !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_COMPONENTS !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH -; !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\openpilotgcs.exe" - ;-------------------------------- ; Supported languages, license files and translations !include "${NSIS_DATA_TREE}\translations\languages.nsh" - + ;-------------------------------- ; Reserve files - + ; If you are using solid compression, files that are required before ; the actual installation should be stored first in the data block, ; because this will make your installer start faster. - + !insertmacro MUI_RESERVEFILE_LANGDLL ;-------------------------------- @@ -191,7 +195,7 @@ SectionEnd Section ; create uninstall info ; Write the installation path into the registry WriteRegStr HKCU "Software\OpenPilot" "Install Location" $INSTDIR - + ; Write the uninstall keys for Windows WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "DisplayName" "OpenPilot GCS" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "UninstallString" '"$INSTDIR\Uninstall.exe"' @@ -213,7 +217,7 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${InSecLocalization} $(DESC_InSecLocalization) !insertmacro MUI_DESCRIPTION_TEXT ${InSecShortcuts} $(DESC_InSecShortcuts) !insertmacro MUI_FUNCTION_DESCRIPTION_END - + ;-------------------------------- ; Installer functions @@ -248,12 +252,18 @@ SectionEnd Section "un.Maps cache" UnSecCache ; Remove maps cache - RMDir /r /rebootok "$PROFILE\OpenPilot" + RMDir /r /rebootok "$APPDATA\OpenPilot\mapscache" SectionEnd Section /o "un.Configuration" UnSecConfig ; Remove configuration - RMDir /r /rebootok "$APPDATA\OpenPilot" + Delete /rebootok "$APPDATA\OpenPilot\OpenPilotGCS.db" + Delete /rebootok "$APPDATA\OpenPilot\OpenPilotGCS.ini" +SectionEnd + +Section "-un.Profile" UnSecProfile + ; Remove OpenPilot user profile subdirectory if empty + RMDir "$APPDATA\OpenPilot" SectionEnd ;-------------------------------- @@ -264,12 +274,21 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${UnSecCache} $(DESC_UnSecCache) !insertmacro MUI_DESCRIPTION_TEXT ${UnSecConfig} $(DESC_UnSecConfig) !insertmacro MUI_UNFUNCTION_DESCRIPTION_END - + ;-------------------------------- ; Uninstaller functions Function un.onInit !insertmacro MUI_UNGETLANGUAGE - + +FunctionEnd + +;-------------------------------- +; Function to run the application from installer + +Function RunApplication + + Exec '"$INSTDIR\bin\openpilotgcs.exe"' + FunctionEnd diff --git a/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.ini b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.ini index 0b1ef6aca..23a84a1d5 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.ini +++ b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.ini @@ -1444,7 +1444,7 @@ OPMapGadget\Google%20Sat\data\showTileGridLines=false OPMapGadget\Google%20Sat\data\accessMode=ServerAndCache OPMapGadget\Google%20Sat\data\useMemoryCache=true OPMapGadget\Google%20Sat\data\uavSymbol=mapquad.png -OPMapGadget\Google%20Sat\data\cacheLocation=%%STOREPATH%%mapscache-sat/ +OPMapGadget\Google%20Sat\data\cacheLocation= OPMapGadget\Google%20Sat\configInfo\version=0.0.0 OPMapGadget\Google%20Sat\configInfo\locked=false OPMapGadget\Memory%20Only\data\mapProvider=GoogleMap @@ -1456,7 +1456,7 @@ OPMapGadget\Memory%20Only\data\showTileGridLines=false OPMapGadget\Memory%20Only\data\accessMode=CacheOnly OPMapGadget\Memory%20Only\data\useMemoryCache=true OPMapGadget\Memory%20Only\data\uavSymbol=airplanepip.png -OPMapGadget\Memory%20Only\data\cacheLocation=%%STOREPATH%%mapscache/ +OPMapGadget\Memory%20Only\data\cacheLocation= OPMapGadget\Memory%20Only\configInfo\version=0.0.0 OPMapGadget\Memory%20Only\configInfo\locked=false OPMapGadget\default\data\mapProvider=GoogleMap @@ -1468,7 +1468,7 @@ OPMapGadget\default\data\showTileGridLines=false OPMapGadget\default\data\accessMode=ServerAndCache OPMapGadget\default\data\useMemoryCache=true OPMapGadget\default\data\uavSymbol=mapquad.png -OPMapGadget\default\data\cacheLocation=%%STOREPATH%%mapscache/ +OPMapGadget\default\data\cacheLocation= OPMapGadget\default\configInfo\version=0.0.0 OPMapGadget\default\configInfo\locked=false PFDGadget\raw\data\dialFile=%%DATAPATH%%pfd/default/pfd.svg diff --git a/make/win32/README.txt b/make/winx86/README.txt similarity index 95% rename from make/win32/README.txt rename to make/winx86/README.txt index c7b3a0143..9677e9368 100644 --- a/make/win32/README.txt +++ b/make/winx86/README.txt @@ -46,8 +46,8 @@ Now you need to copy two files to your msysGit installation folders. Assuming that you installed the msysGit into C:\Program Files\Git\, you have to copy: - make\win32\make -> C:\Program Files\Git\bin\ - make\win32\sh.cmd -> C:\Program Files\Git\cmd\ + make\winx86\make -> C:\Program Files\Git\bin\ + make\winx86\sh.cmd -> C:\Program Files\Git\cmd\ If you have msysGit installed into another directory, you need to update paths accordingly. Also if you have tools installed into different directories and diff --git a/make/win32/make b/make/winx86/make similarity index 100% rename from make/win32/make rename to make/winx86/make diff --git a/make/win32/sh.cmd b/make/winx86/sh.cmd similarity index 100% rename from make/win32/sh.cmd rename to make/winx86/sh.cmd diff --git a/make/win32/shell_script.reg b/make/winx86/shell_script.reg similarity index 100% rename from make/win32/shell_script.reg rename to make/winx86/shell_script.reg