From e68923e27a06098d08614dc8150aebe2a45266cf Mon Sep 17 00:00:00 2001 From: Xun Li Date: Tue, 31 May 2016 15:12:29 -0700 Subject: [PATCH 1/8] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 37a324958..256d14132 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,18 @@ GeoDa is the flagship program of the GeoDa Center, following a long line of soft Since its initial release in February 2003, GeoDa's user numbers have increased exponentially, as the chart and map of global users above shows. This includes lab users at universities such as Harvard, MIT, and Cornell. The user community and press embraced the program enthusiastically, calling it a "hugely important analytic tool," a "very fine piece of software," an "exciting development" and more. +# Build GeoDa # + +Please read the detail instructions under directory BuildTools/ + +[Windows](BuildTools/windows/readme.md) + +[Mac OSX](BuildTools/macosx/readme.md) + +[Linux/Ubuntu](BuildTools/ubuntu/readme.md) + +Note: contributions of build scripts under other platforms are welcomed, please follow the structure of building script under BuildTools/. + # Dependencies # Below is a list of some of these that we'd like to acknowledge. From 4a54d809daa8db7f964b67f9b22972a4ab1e77d9 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 9 Jun 2016 10:32:26 -0700 Subject: [PATCH 2/8] #440 adjust order of periods --- Explore/LineChartView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Explore/LineChartView.cpp b/Explore/LineChartView.cpp index 54a0e0496..eda2a522e 100644 --- a/Explore/LineChartView.cpp +++ b/Explore/LineChartView.cpp @@ -598,7 +598,7 @@ void LineChartFrame::OnGroup1Choice(wxCommandEvent& event) if (time1_selection -1 >=0) choice_time1->SetSelection(time1_selection-1); else if (time1_selection + 1 < choice_time1->GetCount()) { - choice_time1->SetSelection(time1_selection+1); + choice_time2->SetSelection(time1_selection+1); } else { choice_time1->SetSelection(-1); } @@ -632,7 +632,7 @@ void LineChartFrame::OnGroup2Choice(wxCommandEvent& event) } else { if (time2_selection == time1_selection) { if (time2_selection -1 >=0) - choice_time2->SetSelection(time2_selection-1); + choice_time1->SetSelection(time2_selection-1); else if (time2_selection + 1 < choice_time2->GetCount()) { choice_time2->SetSelection(time2_selection+1); } else { From 77cd8a6fb78c2b304b7f7caa6ef169d70e0a66fc Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 9 Jun 2016 10:36:05 -0700 Subject: [PATCH 3/8] #411 truncated "unselected" --- Explore/LineChartView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Explore/LineChartView.cpp b/Explore/LineChartView.cpp index eda2a522e..c81fc6aa1 100644 --- a/Explore/LineChartView.cpp +++ b/Explore/LineChartView.cpp @@ -124,10 +124,10 @@ has_excluded(1) wxStaticText* lbl_variable =new wxStaticText(lpanel, wxID_ANY, "Variable:"); choice_variable = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition, - wxSize(220, -1)); + wxSize(230, -1)); wxStaticText* lbl_groups =new wxStaticText(lpanel, wxID_ANY, "Groups:"); choice_groups = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition, - wxSize(220, -1)); + wxSize(230, -1)); variable_sizer->Add(lbl_variable, 1, wxEXPAND); variable_sizer->Add(choice_variable, 1, wxEXPAND); variable_sizer->Add(lbl_groups, 1, wxEXPAND); @@ -142,13 +142,13 @@ has_excluded(1) wxStaticText* lbl_group1 =new wxStaticText(lpanel, wxID_ANY, "Group 1:"); choice_group1 = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition, - wxSize(80, -1)); + wxSize(90, -1)); wxStaticText* lbl_time1 =new wxStaticText(lpanel, wxID_ANY, "Period 1:"); choice_time1 = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition, wxSize(80, -1)); wxStaticText* lbl_group2 =new wxStaticText(lpanel, wxID_ANY, "Group 2:"); choice_group2 = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition, - wxSize(80, -1)); + wxSize(90, -1)); wxStaticText* lbl_time2 =new wxStaticText(lpanel, wxID_ANY, "Period 2:"); choice_time2 = new wxChoice(lpanel,wxID_ANY, wxDefaultPosition, wxSize(80, -1)); From 8b13218cb26f040a0594e68cd5131bf90efd72dc Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 9 Jun 2016 10:36:36 -0700 Subject: [PATCH 4/8] update version 1.8.7.11 --- version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.h b/version.h index 4fb377c80..e98aa7c7b 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ namespace Gda { const int version_major = 1; const int version_minor = 8; const int version_build = 7; - const int version_subbuild = 9; + const int version_subbuild = 11; const int version_year = 2016; const int version_month = 5; const int version_day = 26; From ce0952c96d27c17ec61eaf833d113d971a6fcbcb Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 9 Jun 2016 11:40:55 -0700 Subject: [PATCH 5/8] #444 avg chart crashes with empty table --- Explore/LineChartView.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Explore/LineChartView.cpp b/Explore/LineChartView.cpp index c81fc6aa1..bbf44a609 100644 --- a/Explore/LineChartView.cpp +++ b/Explore/LineChartView.cpp @@ -445,6 +445,9 @@ void LineChartFrame::OnApplyButton(wxCommandEvent &event) void LineChartFrame::OnVariableChoice(wxCommandEvent& event) { int variable_selection = choice_variable->GetSelection(); + if (variable_selection < 0 ) + return; + wxString col_name = variable_names[variable_selection]; TableInterface* table_int = project->GetTableInt(); @@ -560,6 +563,9 @@ void LineChartFrame::OnTime2Choice(wxCommandEvent& event) void LineChartFrame::OnGroupsChoice(wxCommandEvent& event) { int variable_selection = choice_variable->GetSelection(); + if (variable_selection < 0) + return; + wxString col_name = variable_names[variable_selection]; TableInterface* table_int = project->GetTableInt(); @@ -580,6 +586,9 @@ void LineChartFrame::OnGroupsChoice(wxCommandEvent& event) void LineChartFrame::OnGroup1Choice(wxCommandEvent& event) { int variable_selection = choice_variable->GetSelection(); + if (variable_selection < 0) + return; + wxString col_name = variable_names[variable_selection]; TableInterface* table_int = project->GetTableInt(); @@ -616,6 +625,9 @@ void LineChartFrame::OnGroup1Choice(wxCommandEvent& event) void LineChartFrame::OnGroup2Choice(wxCommandEvent& event) { int variable_selection = choice_variable->GetSelection(); + if (variable_selection < 0) + return; + wxString col_name = variable_names[variable_selection]; TableInterface* table_int = project->GetTableInt(); @@ -822,6 +834,10 @@ void LineChartFrame::OnAdjustYAxisPrecision(wxCommandEvent& event) void LineChartFrame::SaveDataAndResults(bool save_weights, bool save_did, double* m_yhat1, double* m_resid1) { + int variable_selection = choice_variable->GetSelection(); + if (variable_selection < 0 ) + return; + int nTests = var_man.GetVarsCount(); nTests = 1; // only handle one variable at a time @@ -859,7 +875,6 @@ void LineChartFrame::SaveDataAndResults(bool save_weights, bool save_did, int n= 0; - int variable_selection = choice_variable->GetSelection(); wxString col_name = variable_names[variable_selection]; TableInterface* table_int = project->GetTableInt(); From 8a58b3d2b31482a98264583dc824a9feae0608b8 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 9 Jun 2016 11:51:47 -0700 Subject: [PATCH 6/8] #444 fix same crash of correlogram --- Explore/CorrelParamsDlg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Explore/CorrelParamsDlg.cpp b/Explore/CorrelParamsDlg.cpp index 83e679e3d..3107c8fce 100644 --- a/Explore/CorrelParamsDlg.cpp +++ b/Explore/CorrelParamsDlg.cpp @@ -219,6 +219,10 @@ void CorrelParamsFrame::OnHelpBtn(wxCommandEvent& ev) void CorrelParamsFrame::OnApplyBtn(wxCommandEvent& ev) { + int vc_sel = var_choice->GetSelection(); + if (vc_sel < 0) + return; + LOG_MSG("In CorrelParamsFrame::OnApplyBtn"); { long new_bins = bins_spn_ctrl->GetValue(); @@ -295,7 +299,6 @@ void CorrelParamsFrame::OnApplyBtn(wxCommandEvent& ev) bool valid_variable = true; { // update var_man with new selection - int vc_sel = var_choice->GetSelection(); wxString var_nm = var_choice->GetString(vc_sel); TableInterface* table_int = project->GetTableInt(); int col_id = table_int->FindColId(var_nm); From 9ee0bfa2ac0315e35fe7338e39979c5ad7c4f8a4 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Thu, 9 Jun 2016 12:07:58 -0700 Subject: [PATCH 7/8] #443 correlogram disable auto-calc when init correlogram This is a simple fix by disabling the auto-calc when init correlogram. There is no scheme to remember what variable has been selected in other graphs. But will put this feature in next release. --- Explore/CorrelParamsDlg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Explore/CorrelParamsDlg.cpp b/Explore/CorrelParamsDlg.cpp index 3107c8fce..8799c5b05 100644 --- a/Explore/CorrelParamsDlg.cpp +++ b/Explore/CorrelParamsDlg.cpp @@ -360,7 +360,7 @@ void CorrelParamsFrame::OnAllPairsRadioSelected(wxCommandEvent& ev) max_iter_txt->Enable(false); max_iter_tctrl->Enable(false); - OnApplyBtn(ev); + //OnApplyBtn(ev); ev.Skip(); } @@ -375,7 +375,7 @@ void CorrelParamsFrame::OnRandSampRadioSelected(wxCommandEvent& ev) max_iter_txt->Enable(true); max_iter_tctrl->Enable(true); - OnApplyBtn(ev); + //OnApplyBtn(ev); ev.Skip(); } From 7f430d7474dc0ad248466326c930660b0fbd1d20 Mon Sep 17 00:00:00 2001 From: lixun910 Date: Fri, 10 Jun 2016 10:44:23 -0600 Subject: [PATCH 8/8] update build scripts on mac osx --- BuildTools/macosx/build.sh | 2 +- GeoDamake.opt | 40 ++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/BuildTools/macosx/build.sh b/BuildTools/macosx/build.sh index c1738413d..ce60027d6 100755 --- a/BuildTools/macosx/build.sh +++ b/BuildTools/macosx/build.sh @@ -441,7 +441,7 @@ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then cd $LIB_NAME if [[ $NODEBUG -eq 1 ]] ; then # no debug - ./configure CC="$GDA_CC" CXX="$GDA_CXX" CFLAGS="$GDA_CFLAGS" CXXFLAGS="$GDA_CXXFLAGS" LDFLAGS="$GDA_LDFLAGS" --with-jpeg=internal --prefix=$PREFIX --with-freexl=$PREFIX --with-libiconv-prefix="-L/usr/lib" --with-sqlite3=$PREFIX --with-spatialite=$PREFIX --with-static-proj4=$PREFIX --with-curl=$PREFIX/bin/curl-config --with-geos=$PREFIX/bin/geos-config --with-libkml=$PREFIX --with-xerces=$PREFIX --with-xerces-inc="$PREFIX/include" --with-xerces-lib="-L$PREFIX/lib -lxerces-c -framework CoreServices" --with-pg=$PREFIX/bin/pg_config --enable-debug + ./configure CC="$GDA_CC" CXX="$GDA_CXX" CFLAGS="$GDA_CFLAGS" CXXFLAGS="$GDA_CXXFLAGS" LDFLAGS="$GDA_LDFLAGS" --with-jpeg=internal --prefix=$PREFIX --with-freexl=$PREFIX --with-libiconv-prefix="-L/usr/lib" --with-sqlite3=$PREFIX --with-spatialite=$PREFIX --with-static-proj4=$PREFIX --with-curl=$PREFIX/bin/curl-config --with-geos=$PREFIX/bin/geos-config --with-libkml=$PREFIX --with-xerces=$PREFIX --with-xerces-inc="$PREFIX/include" --with-xerces-lib="-L$PREFIX/lib -lxerces-c -framework CoreServices" --with-pg=$PREFIX/bin/pg_config else # with debug ./configure CC="$GDA_CC" CXX="$GDA_CXX" CFLAGS="$GDA_CFLAGS" CXXFLAGS="$GDA_CXXFLAGS" LDFLAGS="$GDA_LDFLAGS" --with-jpeg=internal --prefix=$PREFIX --with-freexl=$PREFIX --with-libiconv-prefix="-L/usr/lib" --with-sqlite3=$PREFIX --with-spatialite=$PREFIX --with-static-proj4=$PREFIX --with-curl=$PREFIX/bin/curl-config --with-geos=$PREFIX/bin/geos-config --with-libkml=$PREFIX --with-xerces=$PREFIX --with-xerces-inc="$PREFIX/include" --with-xerces-lib="-L$PREFIX/lib -lxerces-c -framework CoreServices" --with-pg=$PREFIX/bin/pg_config --enable-debug diff --git a/GeoDamake.opt b/GeoDamake.opt index d238de47c..abeb5ac73 100644 --- a/GeoDamake.opt +++ b/GeoDamake.opt @@ -2,35 +2,33 @@ GeoDa_ROOT = $(GEODA_HOME)/../.. TARGET = GeoDa -CC = /usr/bin/gcc -CXX = /usr/bin/g++ -LD = /usr/bin/g++ +CC = gcc +CXX = g++ -Os -arch x86_64 +LD = g++ -arch x86_64 RM = /bin/rm -f -WXLIBS = $(shell $(GEODA_HOME)/libraries/bin/wx-config --libs xrc,stc,richtext,ribbon,propgrid,aui,gl,html,webview,qa,adv,core,xml,net,base) +WXLIBS = $(shell $(GEODA_HOME)/libraries/bin/wx-config --libs xrc,stc,richtext,ribbon,propgrid,aui,gl,html,qa,adv,core,webview,xml,net,base) WX_HEADER = $(shell $(GEODA_HOME)/libraries/bin/wx-config --cppflags) -LIBS = $(WXLIBS) \ - $(GEODA_HOME)/temp/CLAPACK-3.2.1/lapack.a \ - $(GEODA_HOME)/temp/CLAPACK-3.2.1/libf2c.a \ - $(GEODA_HOME)/temp/CLAPACK-3.2.1/blas.a \ - $(GEODA_HOME)/temp/CLAPACK-3.2.1/tmglib.a \ - $(GEODA_HOME)/libraries/include/boost/stage/lib/libboost_thread.a \ - $(GEODA_HOME)/libraries/include/boost/stage/lib/libboost_system.a \ - $(GEODA_HOME)/libraries/lib/libjson_spirit.a \ - -L$(GEODA_HOME)/libraries/lib -lgdal -lcurl -lcares \ - -L/usr/lib/x86_64-linux-gnu -lGL -lGLU -lglut -lrt -lidn -lssl -lrtmp -# Note: Library -lrtmp causes a missing library problem at runtime on -# Ubuntu 14.10 and later. +LIBS = $(WXLIBS) \ + $(GEODA_HOME)/temp/CLAPACK-3.2.1/blas.a \ + $(GEODA_HOME)/temp/CLAPACK-3.2.1/F2CLIBS/libf2c.a \ + $(GEODA_HOME)/temp/CLAPACK-3.2.1/lapack.a \ + -L/usr/lib -liconv \ + -L$(GEODA_HOME)/libraries/lib -lgdal -lcurl \ + $(GEODA_HOME)/libraries/include/boost/stage/lib/libboost_thread.a \ + $(GEODA_HOME)/libraries/include/boost/stage/lib/libboost_system.a \ + $(GEODA_HOME)/libraries/lib/libjson_spirit.a + BOOST_HEADER = -I$(GEODA_HOME)/libraries/include/boost -GDAL_HEADER = -I$(GEODA_HOME)/libraries/include -I/usr/include +GDAL_HEADER = -I$(GEODA_HOME)/libraries/include -CPPFLAGS = -I$(GeoDa_ROOT) -CFLAGS = -O2 -Wdeclaration-after-statement $(USER_DEFS) $(GDAL_HEADER) -CXXFLAGS = -O2 $(USER_DEFS) $(WX_HEADER) $(BOOST_HEADER) $(GDAL_HEADER) -LDFLAGS = +CPPFLAGS = -I$(GeoDa_ROOT) $(USER_LOG) +CFLAGS = -Os -arch x86_64 -Wall -Wdeclaration-after-statement $(USER_DEFS) $(GDAL_HEADER) +CXXFLAGS = -Os -arch x86_64 -Wall $(USER_DEFS) $(WX_HEADER) $(BOOST_HEADER) $(GDAL_HEADER) +LDFLAGS = -arch x86_64 OBJ_EXT = o