Skip to content

Commit

Permalink
update build scripts on CentOS; update drawing code to avoid black ba…
Browse files Browse the repository at this point in the history
…ckground on centos
  • Loading branch information
lixun910 committed Mar 6, 2017
1 parent 9e5b518 commit 56ce467
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion BuildTools/centos/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ build-geoda-mac:
cp run.sh build/run.sh
chmod +x build/run.sh
cp GeoDa.desktop build/GeoDa.desktop
cp $(GeoDa_ROOT)/BuildTools/CommonDistFiles/cache.sqlite build/web_plugins/cache.sqlite
cp $(GeoDa_ROOT)/BuildTools/CommonDistFiles/cache.sqlite build/cache.sqlite
cp -rf $(GeoDa_ROOT)/BuildTools/CommonDistFiles/web_plugins/* build/web_plugins/
cp $(GeoDa_ROOT)/BuildTools/CommonDistFiles/GeoDa.png build/GeoDa.png
cp $(GeoDa_ROOT)/rc/data_viewer_dialogs.xrc build/Resources
Expand Down
4 changes: 2 additions & 2 deletions BuildTools/centos/build64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ echo "% Building wxWidgets 3.0.2 %"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
# sudo apt-get install libgtk2.0-dev libglu1-mesa-dev libgl1-mesa-dev
{
LIB_NAME=wxWidgets-3.0.2
LIB_URL="https://dl.dropboxusercontent.com/u/145979/geoda_libraries/wxWidgets-3.0.2.tar.bz2"
LIB_NAME=wxWidgets-3.1.0
LIB_URL="https://dl.dropboxusercontent.com/u/145979/geoda_libraries/wxWidgets-3.1.0.tar.bz2"

LIB_FILENAME=$(basename "$LIB_URL" ".tar")
LIB_CHECKER=wx-config
Expand Down
6 changes: 5 additions & 1 deletion BuildTools/centos/create_rpm.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/bin/bash

rm *.rpm
cp rpmmacros ~/.rpmmacros
rm -rf rpm/
cp -rf rpm_template/ rpm/
mkdir rpm/SOURCES
cp -rf build/ rpm/SOURCES/
mv rpm/SOURCES/build rpm/SOURCES/GeoDa-1.8
rm -r rpm/SOURCES/GeoDa-1.8/web_plugins/d3
cd rpm/SOURCES/
tar czf geoda.tar.gz GeoDa-1.8/
cd ..
rpmbuild -ba SPECS/GeoDa.spec

mv RPMS/x86_64/*.rpm ../
8 changes: 5 additions & 3 deletions BuildTools/centos/rpm_template/SPECS/GeoDa.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ install -m 0766 -d $RPM_BUILD_ROOT/usr/local/GeoDa/plugins
install -m 0766 -d $RPM_BUILD_ROOT/usr/local/GeoDa/gdaldata
install -m 0766 -d $RPM_BUILD_ROOT/usr/local/GeoDa/web_plugins
install -m 0755 run.sh $RPM_BUILD_ROOT/usr/local/GeoDa/run.sh
install -m 0755 cache.sqlite $RPM_BUILD_ROOT/usr/local/GeoDa/cache.sqlite
install -m 0755 GeoDa $RPM_BUILD_ROOT/usr/local/GeoDa/GeoDa
install -m 0755 GeoDa.png $RPM_BUILD_ROOT/usr/local/GeoDa/GeoDa.png
install -m 0755 Resources/* $RPM_BUILD_ROOT/usr/local/GeoDa/Resources/
Expand All @@ -45,9 +46,10 @@ install -m 0755 GeoDa.desktop $RPM_BUILD_ROOT/usr/share/applications/GeoDa.deskt
/usr/local/GeoDa/Resources/*
/usr/local/GeoDa/plugins/*
/usr/local/GeoDa/gdaldata/*
%attr(0767, root, root) /usr/local/GeoDa/basemap_cache/
%attr(0767, root, root) /usr/local/GeoDa/web_plugins/
%attr(0767, root, root) /usr/local/GeoDa/web_plugins/cache.sqlite
/usr/local/GeoDa/web_plugins/*
%attr(0767, -, -) /usr/local/GeoDa/basemap_cache/
%attr(0767, -, -) /usr/local/GeoDa/web_plugins/
%attr(0767, -, -) /usr/local/GeoDa/cache.sqlite

%doc

Expand Down
3 changes: 3 additions & 0 deletions BuildTools/centos/rpmmacros
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
%packager xunli
%_topdir /home/xun/geoda_trunk/BuildTools/centos/rpm
%_tmppaath /home/xun/geoda_trunk/BuildTools/centos/rpm/tmp
4 changes: 2 additions & 2 deletions Explore/MapNewView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ void MapCanvas::DrawLayer1()
{
alpha[i] = 0;
} else {
alpha[i] = alpha_value;
if (alpha[i] !=0 ) alpha[i] = alpha_value;
}
}

Expand Down Expand Up @@ -641,7 +641,7 @@ void MapCanvas::DrawLayer1()
{
alpha_vals[i] = 0;
} else {
alpha_vals[i] = hl_alpha_value;
if (alpha_vals[i] !=0) alpha_vals[i] = hl_alpha_value;
}
}

Expand Down
2 changes: 1 addition & 1 deletion GeoDamake.centos.opt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LIBS = $(WXLIBS) \
$(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/lib64 -lGL -lGLU -lidn -lrt -lssl -lidn
-L/lib64 -lGL -lGLU -lidn -lrt -lssl -lidn -lwebkitgtk-3.0

BOOST_HEADER = -I$(GEODA_HOME)/libraries/include/boost

Expand Down
2 changes: 1 addition & 1 deletion ShapeOperations/GdaCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ wxString GdaCache::GetFullPath()
wxString exePath = wxStandardPaths::Get().GetExecutablePath();
wxFileName exeFile(exePath);
wxString exeDir = exeFile.GetPathWithSep();
exeDir = exeDir + wxFileName::GetPathSeparator() + "cache.sqlite";
exeDir = exeDir + "cache.sqlite";
return exeDir;
}

Expand Down

0 comments on commit 56ce467

Please sign in to comment.