From 2904dc1add6d254f332d30f29d9ca8ec20e74a32 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Wed, 15 Sep 2021 11:03:42 -0700 Subject: [PATCH 01/12] try to add installer for win7+ --- .github/workflows/windows_build.yml | 6 + .../windows/installer/64bit/GeoDa-win7+.iss | 250 ++++++++++++++++++ 2 files changed, 256 insertions(+) create mode 100644 BuildTools/windows/installer/64bit/GeoDa-win7+.iss diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index ace989bcd..70cb5031a 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -231,6 +231,7 @@ jobs: else { ISCC.exe /q installer\64bit\GeoDa.iss + ISCC.exe /q installer\64bit\GeoDa-win7+.iss } dir @@ -239,6 +240,11 @@ jobs: name: GeoDa-Windows-${{ env.platform }}-installer path: ${{ github.workspace }}\BuildTools\windows\GeoDa_1.20_${{ env.platform }}_Setup.exe + - uses: actions/upload-artifact@v2 + with: + name: GeoDa-Windows7+-${{ env.platform }}-installer + path: ${{ github.workspace }}\BuildTools\windows\GeoDa_1.20_win7+${{ env.platform }}_Setup.exe + diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss new file mode 100644 index 000000000..98214039f --- /dev/null +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -0,0 +1,250 @@ +[Setup] +AppName=GeoDa +AppPublisher=GeoDa Center +AppPublisherURL=https://spatial.uchiago.edu/ +AppSupportURL=https://spatial.uchiago.edu/ +AppUpdatesURL=https://spatial.uchiago.edu/ +AppSupportPhone=(480)965-7533 +AppVersion=1.20 +DefaultDirName={pf}\GeoDa Software +DefaultGroupName=GeoDa Software +; Since no icons will be created in "{group}", we don't need the wizard +; to ask for a Start Menu folder name: +;DisableProgramGroupPage=yes +UninstallDisplayIcon={userappdata}\GeoDa.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=..\.. +OutputBaseFilename=GeoDa_1.20_win7+x64_Setup +;OutputDir=userdocs:Inno Setup Examples Output + +; "ArchitecturesAllowed=x64" specifies that Setup cannot run on +; anything but x64. +; Note: We don't set ProcessorsAllowed because we want this +; installation to run on all architectures (including Itanium, +; since it's capable of running 32-bit code too). +ArchitecturesAllowed=x64 + +; "ArchitecturesInstallIn64BitMode=x64" requests that the install be +; done in "64-bit mode" on x64, meaning it should use the native +; 64-bit Program Files directory and the 64-bit view of the registry. +ArchitecturesInstallIn64BitMode=x64 + +ChangesAssociations=yes + +ShowLanguageDialog=yes + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" +Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" + +[dirs] +Name: "{userappdata}"; Permissions: users-full; Check: InitializeSetup +Name: "{userappdata}\basemap_cache"; Permissions: users-full +Name: "{userappdata}\lang"; Permissions: users-full +Name: "{userappdata}\proj"; Permissions: users-full + +[Files] +Source: "..\..\Release\GeoDa.exe"; DestDir: "{userappdata}"; DestName: "GeoDa.exe"; Check: IsX64 +Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{userappdata}" +Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{userappdata}" +Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{userappdata}" +Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{userappdata}" +Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{userappdata}" +Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{userappdata}" +Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{userappdata}\web_plugins"; Flags: recursesubdirs +Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{userappdata}\proj"; Flags: recursesubdirs + +Source: "VC_redist.x64.exe"; DestDir: "{userappdata}" +Source: "..\..\temp\OpenCL\sdk\bin\x64\OpenCL.dll"; DestDir: "{userappdata}" +Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_vc_custom.dll"; DestDir: "{userappdata}" +Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\expat.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\geos.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\libcrypto-1_1-x64.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\libssl-1_1-x64.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\proj.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{userappdata}" +Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{userappdata}" +Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{userappdata}" +Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{userappdata}\lang"; Flags: recursesubdirs +Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{userappdata}\data"; Flags: recursesubdirs + +;Source: "Readme.txt"; DestDir: "{userappdata}"; Flags: isreadme + +[Icons] +Name: "{group}\GeoDa"; Filename: "{userappdata}\GeoDa.exe" +;Name: "{group}\GeoDa"; Filename: "{userappdata}\run_geoda.bat"; IconFilename: "{userappdata}\GeoDa.ico" +Name: "{group}\Uninstall"; Filename: "{uninstallexe}" +Name: "{commondesktop}\GeoDa"; Filename: "{userappdata}\GeoDa.exe" +;Name: "{commondesktop}\GeoDa"; Filename: "{userappdata}\run_geoda.bat"; IconFilename: "{userappdata}\GeoDa.ico" + +[Registry] +; set PATH +; set GEODA_GDAL_DATA +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{userappdata}\data"; Flags: preservestringtype uninsdeletevalue +; set GEODA_OGR_DRIVER_PATH +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{userappdata}"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{userappdata}\proj"; Flags: preservestringtype uninsdeletevalue + +Root: HKCR; Subkey: ".gda"; ValueType: string; ValueName: ""; ValueData: "GeoDaProjectFile"; Flags: uninsdeletevalue +Root: HKCR; Subkey: "GeoDaProjectFile"; ValueType: string; ValueName: ""; ValueData: "GeoDa Project File"; Flags: uninsdeletekey +Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{userappdata}\GeoDa.exe,0" +Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{userappdata}\GeoDa.exe"" ""%1""" + +; set Browser Emulation for wxWebView to IE 11. IE 10 or earlier does not work with current D3 +Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName:"GeoDa.exe"; ValueData:"$2AF9" + +;Local Machine +Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "GeoDa.exe"; ValueData: "$2AF9" + +;64 Bit Mode +Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "GeoDa.exe"; ValueData: "$2AF9"; Check: IsWin64 +;run as admin +;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{userappdata}\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 + +[Code] +function IsX64: Boolean; +begin + Result := Is64BitInstallMode and (ProcessorArchitecture = paX64); +end; + +function IsIA64: Boolean; +begin + Result := Is64BitInstallMode and (ProcessorArchitecture = paIA64); +end; + +function IsOtherArch: Boolean; +begin + Result := not IsX64 and not IsIA64; +end; + +function VCRedistNeedsInstall: Boolean; +begin + Result := not RegKeyExists(HKLM,'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{855e31d2-9031-46e1-b06d-c9d7777deefb}'); +end; + +function GetUninstallString: string; +var + sUnInstPath: string; + sUnInstallString: String; +begin + Result := ''; + sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\GeoDa_is1'); //Your App GUID/ID + sUnInstallString := ''; + if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then + RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); + Result := sUnInstallString; +end; + +function IsUpgrade: Boolean; +begin + Result := (GetUninstallString() <> ''); +end; + +function InitializeSetup: Boolean; +var + V: Integer; + iResultCode: Integer; + sUnInstallString: string; +begin + Result := True; // in case when no previous version is found + if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\GeoDa_is1', 'UninstallString') then //Your App GUID/ID + begin + V := MsgBox(ExpandConstant('An old version of GeoDa was detected. Please uninstall it before continuing.'), mbInformation, MB_YESNO); //Custom Message if App installed + if V = IDYES then + begin + sUnInstallString := GetUninstallString(); + sUnInstallString := RemoveQuotes(sUnInstallString); + Exec(ExpandConstant(sUnInstallString), '', '', SW_SHOW, ewWaitUntilTerminated, iResultCode); + Result := True; //if you want to proceed after uninstall + //Exit; //if you want to quit after uninstall + end + else + Result := False; //when older version present and not uninstalled + end; +end; + +var + Button: TNewButton; + ComboBox: TNewComboBox; + CustomPage: TWizardPage; + langCode: string; + +procedure ComboBoxChange(Sender: TObject); +begin + case ComboBox.ItemIndex of + 0: + begin + langCode := '58'; + end; + 1: + begin + langCode := '45'; // chinese + end; + 2: + begin + langCode := '179'; // spanish + end; + 3: + begin + langCode := '159'; // russian + end; + end; +end; + +procedure InitializeWizard; +var + DescLabel: TLabel; +begin + CustomPage := CreateCustomPage(wpSelectDir, 'Language Selection', 'Please select a language for GeoDa'); + + DescLabel := TLabel.Create(WizardForm); + DescLabel.Parent := CustomPage.Surface; + DescLabel.Left := 0; + DescLabel.Top := 0; + DescLabel.Caption := ''; + + ComboBox := TNewComboBox.Create(WizardForm); + ComboBox.Parent := CustomPage.Surface; + ComboBox.Left := 0; + ComboBox.Top := DescLabel.Top + DescLabel.Height + 6; + ComboBox.Width := 220; + ComboBox.Style := csDropDownList; + ComboBox.Items.Add('English'); + ComboBox.Items.Add('Chinese (Simplified)'); + ComboBox.Items.Add('Spanish'); + ComboBox.Items.Add('Russian'); + ComboBox.ItemIndex := 0; + ComboBox.OnChange := @ComboBoxChange; + langCode := '58'; +end; + +function getLangCode(Param: String): String; +begin + Result := langCode; +end; + +[INI] +Filename: "{userappdata}\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{userappdata}} + +[Run] +Filename: {userappdata}\VC_redist.x64.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall + From 18ec373c6135b5cc8eeacf596c7e3414837c63b9 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Wed, 15 Sep 2021 13:59:46 -0700 Subject: [PATCH 02/12] Update GeoDa-win7+.iss --- .../windows/installer/64bit/GeoDa-win7+.iss | 120 +++++++++--------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index 98214039f..0fd10f641 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -6,12 +6,12 @@ AppSupportURL=https://spatial.uchiago.edu/ AppUpdatesURL=https://spatial.uchiago.edu/ AppSupportPhone=(480)965-7533 AppVersion=1.20 -DefaultDirName={pf}\GeoDa Software +DefaultDirName={localappdata}\GeoDa DefaultGroupName=GeoDa Software ; Since no icons will be created in "{group}", we don't need the wizard ; to ask for a Start Menu folder name: ;DisableProgramGroupPage=yes -UninstallDisplayIcon={userappdata}\GeoDa.exe +UninstallDisplayIcon={localappdata}\GeoDa\GeoDa.exe Compression=lzma2 SolidCompression=yes OutputDir=..\.. @@ -40,74 +40,74 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" [dirs] -Name: "{userappdata}"; Permissions: users-full; Check: InitializeSetup -Name: "{userappdata}\basemap_cache"; Permissions: users-full -Name: "{userappdata}\lang"; Permissions: users-full -Name: "{userappdata}\proj"; Permissions: users-full +Name: "{localappdata}\GeoDa"; Permissions: users-full; Check: InitializeSetup +Name: "{localappdata}\GeoDa\basemap_cache"; Permissions: users-full +Name: "{localappdata}\GeoDa\lang"; Permissions: users-full +Name: "{localappdata}\GeoDa\proj"; Permissions: users-full [Files] -Source: "..\..\Release\GeoDa.exe"; DestDir: "{userappdata}"; DestName: "GeoDa.exe"; Check: IsX64 -Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{userappdata}" -Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{userappdata}" -Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{userappdata}" -Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{userappdata}" -Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{userappdata}" -Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{userappdata}" -Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{userappdata}\web_plugins"; Flags: recursesubdirs -Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{userappdata}\proj"; Flags: recursesubdirs - -Source: "VC_redist.x64.exe"; DestDir: "{userappdata}" -Source: "..\..\temp\OpenCL\sdk\bin\x64\OpenCL.dll"; DestDir: "{userappdata}" -Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_vc_custom.dll"; DestDir: "{userappdata}" -Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\expat.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\geos.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\libcrypto-1_1-x64.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\libssl-1_1-x64.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\proj.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{userappdata}" -Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{userappdata}" -Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{userappdata}" -Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{userappdata}\lang"; Flags: recursesubdirs -Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{userappdata}\data"; Flags: recursesubdirs - -;Source: "Readme.txt"; DestDir: "{userappdata}"; Flags: isreadme +Source: "..\..\Release\GeoDa.exe"; DestDir: "{localappdata}\GeoDa"; DestName: "GeoDa.exe"; Check: IsX64 +Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{localappdata}\GeoDa\web_plugins"; Flags: recursesubdirs +Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{localappdata}\GeoDa\proj"; Flags: recursesubdirs + +Source: "VC_redist.x64.exe"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\temp\OpenCL\sdk\bin\x64\OpenCL.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_vc_custom.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\expat.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\geos.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libcrypto-1_1-x64.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libssl-1_1-x64.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\proj.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{localappdata}\GeoDa\lang"; Flags: recursesubdirs +Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{localappdata}\GeoDa\data"; Flags: recursesubdirs + +;Source: "Readme.txt"; DestDir: "{localappdata}\GeoDa"; Flags: isreadme [Icons] -Name: "{group}\GeoDa"; Filename: "{userappdata}\GeoDa.exe" -;Name: "{group}\GeoDa"; Filename: "{userappdata}\run_geoda.bat"; IconFilename: "{userappdata}\GeoDa.ico" +Name: "{group}\GeoDa"; Filename: "{localappdata}\GeoDa\GeoDa.exe" +;Name: "{group}\GeoDa"; Filename: "{localappdata}\GeoDa\run_geoda.bat"; IconFilename: "{localappdata}\GeoDa\GeoDa.ico" Name: "{group}\Uninstall"; Filename: "{uninstallexe}" -Name: "{commondesktop}\GeoDa"; Filename: "{userappdata}\GeoDa.exe" -;Name: "{commondesktop}\GeoDa"; Filename: "{userappdata}\run_geoda.bat"; IconFilename: "{userappdata}\GeoDa.ico" +Name: "{commondesktop}\GeoDa"; Filename: "{localappdata}\GeoDa\GeoDa.exe" +;Name: "{commondesktop}\GeoDa"; Filename: "{localappdata}\GeoDa\run_geoda.bat"; IconFilename: "{localappdata}\GeoDa\GeoDa.ico" [Registry] ; set PATH ; set GEODA_GDAL_DATA -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{userappdata}\data"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{localappdata}\GeoDa\data"; Flags: preservestringtype uninsdeletevalue ; set GEODA_OGR_DRIVER_PATH -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{userappdata}"; Flags: preservestringtype uninsdeletevalue -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{userappdata}\proj"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{localappdata}\GeoDa"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{localappdata}\GeoDa\proj"; Flags: preservestringtype uninsdeletevalue Root: HKCR; Subkey: ".gda"; ValueType: string; ValueName: ""; ValueData: "GeoDaProjectFile"; Flags: uninsdeletevalue Root: HKCR; Subkey: "GeoDaProjectFile"; ValueType: string; ValueName: ""; ValueData: "GeoDa Project File"; Flags: uninsdeletekey -Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{userappdata}\GeoDa.exe,0" -Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{userappdata}\GeoDa.exe"" ""%1""" +Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{localappdata}\GeoDa\GeoDa.exe,0" +Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{localappdata}\GeoDa\GeoDa.exe"" ""%1""" ; set Browser Emulation for wxWebView to IE 11. IE 10 or earlier does not work with current D3 Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName:"GeoDa.exe"; ValueData:"$2AF9" @@ -118,7 +118,7 @@ Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\ ;64 Bit Mode Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "GeoDa.exe"; ValueData: "$2AF9"; Check: IsWin64 ;run as admin -;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{userappdata}\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 +;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{localappdata}\GeoDa\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 [Code] function IsX64: Boolean; @@ -243,8 +243,8 @@ begin end; [INI] -Filename: "{userappdata}\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{userappdata}} +Filename: "{localappdata}\GeoDa\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{localappdata}\GeoDa} [Run] -Filename: {userappdata}\VC_redist.x64.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall +Filename: {localappdata}\GeoDa\VC_redist.x64.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall From b1619460446c953beb97f8e3fc3254c5006c7651 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Wed, 15 Sep 2021 15:02:09 -0700 Subject: [PATCH 03/12] add win installer for windows7+ under user appdata --- .github/workflows/windows_build.yml | 1 + .../windows/installer/32bit/GeoDa-win7+.iss | 234 ++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 BuildTools/windows/installer/32bit/GeoDa-win7+.iss diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 70cb5031a..344efad5e 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -227,6 +227,7 @@ jobs: if($env:platform -eq "x86") { ISCC.exe /q installer\32bit\GeoDa.iss + ISCC.exe /q installer\32bit\GeoDa-win7+.iss } else { diff --git a/BuildTools/windows/installer/32bit/GeoDa-win7+.iss b/BuildTools/windows/installer/32bit/GeoDa-win7+.iss new file mode 100644 index 000000000..1485c80a6 --- /dev/null +++ b/BuildTools/windows/installer/32bit/GeoDa-win7+.iss @@ -0,0 +1,234 @@ +[Setup] +AppName=GeoDa +AppPublisher=GeoDa Center +AppPublisherURL=https://spatial.uchiago.edu/ +AppSupportURL=https://spatial.uchiago.edu/ +AppUpdatesURL=https://spatial.uchiago.edu/ +AppSupportPhone=(480)965-7533 +AppVersion=1.20 +DefaultDirName={localappdata}\GeoDa +DefaultGroupName=GeoDa Software +; Since no icons will be created in "{group}", we don't need the wizard +; to ask for a Start Menu folder name: +;DisableProgramGroupPage=yes +UninstallDisplayIcon={localappdata}\GeoDa\GeoDa.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=..\.. +OutputBaseFilename=GeoDa_1.20_win7+x86_Setup +;OutputDir=userdocs:Inno Setup Examples Output + +ChangesAssociations=yes + +ShowLanguageDialog=yes + +[Languages] +Name: "en"; MessagesFile: "compiler:Default.isl" + +[dirs] +Name: "{localappdata}\GeoDa"; Permissions: users-full; Check: InitializeSetup +Name: "{localappdata}\GeoDa\basemap_cache"; Permissions: users-full +Name: "{localappdata}\GeoDa\lang"; Permissions: users-full +Name: "{localappdata}\GeoDa\proj"; Permissions: users-full + +[Files] +Source: "..\..\Release\GeoDa.exe"; DestDir: "{localappdata}\GeoDa"; DestName: "GeoDa.exe" +Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{localappdata}\GeoDa\web_plugins"; Flags: recursesubdirs +Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{localappdata}\GeoDa\proj"; Flags: recursesubdirs + + +Source: "VC_redist.x86.exe"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\temp\OpenCL\sdk\bin\x86\OpenCL.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\temp\wxWidgets\lib\vc_dll\wxmsw314u_vc_custom.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\temp\wxWidgets\lib\vc_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\expat.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\geos.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libcrypto-1_1.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libssl-1_1.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\proj.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{localappdata}\GeoDa" +Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{localappdata}\GeoDa\lang"; Flags: recursesubdirs +Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{localappdata}\GeoDa\data"; Flags: recursesubdirs + +;Source: "Readme.txt"; DestDir: "{localappdata}\GeoDa"; Flags: isreadme + +[Icons] +Name: "{group}\GeoDa"; Filename: "{localappdata}\GeoDa\GeoDa.exe" +;Name: "{group}\GeoDa"; Filename: "{localappdata}\GeoDa\run_geoda.bat"; IconFilename: "{localappdata}\GeoDa\GeoDa.ico" +Name: "{group}\Uninstall"; Filename: "{uninstallexe}" +Name: "{commondesktop}\GeoDa"; Filename: "{localappdata}\GeoDa\GeoDa.exe" +;Name: "{commondesktop}\GeoDa"; Filename: "{localappdata}\GeoDa\run_geoda.bat"; IconFilename: "{localappdata}\GeoDa\GeoDa.ico" + +[Registry] +; set PATH +; set GEODA_GDAL_DATA +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{localappdata}\GeoDa\data"; Flags: preservestringtype uninsdeletevalue +; set GEODA_OGR_DRIVER_PATH +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{localappdata}\GeoDa"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{localappdata}\GeoDa\proj"; Flags: preservestringtype uninsdeletevalue + +Root: HKCR; Subkey: ".gda"; ValueType: string; ValueName: ""; ValueData: "GeoDaProjectFile"; Flags: uninsdeletevalue +Root: HKCR; Subkey: "GeoDaProjectFile"; ValueType: string; ValueName: ""; ValueData: "GeoDa Project File"; Flags: uninsdeletekey +Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{localappdata}\GeoDa\GeoDa.exe,0" +Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{localappdata}\GeoDa\GeoDa.exe"" ""%1""" + +; set Browser Emulation for wxWebView to IE 11. IE 10 or earlier does not work with current D3 +Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName:"GeoDa.exe"; ValueData:"$2AF9" + +;Local Machine +Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "GeoDa.exe"; ValueData: "$2AF9" + +;run as admin +;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{localappdata}\GeoDa\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 + +[Code] +function IsX64: Boolean; +begin + Result := Is64BitInstallMode and (ProcessorArchitecture = paX64); +end; + +function IsIA64: Boolean; +begin + Result := Is64BitInstallMode and (ProcessorArchitecture = paIA64); +end; + +function IsOtherArch: Boolean; +begin + Result := not IsX64 and not IsIA64; +end; + +function VCRedistNeedsInstall: Boolean; +begin + Result := not RegKeyExists(HKLM,'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{03d1453c-7d5c-479c-afea-8482f406e036}'); +end; + +function GetUninstallString: string; +var + sUnInstPath: string; + sUnInstallString: String; +begin + Result := ''; + sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\GeoDa_is1'); //Your App GUID/ID + sUnInstallString := ''; + if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then + RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); + Result := sUnInstallString; +end; + +function IsUpgrade: Boolean; +begin + Result := (GetUninstallString() <> ''); +end; + +function InitializeSetup: Boolean; +var + V: Integer; + iResultCode: Integer; + sUnInstallString: string; +begin + Result := True; // in case when no previous version is found + if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\GeoDa_is1', 'UninstallString') then //Your App GUID/ID + begin + V := MsgBox(ExpandConstant('An old version of GeoDa was detected. Please uninstall it before continuing.'), mbInformation, MB_YESNO); //Custom Message if App installed + if V = IDYES then + begin + sUnInstallString := GetUninstallString(); + sUnInstallString := RemoveQuotes(sUnInstallString); + Exec(ExpandConstant(sUnInstallString), '', '', SW_SHOW, ewWaitUntilTerminated, iResultCode); + Result := True; //if you want to proceed after uninstall + //Exit; //if you want to quit after uninstall + end + else + Result := False; //when older version present and not uninstalled + end; +end; + +var + Button: TNewButton; + ComboBox: TNewComboBox; + CustomPage: TWizardPage; + langCode: string; + +procedure ComboBoxChange(Sender: TObject); +begin + case ComboBox.ItemIndex of + 0: + begin + langCode := '58'; + end; + 1: + begin + langCode := '45'; // chinese + end; + 2: + begin + langCode := '179'; // spanish + end; + 3: + begin + langCode := '159'; // russian + end; + end; +end; + +procedure InitializeWizard; +var + DescLabel: TLabel; +begin + CustomPage := CreateCustomPage(wpSelectDir, 'Language Selection', 'Please select a language for GeoDa'); + + DescLabel := TLabel.Create(WizardForm); + DescLabel.Parent := CustomPage.Surface; + DescLabel.Left := 0; + DescLabel.Top := 0; + DescLabel.Caption := ''; + + ComboBox := TNewComboBox.Create(WizardForm); + ComboBox.Parent := CustomPage.Surface; + ComboBox.Left := 0; + ComboBox.Top := DescLabel.Top + DescLabel.Height + 6; + ComboBox.Width := 220; + ComboBox.Style := csDropDownList; + ComboBox.Items.Add('English'); + ComboBox.Items.Add('Chinese (Simplified)'); + ComboBox.Items.Add('Spanish'); + ComboBox.Items.Add('Russian'); + ComboBox.ItemIndex := 0; + ComboBox.OnChange := @ComboBoxChange; + langCode := '58'; +end; + +function getLangCode(Param: String): String; +begin + Result := langCode; +end; + +[INI] +Filename: "{localappdata}\GeoDa\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{localappdata}\GeoDa} + +[Run] +Filename: {localappdata}\GeoDa\VC_redist.x86.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall From 881073ced964233bf2b2bc1fef2e44764776921d Mon Sep 17 00:00:00 2001 From: Xun Li Date: Wed, 15 Sep 2021 22:25:37 -0700 Subject: [PATCH 04/12] update inno setup #2349 --- .../windows/installer/64bit/GeoDa-win7+.iss | 119 +++++++++--------- 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index 0fd10f641..def20a1d0 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -6,12 +6,12 @@ AppSupportURL=https://spatial.uchiago.edu/ AppUpdatesURL=https://spatial.uchiago.edu/ AppSupportPhone=(480)965-7533 AppVersion=1.20 -DefaultDirName={localappdata}\GeoDa +DefaultDirName={pf}\GeoDa Software DefaultGroupName=GeoDa Software ; Since no icons will be created in "{group}", we don't need the wizard ; to ask for a Start Menu folder name: ;DisableProgramGroupPage=yes -UninstallDisplayIcon={localappdata}\GeoDa\GeoDa.exe +UninstallDisplayIcon={app}\GeoDa.exe Compression=lzma2 SolidCompression=yes OutputDir=..\.. @@ -40,74 +40,73 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" [dirs] -Name: "{localappdata}\GeoDa"; Permissions: users-full; Check: InitializeSetup -Name: "{localappdata}\GeoDa\basemap_cache"; Permissions: users-full -Name: "{localappdata}\GeoDa\lang"; Permissions: users-full -Name: "{localappdata}\GeoDa\proj"; Permissions: users-full +Name: "{app}"; Permissions: everyone-full; Check: InitializeSetup +Name: "{userappdata}\GeoDa\basemap_cache"; Permissions: users-full +Name: "{userappdata}\GeoDa\lang"; Permissions: users-full [Files] -Source: "..\..\Release\GeoDa.exe"; DestDir: "{localappdata}\GeoDa"; DestName: "GeoDa.exe"; Check: IsX64 -Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{localappdata}\GeoDa\web_plugins"; Flags: recursesubdirs -Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{localappdata}\GeoDa\proj"; Flags: recursesubdirs - -Source: "VC_redist.x64.exe"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\temp\OpenCL\sdk\bin\x64\OpenCL.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_vc_custom.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\expat.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\geos.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libcrypto-1_1-x64.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libssl-1_1-x64.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\proj.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{localappdata}\GeoDa\lang"; Flags: recursesubdirs -Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{localappdata}\GeoDa\data"; Flags: recursesubdirs - -;Source: "Readme.txt"; DestDir: "{localappdata}\GeoDa"; Flags: isreadme +Source: "..\..\Release\GeoDa.exe"; DestDir: "{app}"; DestName: "GeoDa.exe"; Check: IsX64 +Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{userappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{app}\web_plugins"; Flags: recursesubdirs +Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{app}\proj"; Flags: recursesubdirs + +Source: "VC_redist.x64.exe"; DestDir: "{app}" +Source: "..\..\temp\OpenCL\sdk\bin\x64\OpenCL.dll"; DestDir: "{app}" +Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_vc_custom.dll"; DestDir: "{app}" +Source: "..\..\temp\wxWidgets\lib\vc_x64_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\expat.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\geos.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libcrypto-1_1-x64.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libssl-1_1-x64.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\proj.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{app}" +Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}" +Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs +Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{app}\data"; Flags: recursesubdirs + +;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme [Icons] -Name: "{group}\GeoDa"; Filename: "{localappdata}\GeoDa\GeoDa.exe" -;Name: "{group}\GeoDa"; Filename: "{localappdata}\GeoDa\run_geoda.bat"; IconFilename: "{localappdata}\GeoDa\GeoDa.ico" +Name: "{group}\GeoDa"; Filename: "{app}\GeoDa.exe" +;Name: "{group}\GeoDa"; Filename: "{app}\run_geoda.bat"; IconFilename: "{app}\GeoDa.ico" Name: "{group}\Uninstall"; Filename: "{uninstallexe}" -Name: "{commondesktop}\GeoDa"; Filename: "{localappdata}\GeoDa\GeoDa.exe" -;Name: "{commondesktop}\GeoDa"; Filename: "{localappdata}\GeoDa\run_geoda.bat"; IconFilename: "{localappdata}\GeoDa\GeoDa.ico" +Name: "{commondesktop}\GeoDa"; Filename: "{app}\GeoDa.exe" +;Name: "{commondesktop}\GeoDa"; Filename: "{app}\run_geoda.bat"; IconFilename: "{app}\GeoDa.ico" [Registry] ; set PATH ; set GEODA_GDAL_DATA -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{localappdata}\GeoDa\data"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{app}\data"; Flags: preservestringtype uninsdeletevalue ; set GEODA_OGR_DRIVER_PATH -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{localappdata}\GeoDa"; Flags: preservestringtype uninsdeletevalue -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{localappdata}\GeoDa\proj"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{app}"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{app}\proj"; Flags: preservestringtype uninsdeletevalue Root: HKCR; Subkey: ".gda"; ValueType: string; ValueName: ""; ValueData: "GeoDaProjectFile"; Flags: uninsdeletevalue Root: HKCR; Subkey: "GeoDaProjectFile"; ValueType: string; ValueName: ""; ValueData: "GeoDa Project File"; Flags: uninsdeletekey -Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{localappdata}\GeoDa\GeoDa.exe,0" -Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{localappdata}\GeoDa\GeoDa.exe"" ""%1""" +Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\GeoDa.exe,0" +Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\GeoDa.exe"" ""%1""" ; set Browser Emulation for wxWebView to IE 11. IE 10 or earlier does not work with current D3 Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName:"GeoDa.exe"; ValueData:"$2AF9" @@ -118,7 +117,7 @@ Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\ ;64 Bit Mode Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "GeoDa.exe"; ValueData: "$2AF9"; Check: IsWin64 ;run as admin -;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{localappdata}\GeoDa\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 +;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 [Code] function IsX64: Boolean; @@ -243,8 +242,8 @@ begin end; [INI] -Filename: "{localappdata}\GeoDa\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{localappdata}\GeoDa} +Filename: "{userappdata}\GeoDa\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{userappdata}\GeoDa} [Run] -Filename: {localappdata}\GeoDa\VC_redist.x64.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall +Filename: {app}\VC_redist.x64.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall From 8b3d4e60d897be83d6a3fea327a447ec6f2f40ec Mon Sep 17 00:00:00 2001 From: Xun Li Date: Wed, 15 Sep 2021 22:50:05 -0700 Subject: [PATCH 05/12] update user related file location to userappdata on windows --- .../windows/installer/64bit/GeoDa-win7+.iss | 2 + DialogTools/PreferenceDlg.cpp | 11 +--- GenUtils.cpp | 52 ++++++++++++++++++- GenUtils.h | 1 + GeoDa.cpp | 8 +-- 5 files changed, 56 insertions(+), 18 deletions(-) diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index def20a1d0..2136fd9f8 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -50,6 +50,7 @@ Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{app}" Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{app}" Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{app}" Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{userappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{app}" Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{app}" Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{app}" Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{app}\web_plugins"; Flags: recursesubdirs @@ -84,6 +85,7 @@ Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDi Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{app}" Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}" Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs +Source: "..\..\..\..\internationalization\lang\config.ini"; DestDir: "{userappdata}\GeoDa\lang" Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{app}\data"; Flags: recursesubdirs ;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme diff --git a/DialogTools/PreferenceDlg.cpp b/DialogTools/PreferenceDlg.cpp index 21cb3fdef..b095ea11c 100644 --- a/DialogTools/PreferenceDlg.cpp +++ b/DialogTools/PreferenceDlg.cpp @@ -923,15 +923,8 @@ void PreferenceDlg::OnChooseLanguage(wxCommandEvent& ev) sel_str << GdaConst::gda_ui_language; OGRDataAdapter::GetInstance().AddEntry("gda_ui_language", sel_str); - // also update the lang/config.ini content - wxString exePath = wxStandardPaths::Get().GetExecutablePath(); - wxFileName exeFile(exePath); - wxString exeDir = exeFile.GetPathWithSep(); -#ifdef __WXMAC__ - wxString configPath = exeDir + "../Resources/lang/config.ini"; -#else - wxString configPath = exeDir + "lang" + wxFileName::GetPathSeparator() + "config.ini"; -#endif + // also update the lang/config.ini content + wxString configPath = GenUtils::GetLangSearchPath() + wxFileName::GetPathSeparator() + "config.ini"; wxConfigBase * config = new wxFileConfig("GeoDa", wxEmptyString, configPath); if (lan_sel > 0) { diff --git a/GenUtils.cpp b/GenUtils.cpp index 2d028ffc0..e047e6703 100644 --- a/GenUtils.cpp +++ b/GenUtils.cpp @@ -2395,7 +2395,17 @@ wxString GenUtils::GetBasemapDir() #elif __WXMAC__ return GetExeDir() + "../Resources/basemap_cache"; #else - return GetExeDir() + "basemap_cache"; + wxString confDir = wxStandardPaths::Get().GetUserConfigDir(); + // Windows: AppData\Roaming\GeoDa + wxString geodaUserDir = confDir + wxFileName::GetPathSeparator() + "GeoDa"; + if (wxDirExists(geodaUserDir) == false) { + wxFileName::Mkdir(geodaUserDir); + } + wxString basemapDir = geodaUserDir + wxFileName::GetPathSeparator() + "basemap_cache"; + if (wxDirExists(basemapDir) == false) { + wxFileName::Mkdir(basemapDir); + } + return basemapDir; #endif } @@ -2417,6 +2427,44 @@ wxString GenUtils::GetCachePath() #elif __WXMAC__ return GetExeDir() + "../Resources/cache.sqlite"; #else - return GetExeDir() + "cache.sqlite"; + wxString confDir = wxStandardPaths::Get().GetUserConfigDir(); + // Windows: AppData\Roaming\GeoDa + wxString geodaUserDir = confDir + wxFileName::GetPathSeparator() + "GeoDa"; + if (wxDirExists(geodaUserDir) == false) { + wxFileName::Mkdir(geodaUserDir); + } + wxString cachePath = geodaUserDir + wxFileName::GetPathSeparator() + "cache.sqlite"; + if (wxFileExists(cachePath) == false) { + wxString origCachePath = GetExeDir() + "cache.sqlite"; + wxCopyFile(origCachePath, cachePath); + } + return cachePath; #endif } + +wxString GenUtils::GetLangSearchPath() +{ +#ifdef __WXMAC__ + wxString search_path = GetExeDir() + "/../Resources/lang"; +#elif __WIN32__ + wxString confDir = wxStandardPaths::Get().GetUserConfigDir(); + // Windows: AppData\Roaming\GeoDa + wxString geodaUserDir = confDir + wxFileName::GetPathSeparator() + "GeoDa"; + if (wxDirExists(geodaUserDir) == false) { + wxFileName::Mkdir(geodaUserDir); + } + wxString search_path = geodaUserDir + wxFileName::GetPathSeparator() + "lang"; + if (wxDirExists(search_path) == false) { + wxFileName::Mkdir(search_path); + } + wxString langPath = search_path + wxFileName::GetPathSeparator() + "config.ini"; + if (wxFileExists(langPath) == false) { + wxString origLangPath = GetExeDir() + "lang" + wxFileName::GetPathSeparator() + "config.ini"; + wxCopyFile(origLangPath, langPath); + } +#else + wxString search_path = GetExeDir() + wxFileName::GetPathSeparator() + "lang"; +#endif + + return search_path; +} diff --git a/GenUtils.h b/GenUtils.h index b370cb145..0abb17607 100644 --- a/GenUtils.h +++ b/GenUtils.h @@ -457,6 +457,7 @@ namespace GenUtils { wxString GetUserSamplesDir(); wxString GetBasemapDir(); wxString GetCachePath(); + wxString GetLangSearchPath(); bool less_vectors(const vector& a,const vector& b); bool smaller_pair(const std::pair& a, diff --git a/GeoDa.cpp b/GeoDa.cpp index 0ee80825c..cc0f49339 100644 --- a/GeoDa.cpp +++ b/GeoDa.cpp @@ -274,14 +274,8 @@ bool GdaApp::OnInit(void) // load language here: GdaConst::gda_ui_language // search_path is the ./lang directory // config_path it the exe directory (every user will have a different config file?) - wxFileName appFileName(argv[0]); - appFileName.Normalize(wxPATH_NORM_DOTS|wxPATH_NORM_ABSOLUTE| wxPATH_NORM_TILDE); + wxString search_path = GenUtils::GetLangSearchPath(); -#ifdef __WXMAC__ - wxString search_path = appFileName.GetPath() + "/../Resources/lang"; -#else - wxString search_path = appFileName.GetPath() + wxFileName::GetPathSeparator() + "lang"; -#endif // load language from lang/config.ini if user specified any wxString config_path = search_path + wxFileName::GetPathSeparator()+ "config.ini"; bool use_native_config = false; From 1a0b4e25f8d16de0263308a61f61ca38a9d51bf2 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 16 Sep 2021 00:02:26 -0700 Subject: [PATCH 06/12] fix macro issue in GenUtils::GetLangSearchPath --- GenUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GenUtils.cpp b/GenUtils.cpp index e047e6703..9d41a185b 100644 --- a/GenUtils.cpp +++ b/GenUtils.cpp @@ -2444,9 +2444,11 @@ wxString GenUtils::GetCachePath() wxString GenUtils::GetLangSearchPath() { -#ifdef __WXMAC__ +#ifdef __linux__ + wxString search_path = GetExeDir() + wxFileName::GetPathSeparator() + "lang"; +#elif __WXMAC__ wxString search_path = GetExeDir() + "/../Resources/lang"; -#elif __WIN32__ +#else wxString confDir = wxStandardPaths::Get().GetUserConfigDir(); // Windows: AppData\Roaming\GeoDa wxString geodaUserDir = confDir + wxFileName::GetPathSeparator() + "GeoDa"; @@ -2462,8 +2464,6 @@ wxString GenUtils::GetLangSearchPath() wxString origLangPath = GetExeDir() + "lang" + wxFileName::GetPathSeparator() + "config.ini"; wxCopyFile(origLangPath, langPath); } -#else - wxString search_path = GetExeDir() + wxFileName::GetPathSeparator() + "lang"; #endif return search_path; From d82a2b58bfa4b8f28a2ec4c630628574a1167d49 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 16 Sep 2021 23:00:26 -0700 Subject: [PATCH 07/12] Separate logger.txt to userconfig dir on windows --- GenUtils.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/GenUtils.cpp b/GenUtils.cpp index 9d41a185b..4c5f45081 100644 --- a/GenUtils.cpp +++ b/GenUtils.cpp @@ -2357,8 +2357,16 @@ wxString GenUtils::GetSamplesDir() { #ifdef __WXOSX__ return GetResourceDir(); -#else +#elif __linux__ return GetWebPluginsDir(); +#else + wxString confDir = wxStandardPaths::Get().GetUserConfigDir(); + // Windows: AppData\Roaming\GeoDa + wxString geodaUserDir = confDir + wxFileName::GetPathSeparator() + "GeoDa"; + if (wxDirExists(geodaUserDir) == false) { + wxFileName::Mkdir(geodaUserDir); + } + return geodaUserDir; #endif } From 47567665670ca503bd8c30221302504f41aad6b3 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 16 Sep 2021 23:20:17 -0700 Subject: [PATCH 08/12] Update GeoDa-win7+.iss --- .../windows/installer/64bit/GeoDa-win7+.iss | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index 2136fd9f8..301617e75 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -6,7 +6,7 @@ AppSupportURL=https://spatial.uchiago.edu/ AppUpdatesURL=https://spatial.uchiago.edu/ AppSupportPhone=(480)965-7533 AppVersion=1.20 -DefaultDirName={pf}\GeoDa Software +DefaultDirName={code:GetDefaultDirName} DefaultGroupName=GeoDa Software ; Since no icons will be created in "{group}", we don't need the wizard ; to ask for a Start Menu folder name: @@ -34,13 +34,15 @@ ChangesAssociations=yes ShowLanguageDialog=yes +PrivilegesRequiredOverridesAllowed=commandline dialog + [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" [dirs] -Name: "{app}"; Permissions: everyone-full; Check: InitializeSetup +Name: "{app}"; Check: InitializeSetup Name: "{userappdata}\GeoDa\basemap_cache"; Permissions: users-full Name: "{userappdata}\GeoDa\lang"; Permissions: users-full @@ -122,6 +124,18 @@ Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\Fea ;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 [Code] +function GetDefaultDirName(Param: string): string; +begin + if IsAdminLoggedOn then + begin + Result := ExpandConstant('{pf}\GeoDa Software'); + end + else + begin + Result := ExpandConstant('{localappdata}\GeoDa'); + end; +end; + function IsX64: Boolean; begin Result := Is64BitInstallMode and (ProcessorArchitecture = paX64); From 5749981068b7e309999438ac66df6895d07b0801 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 17 Sep 2021 00:40:52 -0700 Subject: [PATCH 09/12] Update GeoDa-win7+.iss --- .../windows/installer/64bit/GeoDa-win7+.iss | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index 301617e75..0a70cd139 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -6,7 +6,7 @@ AppSupportURL=https://spatial.uchiago.edu/ AppUpdatesURL=https://spatial.uchiago.edu/ AppSupportPhone=(480)965-7533 AppVersion=1.20 -DefaultDirName={code:GetDefaultDirName} +DefaultDirName={pf}\GeoDa Software DefaultGroupName=GeoDa Software ; Since no icons will be created in "{group}", we don't need the wizard ; to ask for a Start Menu folder name: @@ -34,15 +34,14 @@ ChangesAssociations=yes ShowLanguageDialog=yes -PrivilegesRequiredOverridesAllowed=commandline dialog - [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" [dirs] -Name: "{app}"; Check: InitializeSetup +Name: "{app}"; Check: InitializeSetup +Name: "{app}\web_plugins"; Permissions: users-modify; Check: InitializeSetup Name: "{userappdata}\GeoDa\basemap_cache"; Permissions: users-full Name: "{userappdata}\GeoDa\lang"; Permissions: users-full @@ -124,18 +123,6 @@ Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\Fea ;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 [Code] -function GetDefaultDirName(Param: string): string; -begin - if IsAdminLoggedOn then - begin - Result := ExpandConstant('{pf}\GeoDa Software'); - end - else - begin - Result := ExpandConstant('{localappdata}\GeoDa'); - end; -end; - function IsX64: Boolean; begin Result := Is64BitInstallMode and (ProcessorArchitecture = paX64); From d6492e4d1d27ae2eabf0523f4c4ae7bd57a0389e Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 17 Sep 2021 09:12:33 -0700 Subject: [PATCH 10/12] Update GeoDa-win7+.iss --- BuildTools/windows/installer/64bit/GeoDa-win7+.iss | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index 0a70cd139..734e50618 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -40,10 +40,9 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" [dirs] -Name: "{app}"; Check: InitializeSetup -Name: "{app}\web_plugins"; Permissions: users-modify; Check: InitializeSetup -Name: "{userappdata}\GeoDa\basemap_cache"; Permissions: users-full -Name: "{userappdata}\GeoDa\lang"; Permissions: users-full +Name: "{app}"; Permissions: users-modify; Check: InitializeSetup +Name: "{userappdata}\GeoDa\basemap_cache"; Permissions: users-modify +Name: "{userappdata}\GeoDa\lang"; Permissions: users-modify [Files] Source: "..\..\Release\GeoDa.exe"; DestDir: "{app}"; DestName: "GeoDa.exe"; Check: IsX64 From fb19d6f57f9aa5a110178e6784bed12ddf2b9f6a Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 17 Sep 2021 10:11:47 -0700 Subject: [PATCH 11/12] fix logger path in windows build --- BuildTools/windows/installer/64bit/GeoDa-win7+.iss | 2 +- DialogTools/ReportBugDlg.cpp | 3 +-- GenUtils.cpp | 13 +++++++++++-- GenUtils.h | 1 + GeoDa.cpp | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index 734e50618..adea52afd 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -40,7 +40,7 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" [dirs] -Name: "{app}"; Permissions: users-modify; Check: InitializeSetup +Name: "{app}"; Check: InitializeSetup Name: "{userappdata}\GeoDa\basemap_cache"; Permissions: users-modify Name: "{userappdata}\GeoDa\lang"; Permissions: users-modify diff --git a/DialogTools/ReportBugDlg.cpp b/DialogTools/ReportBugDlg.cpp index 8be37febd..6a77e0ed3 100644 --- a/DialogTools/ReportBugDlg.cpp +++ b/DialogTools/ReportBugDlg.cpp @@ -337,8 +337,7 @@ bool ReportBugDlg::CreateIssue(wxString title, wxString body) { body.Replace("\n", "\\n"); // get log file to body - wxString logger_path; - logger_path << GenUtils::GetSamplesDir() << "logger.txt"; + wxString logger_path = GenUtils::GetLoggerPath(); body << "\\n"; diff --git a/GenUtils.cpp b/GenUtils.cpp index 4c5f45081..13b85e188 100644 --- a/GenUtils.cpp +++ b/GenUtils.cpp @@ -2357,8 +2357,17 @@ wxString GenUtils::GetSamplesDir() { #ifdef __WXOSX__ return GetResourceDir(); -#elif __linux__ +#else return GetWebPluginsDir(); +#endif +} + +wxString GenUtils::GetLoggerPath() +{ +#ifdef __WXOSX__ + return GetResourceDir() + "logger.txt"; +#elif __linux__ + return GetWebPluginsDir() + "logger.txt"; #else wxString confDir = wxStandardPaths::Get().GetUserConfigDir(); // Windows: AppData\Roaming\GeoDa @@ -2366,7 +2375,7 @@ wxString GenUtils::GetSamplesDir() if (wxDirExists(geodaUserDir) == false) { wxFileName::Mkdir(geodaUserDir); } - return geodaUserDir; + return geodaUserDir + wxFileName::GetPathSeparator() + "logger.txt"; #endif } diff --git a/GenUtils.h b/GenUtils.h index 0abb17607..af3590337 100644 --- a/GenUtils.h +++ b/GenUtils.h @@ -458,6 +458,7 @@ namespace GenUtils { wxString GetBasemapDir(); wxString GetCachePath(); wxString GetLangSearchPath(); + wxString GetLoggerPath(); bool less_vectors(const vector& a,const vector& b); bool smaller_pair(const std::pair& a, diff --git a/GeoDa.cpp b/GeoDa.cpp index cc0f49339..55b969ae3 100644 --- a/GeoDa.cpp +++ b/GeoDa.cpp @@ -401,7 +401,7 @@ bool GdaApp::OnInit(void) welcome_pos.y += 150; // Setup new Logger after crash check - wxString loggerFile = GenUtils::GetSamplesDir() +"logger.txt"; + wxString loggerFile = GenUtils::GetLoggerPath(); if (m_pLogFile == NULL) { #ifdef __WIN32__ From f7a0a6a7e63ac49b75559566b19a55f652ca1768 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 17 Sep 2021 14:42:31 -0700 Subject: [PATCH 12/12] Update GeoDa-win7+.iss --- .../windows/installer/32bit/GeoDa-win7+.iss | 123 +++++++++--------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/BuildTools/windows/installer/32bit/GeoDa-win7+.iss b/BuildTools/windows/installer/32bit/GeoDa-win7+.iss index 1485c80a6..c29628400 100644 --- a/BuildTools/windows/installer/32bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/32bit/GeoDa-win7+.iss @@ -6,12 +6,12 @@ AppSupportURL=https://spatial.uchiago.edu/ AppUpdatesURL=https://spatial.uchiago.edu/ AppSupportPhone=(480)965-7533 AppVersion=1.20 -DefaultDirName={localappdata}\GeoDa +DefaultDirName={pf}\GeoDa DefaultGroupName=GeoDa Software ; Since no icons will be created in "{group}", we don't need the wizard ; to ask for a Start Menu folder name: ;DisableProgramGroupPage=yes -UninstallDisplayIcon={localappdata}\GeoDa\GeoDa.exe +UninstallDisplayIcon={app}\GeoDa.exe Compression=lzma2 SolidCompression=yes OutputDir=..\.. @@ -26,75 +26,76 @@ ShowLanguageDialog=yes Name: "en"; MessagesFile: "compiler:Default.isl" [dirs] -Name: "{localappdata}\GeoDa"; Permissions: users-full; Check: InitializeSetup -Name: "{localappdata}\GeoDa\basemap_cache"; Permissions: users-full -Name: "{localappdata}\GeoDa\lang"; Permissions: users-full -Name: "{localappdata}\GeoDa\proj"; Permissions: users-full +Name: "{app}"; Check: InitializeSetup +Name: "{userappdata}\GeoDa\basemap_cache"; Permissions: users-modify +Name: "{userappdata}\GeoDa\lang"; Permissions: users-modify [Files] -Source: "..\..\Release\GeoDa.exe"; DestDir: "{localappdata}\GeoDa"; DestName: "GeoDa.exe" -Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{localappdata}\GeoDa\web_plugins"; Flags: recursesubdirs -Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{localappdata}\GeoDa\proj"; Flags: recursesubdirs - - -Source: "VC_redist.x86.exe"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\temp\OpenCL\sdk\bin\x86\OpenCL.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\temp\wxWidgets\lib\vc_dll\wxmsw314u_vc_custom.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\temp\wxWidgets\lib\vc_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\expat.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\geos.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libcrypto-1_1.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libssl-1_1.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\proj.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{localappdata}\GeoDa" -Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{localappdata}\GeoDa\lang"; Flags: recursesubdirs -Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{localappdata}\GeoDa\data"; Flags: recursesubdirs - -;Source: "Readme.txt"; DestDir: "{localappdata}\GeoDa"; Flags: isreadme +Source: "..\..\Release\GeoDa.exe"; DestDir: "{app}"; DestName: "GeoDa.exe" +Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{userappdata}\GeoDa" +Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{app}" +Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{app}\web_plugins"; Flags: recursesubdirs +Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{app}\proj"; Flags: recursesubdirs + + +Source: "VC_redist.x86.exe"; DestDir: "{app}" +Source: "..\..\temp\OpenCL\sdk\bin\x86\OpenCL.dll"; DestDir: "{app}" +Source: "..\..\temp\wxWidgets\lib\vc_dll\wxmsw314u_vc_custom.dll"; DestDir: "{app}" +Source: "..\..\temp\wxWidgets\lib\vc_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\expat.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\geos.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libcrypto-1_1.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libssl-1_1.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\proj.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{app}" +Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{app}" +Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}" +Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs +Source: "..\..\..\..\internationalization\lang\config.ini"; DestDir: "{userappdata}\GeoDa\lang" +Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{app}\data"; Flags: recursesubdirs + +;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme [Icons] -Name: "{group}\GeoDa"; Filename: "{localappdata}\GeoDa\GeoDa.exe" -;Name: "{group}\GeoDa"; Filename: "{localappdata}\GeoDa\run_geoda.bat"; IconFilename: "{localappdata}\GeoDa\GeoDa.ico" +Name: "{group}\GeoDa"; Filename: "{app}\GeoDa.exe" +;Name: "{group}\GeoDa"; Filename: "{app}\run_geoda.bat"; IconFilename: "{app}\GeoDa.ico" Name: "{group}\Uninstall"; Filename: "{uninstallexe}" -Name: "{commondesktop}\GeoDa"; Filename: "{localappdata}\GeoDa\GeoDa.exe" -;Name: "{commondesktop}\GeoDa"; Filename: "{localappdata}\GeoDa\run_geoda.bat"; IconFilename: "{localappdata}\GeoDa\GeoDa.ico" +Name: "{commondesktop}\GeoDa"; Filename: "{app}\GeoDa.exe" +;Name: "{commondesktop}\GeoDa"; Filename: "{app}\run_geoda.bat"; IconFilename: "{app}\GeoDa.ico" [Registry] ; set PATH ; set GEODA_GDAL_DATA -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{localappdata}\GeoDa\data"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{app}\data"; Flags: preservestringtype uninsdeletevalue ; set GEODA_OGR_DRIVER_PATH -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{localappdata}\GeoDa"; Flags: preservestringtype uninsdeletevalue -Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{localappdata}\GeoDa\proj"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{app}"; Flags: preservestringtype uninsdeletevalue +Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{app}\proj"; Flags: preservestringtype uninsdeletevalue Root: HKCR; Subkey: ".gda"; ValueType: string; ValueName: ""; ValueData: "GeoDaProjectFile"; Flags: uninsdeletevalue Root: HKCR; Subkey: "GeoDaProjectFile"; ValueType: string; ValueName: ""; ValueData: "GeoDa Project File"; Flags: uninsdeletekey -Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{localappdata}\GeoDa\GeoDa.exe,0" -Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{localappdata}\GeoDa\GeoDa.exe"" ""%1""" +Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\GeoDa.exe,0" +Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\GeoDa.exe"" ""%1""" ; set Browser Emulation for wxWebView to IE 11. IE 10 or earlier does not work with current D3 Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName:"GeoDa.exe"; ValueData:"$2AF9" @@ -103,7 +104,7 @@ Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\ Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "GeoDa.exe"; ValueData: "$2AF9" ;run as admin -;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{localappdata}\GeoDa\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 +;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1 [Code] function IsX64: Boolean; @@ -228,7 +229,7 @@ begin end; [INI] -Filename: "{localappdata}\GeoDa\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{localappdata}\GeoDa} +Filename: "{userappdata}\GeoDa\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{userappdata}\GeoDa} [Run] -Filename: {localappdata}\GeoDa\VC_redist.x86.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall +Filename: {app}\VC_redist.x86.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall