Skip to content

Commit f0b09b8

Browse files
authored
Fix win installer for multiusers (#2379)
1 parent 67df3a9 commit f0b09b8

File tree

9 files changed

+26
-7
lines changed

9 files changed

+26
-7
lines changed

BuildTools/windows/installer/32bit/GeoDa-win7+.iss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{
7373
Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}"
7474
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{userappdata}\GeoDa\lang"; Flags: recursesubdirs
7575
Source: "..\..\..\..\internationalization\lang\config.ini"; DestDir: "{userappdata}\GeoDa\lang"
76+
; Add lang data back to {app} so they can be copied to other new windows users
77+
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs
7678
Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
7779

7880
;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme

BuildTools/windows/installer/32bit/GeoDa.iss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDi
7272
Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{app}"
7373
Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}"
7474
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs
75+
; Add lang data back to {app} so they can be copied to other new windows users
76+
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs
7577
Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
7678

7779
;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme

BuildTools/windows/installer/64bit/GeoDa-win7+.iss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{
8686
Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}"
8787
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{userappdata}\GeoDa\lang"; Flags: recursesubdirs
8888
Source: "..\..\..\..\internationalization\lang\config.ini"; DestDir: "{userappdata}\GeoDa\lang"
89+
; Add lang data back to {app} so they can be copied to other new windows users
90+
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs
8991
Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
9092

9193
;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme

BuildTools/windows/installer/64bit/GeoDa.iss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDi
8585
Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{app}"
8686
Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}"
8787
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs
88+
; Add lang data back to {app} so they can be copied to other new windows users
89+
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs
8890
Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
8991

9092
;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme

DialogTools/PreferenceDlg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ void PreferenceDlg::OnChooseLanguage(wxCommandEvent& ev)
924924
OGRDataAdapter::GetInstance().AddEntry("gda_ui_language", sel_str);
925925

926926
// also update the lang/config.ini content
927-
wxString configPath = GenUtils::GetLangSearchPath() + wxFileName::GetPathSeparator() + "config.ini";
927+
wxString configPath = GenUtils::GetLangConfigPath() + wxFileName::GetPathSeparator() + "config.ini";
928928
wxConfigBase * config = new wxFileConfig("GeoDa", wxEmptyString, configPath);
929929

930930
if (lan_sel > 0) {

GenUtils.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2459,7 +2459,7 @@ wxString GenUtils::GetCachePath()
24592459
#endif
24602460
}
24612461

2462-
wxString GenUtils::GetLangSearchPath()
2462+
wxString GenUtils::GetLangConfigPath()
24632463
{
24642464
#ifdef __linux__
24652465
wxString search_path = GetExeDir() + wxFileName::GetPathSeparator() + "lang";
@@ -2485,3 +2485,14 @@ wxString GenUtils::GetLangSearchPath()
24852485

24862486
return search_path;
24872487
}
2488+
2489+
wxString GenUtils::GetLangSearchPath()
2490+
{
2491+
#ifdef __WXMAC__
2492+
wxString search_path = GetExeDir() + "/../Resources/lang";
2493+
#else
2494+
wxString search_path = GetExeDir() + wxFileName::GetPathSeparator() + "lang";
2495+
#endif
2496+
2497+
return search_path;
2498+
}

GenUtils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ namespace GenUtils {
458458
wxString GetBasemapDir();
459459
wxString GetCachePath();
460460
wxString GetLangSearchPath();
461+
wxString GetLangConfigPath();
461462
wxString GetLoggerPath();
462463

463464
bool less_vectors(const vector<int>& a,const vector<int>& b);

GeoDa.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,8 @@ bool GdaApp::OnInit(void)
275275
// search_path is the ./lang directory
276276
// config_path it the exe directory (every user will have a different config file?)
277277
wxString search_path = GenUtils::GetLangSearchPath();
278-
278+
wxString config_path = GenUtils::GetLangConfigPath() + wxFileName::GetPathSeparator()+ "config.ini";
279279
// load language from lang/config.ini if user specified any
280-
wxString config_path = search_path + wxFileName::GetPathSeparator()+ "config.ini";
281280
bool use_native_config = false;
282281
m_TranslationHelper = new wxTranslationHelper(*this, search_path, use_native_config);
283282
m_TranslationHelper->SetConfigPath(config_path);

version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ namespace Gda {
22
const int version_major = 1;
33
const int version_minor = 20;
44
const int version_build = 0;
5-
const int version_subbuild = 10;
5+
const int version_subbuild = 12;
66
const int version_year = 2022;
7-
const int version_month = 2;
8-
const int version_day = 5;
7+
const int version_month = 4;
8+
const int version_day = 10;
99
const int version_night = 0;
1010
const int version_type = 2; // 0: alpha, 1: beta, 2: release
1111
}

0 commit comments

Comments
 (0)