diff --git a/BuildTools/windows/installer/32bit/GeoDa-win7+.iss b/BuildTools/windows/installer/32bit/GeoDa-win7+.iss index 7c94e2cb2..36682e567 100644 --- a/BuildTools/windows/installer/32bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/32bit/GeoDa-win7+.iss @@ -73,6 +73,8 @@ Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{ Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}" Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{userappdata}\GeoDa\lang"; Flags: recursesubdirs Source: "..\..\..\..\internationalization\lang\config.ini"; DestDir: "{userappdata}\GeoDa\lang" +; Add lang data back to {app} so they can be copied to other new windows users +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 diff --git a/BuildTools/windows/installer/32bit/GeoDa.iss b/BuildTools/windows/installer/32bit/GeoDa.iss index cb92c9ac7..be2540c8b 100644 --- a/BuildTools/windows/installer/32bit/GeoDa.iss +++ b/BuildTools/windows/installer/32bit/GeoDa.iss @@ -72,6 +72,8 @@ 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 +; Add lang data back to {app} so they can be copied to other new windows users +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 diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index 11bdcbeae..ba8d8b90c 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -86,6 +86,8 @@ Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{ Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}" Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{userappdata}\GeoDa\lang"; Flags: recursesubdirs Source: "..\..\..\..\internationalization\lang\config.ini"; DestDir: "{userappdata}\GeoDa\lang" +; Add lang data back to {app} so they can be copied to other new windows users +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 diff --git a/BuildTools/windows/installer/64bit/GeoDa.iss b/BuildTools/windows/installer/64bit/GeoDa.iss index 2467aaca6..d8e9b9690 100644 --- a/BuildTools/windows/installer/64bit/GeoDa.iss +++ b/BuildTools/windows/installer/64bit/GeoDa.iss @@ -85,6 +85,8 @@ 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 +; Add lang data back to {app} so they can be copied to other new windows users +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 diff --git a/DialogTools/PreferenceDlg.cpp b/DialogTools/PreferenceDlg.cpp index b095ea11c..567282b52 100644 --- a/DialogTools/PreferenceDlg.cpp +++ b/DialogTools/PreferenceDlg.cpp @@ -924,7 +924,7 @@ void PreferenceDlg::OnChooseLanguage(wxCommandEvent& ev) OGRDataAdapter::GetInstance().AddEntry("gda_ui_language", sel_str); // also update the lang/config.ini content - wxString configPath = GenUtils::GetLangSearchPath() + wxFileName::GetPathSeparator() + "config.ini"; + wxString configPath = GenUtils::GetLangConfigPath() + wxFileName::GetPathSeparator() + "config.ini"; wxConfigBase * config = new wxFileConfig("GeoDa", wxEmptyString, configPath); if (lan_sel > 0) { diff --git a/GenUtils.cpp b/GenUtils.cpp index 0f8078d8a..d649f2214 100644 --- a/GenUtils.cpp +++ b/GenUtils.cpp @@ -2459,7 +2459,7 @@ wxString GenUtils::GetCachePath() #endif } -wxString GenUtils::GetLangSearchPath() +wxString GenUtils::GetLangConfigPath() { #ifdef __linux__ wxString search_path = GetExeDir() + wxFileName::GetPathSeparator() + "lang"; @@ -2485,3 +2485,14 @@ wxString GenUtils::GetLangSearchPath() return search_path; } + +wxString GenUtils::GetLangSearchPath() +{ +#ifdef __WXMAC__ + wxString search_path = GetExeDir() + "/../Resources/lang"; +#else + wxString search_path = GetExeDir() + wxFileName::GetPathSeparator() + "lang"; +#endif + + return search_path; +} diff --git a/GenUtils.h b/GenUtils.h index af3590337..8be4821e8 100644 --- a/GenUtils.h +++ b/GenUtils.h @@ -458,6 +458,7 @@ namespace GenUtils { wxString GetBasemapDir(); wxString GetCachePath(); wxString GetLangSearchPath(); + wxString GetLangConfigPath(); wxString GetLoggerPath(); bool less_vectors(const vector& a,const vector& b); diff --git a/GeoDa.cpp b/GeoDa.cpp index 82b58d62c..2c50031be 100644 --- a/GeoDa.cpp +++ b/GeoDa.cpp @@ -275,9 +275,8 @@ bool GdaApp::OnInit(void) // search_path is the ./lang directory // config_path it the exe directory (every user will have a different config file?) wxString search_path = GenUtils::GetLangSearchPath(); - + wxString config_path = GenUtils::GetLangConfigPath() + wxFileName::GetPathSeparator()+ "config.ini"; // load language from lang/config.ini if user specified any - wxString config_path = search_path + wxFileName::GetPathSeparator()+ "config.ini"; bool use_native_config = false; m_TranslationHelper = new wxTranslationHelper(*this, search_path, use_native_config); m_TranslationHelper->SetConfigPath(config_path); diff --git a/version.h b/version.h index fc2128213..7a996533c 100644 --- a/version.h +++ b/version.h @@ -2,10 +2,10 @@ namespace Gda { const int version_major = 1; const int version_minor = 20; const int version_build = 0; - const int version_subbuild = 10; + const int version_subbuild = 12; const int version_year = 2022; - const int version_month = 2; - const int version_day = 5; + const int version_month = 4; + const int version_day = 10; const int version_night = 0; const int version_type = 2; // 0: alpha, 1: beta, 2: release }