diff options
| -rw-r--r-- | config.h | 2 | ||||
| -rwxr-xr-x | packaging/linux/build.sh | 50 | ||||
| -rwxr-xr-x | packaging/linux/client.sh | 41 | ||||
| -rwxr-xr-x | packaging/linux/server.sh | 41 | ||||
| -rw-r--r-- | src/base/main.c | 2 | ||||
| -rw-r--r-- | src/screen/screen_credits.c | 4 |
6 files changed, 54 insertions, 86 deletions
@@ -1 +1 @@ -#define TUXANCI_NG_VERSION "svn168" +#define TUXANCI_NG_VERSION "svn169" diff --git a/packaging/linux/build.sh b/packaging/linux/build.sh new file mode 100755 index 0000000..c075d70 --- /dev/null +++ b/packaging/linux/build.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +echo "*** GNU/Linux Binary Packager ***" + +if [ ! $1 ]; then + echo "usage: $0 -v version -s" + echo "eg.: \"$0 -v 0.4.0 -s\" will compile server without -s compile client" + exit 1 +fi +SRV="" +SRV_NAM="" +while getopts v:s arg +do + case $arg in + v) VERSION=${OPTARG};; + s) SRV="-DServer=1"; SRV_NAM="server-";; + *) echo "no arguments!"; exit 1;; + esac +done + +INSTALL_DIR="pkgs/tuxanci-${SRV_NAM}${VERSION}-linux" +BUILD_DIR="pkgs/build/" +SVN='https://opensvn.csie.org/tuxanci_ng/' +log='linux.log' +error="Error! See pkgs/${log} for more iformation" +mkdir -p pkgs/tuxanci-${SRV_NAM}${VERSION}-linux || ( echo $error; exit 1 ) +touch pkgs/${log} || ( echo $error; exit 1 ) +echo "" > pkgs/${log} || ( echo $error; exit 1 ) + +rm -rfv $INSTALL_DIR $BUILD_DIR > pkgs/"${log}" || ( echo $error; exit 1 ) + +echo "* Fetching files from SVN" +svn export $SVN $BUILD_DIR >> pkgs/"${log}" || ( echo $error; exit 1 ) + +echo "* Configuring" +echo "#define TUXANCI_NG_VERSION \"${VERSION}\"" > $BUILD_DIR/config.h || ( echo $error; exit 1 ) + +echo "* Compiling" +prevdir=`pwd` +cd $BUILD_DIR +cmake . -DPREFIX=\\\"..\\\" -DCMAKE_INSTALL_PREFIX:PATH="${prevdir}/${INSTALL_DIR}" ${SRV} -DLIBDIR=\\\"../lib/\\\" >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) +make >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) +sudo make install >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) +cd $prevdir + +echo "* Packaging" +tar cjf "${INSTALL_DIR}".tar.bz2 $INSTALL_DIR || ( echo $error; exit 1 ) + +echo "** GNU/Linux binary package is ready!" + diff --git a/packaging/linux/client.sh b/packaging/linux/client.sh deleted file mode 100755 index 480caf0..0000000 --- a/packaging/linux/client.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -echo "*** GNU/Linux Binary Packager ***" - -if [ ! $1 ]; then - echo "usage: $0 version" - exit 1 -fi - -VERSION=$1 -INSTALL_DIR="pkgs/tuxanci-${VERSION}-linux" -BUILD_DIR="pkgs/tuxanci-${VERSION}-linux-build" -SVN='https://opensvn.csie.org/tuxanci_ng/' -log='linux.log' -error="Error! See pkgs/${log} for more iformation" - -2&>1 - -rm -rfv $INSTALL_DIR $BUILD_DIR > pkgs/"${log}" || ( echo $error; exit 1 ) - -mkdir -pv pkgs >> pkgs/"${log}" || ( echo $error; exit 1 ) - -echo "* Fetching files from SVN" -svn export $SVN $BUILD_DIR >> pkgs/"${log}" || ( echo $error; exit 1 ) - -echo "* Configuring" -echo "#define TUXANCI_NG_VERSION \"${VERSION}\"" > $BUILD_DIR/config.h || ( echo $error; exit 1 ) - -echo "* Compiling" -prevdir=`pwd` -cd $BUILD_DIR -cmake . -DPREFIX=\\\".\\\" -DDATADIR=\\\".\\\" -DLIBDIR=\\\"./modules\\\" -DCMAKE_INSTALL_PREFIX:PATH=/ -DCMAKE_INSTALL_DATADIR=/ >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) -make >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) -make DESTDIR="${prevdir}/${INSTALL_DIR}" install >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) -cd $prevdir - -echo "* Packaging" -tar cjf "${INSTALL_DIR}".tar.bz2 $INSTALL_DIR || ( echo $error; exit 1 ) - -echo "** GNU/Linux binary package is ready!" - diff --git a/packaging/linux/server.sh b/packaging/linux/server.sh deleted file mode 100755 index cd9414f..0000000 --- a/packaging/linux/server.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -echo "*** GNU/Linux Binary Server Packager ***" - -if [ ! $1 ]; then - echo "usage: $0 version" - exit 1 -fi - -VERSION=$1 -INSTALL_DIR="pkgs/tuxanci-${VERSION}-server" -BUILD_DIR="pkgs/tuxanci-${VERSION}-server-build" -SVN='https://opensvn.csie.org/tuxanci_ng/' -log='server.log' -error="Error! See pkgs/${log} for more iformation" - -2&>1 - -rm -rfv $INSTALL_DIR $BUILD_DIR > pkgs/"${log}" || ( echo $error; exit 1 ) - -mkdir -pv pkgs >> pkgs/"${log}" || ( echo $error; exit 1 ) - -echo "* Fetching files from SVN" -svn export $SVN $BUILD_DIR >> pkgs/"${log}" || ( echo $error; exit 1 ) - -echo "* Configuring" -#echo "#define TUXANCI_NG_VERSION \"${VERSION}\"" > $BUILD_DIR/config.h || ( echo $error; exit 1 ) - -echo "* Compiling" -prevdir=`pwd` -cd $BUILD_DIR -cmake . -DServer=1 -DPREFIX=\\\".\\\" -DDATADIR=\\\".\\\" -DLIBDIR=\\\"./modules\\\" -DCMAKE_INSTALL_PREFIX:PATH=/ -DCMAKE_INSTALL_DATADIR=/ >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) -make >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) -make DESTDIR="${prevdir}/${INSTALL_DIR}" install >> "${prevdir}"/pkgs/"${log}" || ( echo $error; exit 1 ) -cd $prevdir - -echo "* Packaging" -tar cjf "${INSTALL_DIR}".tar.bz2 $INSTALL_DIR || ( echo $error; exit 1 ) - -echo "** GNU/Linux binary server package is ready!" - diff --git a/src/base/main.c b/src/base/main.c index 93a65b4..46f68ad 100644 --- a/src/base/main.c +++ b/src/base/main.c @@ -106,7 +106,7 @@ void accessExistFile(const char *s) int tryExistFile (const char *s) { - if (access(s, F_OK) !=0) + if (access(s, F_OK) != 0) return 1; else return 0; diff --git a/src/screen/screen_credits.c b/src/screen/screen_credits.c index 8bbd433..ffb6b5f 100644 --- a/src/screen/screen_credits.c +++ b/src/screen/screen_credits.c @@ -108,7 +108,7 @@ void initScreenCredits() if( tryExistFile(PATH_DATA SCREEN_CREDITS_FILE) == 0 ) { - creditExists=1; + creditExists = 1; textFile = loadTextFile(PATH_DATA SCREEN_CREDITS_FILE); for( i = 0 ; i < textFile->text->count ; i++ ) { @@ -125,7 +125,7 @@ void initScreenCredits() { for( i = 0 ; i < 5 ; i++ ) { - creditExists=0; + creditExists = 0; widget_label_t *label; char *line; line = "Credit file not found..."; |