diff --git a/BuildTools/macosx/GeoDa-GDAL-Info.plist b/BuildTools/macosx/GeoDa-GDAL-Info.plist
index a89de7f08..e49c3081a 100644
--- a/BuildTools/macosx/GeoDa-GDAL-Info.plist
+++ b/BuildTools/macosx/GeoDa-GDAL-Info.plist
@@ -21,9 +21,9 @@
CFBundlePackageType
APPL
CFBundleSignature
- ????
+ io.gitub.geodacenter
CFBundleVersion
- 1.0
+ 1.12
DTCompiler
4.2
DTPlatformBuild
diff --git a/BuildTools/ubuntu/package/DEBIAN/control1804 b/BuildTools/ubuntu/package/DEBIAN/control1804
index 9ca5981ff..2b6ed527c 100644
--- a/BuildTools/ubuntu/package/DEBIAN/control1804
+++ b/BuildTools/ubuntu/package/DEBIAN/control1804
@@ -4,7 +4,7 @@ Architecture: amd64
Priority: optional
Section: graphics
Installed-Size: 88128
-Depends: libgdal-dev, zlib1g, libexpat1, freeglut3, libreadline7, libgtk-3-0, libc-dev-bin, libssl1.0.0, libwebkitgtk-1.0-0
+Depends: libcurl4-openssl-dev, libgdal-dev, zlib1g, libexpat1, freeglut3, libreadline7, libgtk-3-0, libc-dev-bin, libssl1.0.0, libwebkitgtk-1.0-0
Maintainer: Luc Anselin < anselin@uchicago.edu >
Provides: geoda
Homepage: http://spatial.uchicago.edu
diff --git a/BuildTools/windows/installer/32bit/GeoDa.iss b/BuildTools/windows/installer/32bit/GeoDa.iss
index 6b80dbb28..f2076383f 100644
--- a/BuildTools/windows/installer/32bit/GeoDa.iss
+++ b/BuildTools/windows/installer/32bit/GeoDa.iss
@@ -20,10 +20,17 @@ OutputBaseFilename=geoda_setup
ChangesAssociations=yes
+ShowLanguageDialog=yes
+
+[Languages]
+Name: "en"; MessagesFile: "compiler:Default.isl"
+Name: "zh"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
+
[dirs]
Name: "{app}"; Permissions: everyone-full; Check: InitializeSetup
-Name: "{app}\basemap_cache"; Permissions: everyone-full
-Name: "{app}\Examples"; Permissions: everyone-full
+Name: "{app}\Examples"; Permissions: everyone-full
+Name: "{app}\basemap_cache"; Permissions: everyone-full
+Name: "{app}\lang"; Permissions: everyone-full
[Files]
Source: "..\..\Release\GeoDa.exe"; DestDir: "{app}"; DestName: "GeoDa.exe"
@@ -61,9 +68,7 @@ Source: "..\..\temp\boost_1_57_0\stage\lib\boost_system-vc100-mt-1_57.dll"; Dest
Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}"
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs
-Source: "..\..\..\..\SampleData\Examples\*"; DestDir: "{app}\Examples"; Flags: recursesubdirs uninsneveruninstall
-
-
+Source: "..\..\..\..\SampleData\Examples\*"; DestDir: "{app}\Examples"; Flags: recursesubdirs
Source: "..\..\temp\gdal\data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
@@ -75,7 +80,6 @@ Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
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
diff --git a/BuildTools/windows/installer/64bit/GeoDa.iss b/BuildTools/windows/installer/64bit/GeoDa.iss
index d85bcf50a..7de8d1ca1 100644
--- a/BuildTools/windows/installer/64bit/GeoDa.iss
+++ b/BuildTools/windows/installer/64bit/GeoDa.iss
@@ -64,11 +64,11 @@ Source: "..\..\run_geoda.bat"; DestDir: "{app}"
Source: "..\..\Release\sqlite.dll"; DestDir: "{app}"
Source: "..\..\temp\curl-7.46.0\builds\curlib\bin\libcurl.dll"; DestDir: "{app}"
Source: "..\..\temp\expat-2.1.0\build\Release\expat.dll"; DestDir: "{app}"
+Source: "..\..\temp\gdal\gdal_geoda20.dll"; DestDir: "{app}"
Source: "..\..\temp\libspatialite-4.0.0\spatialite.dll"; DestDir: "{app}"
Source: "..\..\temp\geos-3.3.8\src\geos_c.dll"; DestDir: "{app}"
Source: "..\..\temp\freexl-1.0.0e\freexl.dll"; DestDir: "{app}"
Source: "..\..\temp\proj-4.8.0\src\proj.dll"; DestDir: "{app}"
-Source: "..\..\temp\gdal\gdal_geoda20.dll"; DestDir: "{app}"
Source: "..\..\temp\pgsql\lib\libpq.dll"; DestDir: "{app}"
Source: "..\..\temp\pgsql\bin\ssleay32.dll"; DestDir: "{app}"
Source: "..\..\temp\pgsql\bin\libintl-8.dll"; DestDir: "{app}"
diff --git a/DialogTools/KMeansDlg.cpp b/DialogTools/KMeansDlg.cpp
index aea0e9655..526e5ec64 100644
--- a/DialogTools/KMeansDlg.cpp
+++ b/DialogTools/KMeansDlg.cpp
@@ -84,11 +84,10 @@ void KClusterDlg::CreateControls()
wxStaticText* st1 = new wxStaticText(panel, wxID_ANY,
_("Number of Clusters:"),
wxDefaultPosition, wxSize(128,-1));
- combo_n = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxSize(200,-1), 0, NULL);
- max_n_clusters = num_obs < 60 ? num_obs : 60;
+ combo_n = new wxComboBox(panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(200,-1), 0, NULL);
+ max_n_clusters = num_obs < 100 ? num_obs : 100;
for (int i=2; iAppend(wxString::Format("%d", i));
- combo_n->SetSelection(3);
gbox->Add(st1, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxLEFT, 10);
gbox->Add(combo_n, 1, wxEXPAND);
@@ -464,7 +463,19 @@ bool KClusterDlg::Run(vector& clusters)
resetrandom();
}
- int ncluster = combo_n->GetSelection() + 2;
+ int ncluster = 0;
+ wxString str_ncluster = combo_n->GetValue();
+ long value_ncluster;
+ if (str_ncluster.ToLong(&value_ncluster)) {
+ ncluster = value_ncluster;
+ }
+ if (ncluster < 2 || ncluster > num_obs) {
+ wxString err_msg = _("Please enter a valid number of clusters.");
+ wxMessageDialog dlg(NULL, err_msg, _("Error"), wxOK | wxICON_ERROR);
+ dlg.ShowModal();
+ return false;
+ }
+
int transform = combo_tranform->GetSelection();
if (!GetInputData(transform,1))
diff --git a/DialogTools/KMeansDlg.h b/DialogTools/KMeansDlg.h
index 01dc5dc93..d538e37df 100644
--- a/DialogTools/KMeansDlg.h
+++ b/DialogTools/KMeansDlg.h
@@ -24,7 +24,7 @@
#include