Merge branch 'master' of github.com:MegaGlest/megaglest-source
This commit is contained in:
commit
329805ac30
|
@ -27,3 +27,6 @@
|
|||
*.xcf -text -diff
|
||||
*.blend -text -diff
|
||||
*.blend1 -text -diff
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
.gitmodules export-ignore
|
||||
|
|
|
@ -15,6 +15,7 @@ CURRENTDIR="$(dirname $(readlink -f $0))"
|
|||
#RELEASEDIR="$CURRENTDIR/release/$RELEASENAME-$VERSION/megaglest-$VERSION"
|
||||
RELEASEDIR="$CURRENTDIR/release/$RELEASENAME-$VERSION"
|
||||
PROJDIR="$CURRENTDIR/../../"
|
||||
REPODIR="$CURRENTDIR/../../"
|
||||
|
||||
echo "Creating data package in $RELEASEDIR"
|
||||
|
||||
|
@ -38,25 +39,56 @@ echo "copying data ..."
|
|||
#svn export --force "$CURRENTDIR/../../data/glest_game/glestkeys.ini" "$RELEASEDIR/glestkeys.ini"
|
||||
|
||||
mkdir -p "$RELEASEDIR/data/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/data" "$RELEASEDIR/data/"
|
||||
cd "$RELEASEDIR/data/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/data" "$RELEASEDIR/data/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:data | tar x
|
||||
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/docs/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/docs" "$RELEASEDIR/docs/"
|
||||
svn export --force "$CURRENTDIR/../../docs/CHANGELOG.txt" "$RELEASEDIR/docs/CHANGELOG.txt"
|
||||
svn export --force "$CURRENTDIR/../../docs/README.txt" "$RELEASEDIR/docs/README.txt"
|
||||
cd "$RELEASEDIR/docs/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/docs" "$RELEASEDIR/docs/"
|
||||
#svn export --force "$CURRENTDIR/../../docs/CHANGELOG.txt" "$RELEASEDIR/docs/CHANGELOG.txt"
|
||||
#svn export --force "$CURRENTDIR/../../docs/README.txt" "$RELEASEDIR/docs/README.txt"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:docs | tar x
|
||||
git archive --remote ${REPODIR} HEAD:docs/ CHANGELOG.txt | tar x
|
||||
git archive --remote ${REPODIR} HEAD:docs/ README.txt | tar x
|
||||
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/maps/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/maps" "$RELEASEDIR/maps/"
|
||||
cd "$RELEASEDIR/maps/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/maps" "$RELEASEDIR/maps/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:maps | tar x
|
||||
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/scenarios/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/scenarios" "$RELEASEDIR/scenarios/"
|
||||
cd "$RELEASEDIR/scenarios/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/scenarios" "$RELEASEDIR/scenarios/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:scenarios | tar x
|
||||
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/techs/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/techs" "$RELEASEDIR/techs/"
|
||||
cd "$RELEASEDIR/techs/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/techs" "$RELEASEDIR/techs/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:techs | tar x
|
||||
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/tilesets/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/tilesets" "$RELEASEDIR/tilesets/"
|
||||
cd "$RELEASEDIR/tilesets/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/tilesets" "$RELEASEDIR/tilesets/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:tilesets | tar x
|
||||
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/tutorials/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/tutorials" "$RELEASEDIR/tutorials/"
|
||||
cd "$RELEASEDIR/tutorials/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/tutorials" "$RELEASEDIR/tutorials/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:tutorials | tar x
|
||||
|
||||
# special export for flag images
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/data/core/misc_textures/flags/"
|
||||
svn export --force "$CURRENTDIR/../../source/masterserver/flags" "$RELEASEDIR/data/core/misc_textures/flags/"
|
||||
cd "$RELEASEDIR/data/core/misc_textures/flags/"
|
||||
# svn export --force "$CURRENTDIR/../../source/masterserver/flags" "$RELEASEDIR/data/core/misc_textures/flags/"
|
||||
git archive --remote ${REPODIR}/source/masterserver/ HEAD:flags | tar x
|
||||
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/CMakeLists.txt" "$RELEASEDIR/CMakeLists.txt"
|
||||
|
||||
|
@ -65,6 +97,7 @@ svn export --force "$CURRENTDIR/../../source/masterserver/flags" "$RELEASEDIR/da
|
|||
#rm -rf "$RELEASEDIR/data/core/fonts"
|
||||
# END
|
||||
|
||||
cd "$CURRENTDIR"
|
||||
echo "creating data archive: $PACKAGE"
|
||||
[[ -f "$release/$PACKAGE" ]] && rm "release/$PACKAGE"
|
||||
#tar cJf "release/$PACKAGE" -C "$CURRENTDIR/release/" "$RELEASENAME-$VERSION"
|
||||
|
|
|
@ -14,6 +14,7 @@ PACKAGE="$RELEASENAME-$VERSION.tar.xz"
|
|||
CURRENTDIR="$(dirname $(readlink -f $0))"
|
||||
RELEASEDIR="$CURRENTDIR/release/$RELEASENAME-$VERSION/megaglest-$VERSION"
|
||||
SOURCEDIR="$CURRENTDIR/../../source/"
|
||||
REPODIR="$CURRENTDIR/../../../git-data-source/"
|
||||
|
||||
echo "Creating data package in $RELEASEDIR"
|
||||
|
||||
|
@ -22,17 +23,22 @@ mkdir -p "$RELEASEDIR"
|
|||
|
||||
project_parent_dir="$(basename $(readlink -f -- "$(dirname -- "$0")/../../") )"
|
||||
# echo "$project_parent_dir"
|
||||
if [[ $project_parent_dir == trunk* ]] ;
|
||||
if [[ $project_parent_dir == git* ]] ;
|
||||
then
|
||||
echo 'this is the trunk!'
|
||||
echo 'This is the master branch'
|
||||
else
|
||||
echo '*NOTE: This script currently only works on the trunk, aborting!'
|
||||
echo '*NOTE: This script currently only works on the master HEAD, aborting!'
|
||||
exit
|
||||
fi
|
||||
|
||||
# copy data
|
||||
svn export --force "$CURRENTDIR/../../../trunk-data-source" "$RELEASEDIR/data-source/"
|
||||
|
||||
# copy data
|
||||
mkdir -p "$RELEASEDIR/data-source"
|
||||
cd "$RELEASEDIR/data-source"
|
||||
#svn export --force "$CURRENTDIR/../../../git-data-source" "$RELEASEDIR/data-source/"
|
||||
git archive --remote ${REPODIR}/megaglest-data-source/ HEAD: | tar x
|
||||
|
||||
cd "$CURRENTDIR"
|
||||
echo "creating $PACKAGE"
|
||||
[[ -f "$release/$PACKAGE" ]] && rm "release/$PACKAGE"
|
||||
#tar cJf "release/$PACKAGE" -C "$CURRENTDIR/release/" "$RELEASENAME-$VERSION"
|
||||
|
|
|
@ -14,6 +14,7 @@ PACKAGE="$RELEASENAME-$VERSION.tar.xz"
|
|||
CURRENTDIR="$(dirname $(readlink -f $0))"
|
||||
RELEASEDIR="$CURRENTDIR/release/$RELEASENAME-$VERSION/megaglest-$VERSION"
|
||||
SOURCEDIR="$CURRENTDIR/../../source/"
|
||||
REPODIR="$CURRENTDIR/../../"
|
||||
|
||||
echo "Creating data package in $RELEASEDIR"
|
||||
|
||||
|
@ -21,43 +22,105 @@ echo "Creating data package in $RELEASEDIR"
|
|||
mkdir -p "$RELEASEDIR"
|
||||
|
||||
# copy data
|
||||
svn export --force "$CURRENTDIR/../../mk/linux/megaglest.bmp" "$RELEASEDIR/megaglest.bmp"
|
||||
svn export --force "$CURRENTDIR/../../mk/linux/megaglest.desktop" "$RELEASEDIR/megaglest.desktop"
|
||||
svn export --force "$CURRENTDIR/../../mk/linux/megaglest.png" "$RELEASEDIR/megaglest.png"
|
||||
svn export --force "$CURRENTDIR/../../mk/linux/megaglest.xpm" "$RELEASEDIR/megaglest.xpm"
|
||||
svn export --force "$CURRENTDIR/../../mk/linux/glest.ico" "$RELEASEDIR/glest.ico"
|
||||
svn export --force "$CURRENTDIR/../../mk/linux/configuration.xml" "$RELEASEDIR/configuration.xml"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/megaglest.ico" "$RELEASEDIR/megaglest.ico"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/g3dviewer.ico" "$RELEASEDIR/g3dviewer.ico"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/editor.ico" "$RELEASEDIR/editor.ico"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/servers.ini" "$RELEASEDIR/servers.ini"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/glest.ini" "$RELEASEDIR/glest_windows.ini"
|
||||
svn export --force "$CURRENTDIR/../../mk/linux/glest.ini" "$RELEASEDIR/glest_linux.ini"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/glestkeys.ini" "$RELEASEDIR/glestkeys.ini"
|
||||
echo "Exporting image and ini files ..."
|
||||
cd "$RELEASEDIR"
|
||||
# svn export --force "$CURRENTDIR/../../mk/linux/megaglest.bmp" "$RELEASEDIR/megaglest.bmp"
|
||||
# svn export --force "$CURRENTDIR/../../mk/linux/megaglest.desktop" "$RELEASEDIR/megaglest.desktop"
|
||||
# svn export --force "$CURRENTDIR/../../mk/linux/megaglest.png" "$RELEASEDIR/megaglest.png"
|
||||
# svn export --force "$CURRENTDIR/../../mk/linux/megaglest.xpm" "$RELEASEDIR/megaglest.xpm"
|
||||
# svn export --force "$CURRENTDIR/../../mk/linux/glest.ico" "$RELEASEDIR/glest.ico"
|
||||
# svn export --force "$CURRENTDIR/../../mk/linux/configuration.xml" "$RELEASEDIR/configuration.xml"
|
||||
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/megaglest.ico" "$RELEASEDIR/megaglest.ico"
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/g3dviewer.ico" "$RELEASEDIR/g3dviewer.ico"
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/editor.ico" "$RELEASEDIR/editor.ico"
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/servers.ini" "$RELEASEDIR/servers.ini"
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/glest.ini" "$RELEASEDIR/glest_windows.ini"
|
||||
# svn export --force "$CURRENTDIR/../../mk/linux/glest.ini" "$RELEASEDIR/glest_linux.ini"
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/glestkeys.ini" "$RELEASEDIR/glestkeys.ini"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: CMakeLists.txt | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.bmp | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.desktop | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.png | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.xpm | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ glest.ico | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ glest.ini | tar x
|
||||
mv glest.ini glest_linux.ini
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: megaglest.ico | tar x
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: g3dviewer.ico | tar x
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: editor.ico | tar x
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: servers.ini | tar x
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: glest.ini | tar x
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: glestkeys.ini | tar x
|
||||
mv glest.ini glest_windows.ini
|
||||
|
||||
echo "Exporting game data files ..."
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/data/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/data" "$RELEASEDIR/data/"
|
||||
cd "$RELEASEDIR/data/"
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/data" "$RELEASEDIR/data/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:data | tar x
|
||||
|
||||
echo "Exporting doc files ..."
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/docs/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/docs" "$RELEASEDIR/docs/"
|
||||
svn export --force "$CURRENTDIR/../../docs/CHANGELOG.txt" "$RELEASEDIR/docs/CHANGELOG.txt"
|
||||
svn export --force "$CURRENTDIR/../../docs/README.txt" "$RELEASEDIR/docs/README.txt"
|
||||
cd "$RELEASEDIR/docs/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/docs" "$RELEASEDIR/docs/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:docs | tar x
|
||||
|
||||
cd "$RELEASEDIR/docs/"
|
||||
#svn export --force "$CURRENTDIR/../../docs/CHANGELOG.txt" "$RELEASEDIR/docs/CHANGELOG.txt"
|
||||
git archive --remote ${REPODIR} HEAD:docs/ CHANGELOG.txt | tar x
|
||||
|
||||
cd "$RELEASEDIR/docs/"
|
||||
#svn export --force "$CURRENTDIR/../../docs/README.txt" "$RELEASEDIR/docs/README.txt"
|
||||
git archive --remote ${REPODIR} HEAD:docs/ README.txt | tar x
|
||||
|
||||
echo "Exporting map files ..."
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/maps/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/maps" "$RELEASEDIR/maps/"
|
||||
cd "$RELEASEDIR/maps/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/maps" "$RELEASEDIR/maps/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:maps | tar x
|
||||
|
||||
echo "Exporting scenario files ..."
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/scenarios/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/scenarios" "$RELEASEDIR/scenarios/"
|
||||
cd "$RELEASEDIR/scenarios/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/scenarios" "$RELEASEDIR/scenarios/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:scenarios | tar x
|
||||
|
||||
echo "Exporting tech files ..."
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/techs/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/techs" "$RELEASEDIR/techs/"
|
||||
cd "$RELEASEDIR/techs/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/techs" "$RELEASEDIR/techs/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:techs | tar x
|
||||
|
||||
echo "Exporting tileset files ..."
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/tilesets/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/tilesets" "$RELEASEDIR/tilesets/"
|
||||
cd "$RELEASEDIR/tilesets/"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/tilesets" "$RELEASEDIR/tilesets/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:tilesets | tar x
|
||||
|
||||
echo "Exporting tutorial files ..."
|
||||
cd "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR/tutorials/"
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/tutorials" "$RELEASEDIR/tutorials/"
|
||||
cd "$RELEASEDIR/tutorials/"
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/tutorials" "$RELEASEDIR/tutorials/"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:tutorials | tar x
|
||||
|
||||
# special export for flag images
|
||||
# mkdir -p "$RELEASEDIR/data/core/misc_textures/flags/"
|
||||
# svn export --force "$CURRENTDIR/../../source/masterserver/flags" "$RELEASEDIR/data/core/misc_textures/flags/"
|
||||
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/CMakeLists.txt" "$RELEASEDIR/CMakeLists.txt"
|
||||
# cd "$RELEASEDIR"
|
||||
#svn export --force "$CURRENTDIR/../../data/glest_game/CMakeLists.txt" "$RELEASEDIR/CMakeLists.txt"
|
||||
# git archive --remote ${REPODIR}/data/glest_game/ HEAD: CMakeLists.txt | tar x
|
||||
|
||||
echo "Removing non required files ..."
|
||||
cd "$CURRENTDIR"
|
||||
# START
|
||||
# remove embedded data
|
||||
rm -rf "$RELEASEDIR/data/core/fonts"
|
||||
|
|
|
@ -11,6 +11,7 @@ PACKAGE="$RELEASENAME-$VERSION.tar.xz"
|
|||
CURRENTDIR="$(dirname $(readlink -f $0))"
|
||||
RELEASEDIR="$CURRENTDIR/release/$RELEASENAME-$VERSION/megaglest-$VERSION"
|
||||
SOURCEDIR="$CURRENTDIR/../../source/"
|
||||
REPODIR="$CURRENTDIR/../../"
|
||||
|
||||
echo "Creating source package in $RELEASEDIR"
|
||||
|
||||
|
@ -19,13 +20,21 @@ mkdir -p "$RELEASEDIR"
|
|||
|
||||
mkdir -p "$RELEASEDIR/source/shared_lib/sources/libircclient/"
|
||||
mkdir -p "$RELEASEDIR/source/shared_lib/include/libircclient/"
|
||||
svn export --force "$SOURCEDIR/shared_lib/sources/libircclient" "$RELEASEDIR/source/shared_lib/sources/libircclient"
|
||||
svn export --force "$SOURCEDIR/shared_lib/include/libircclient" "$RELEASEDIR/source/shared_lib/include/libircclient"
|
||||
cd "$RELEASEDIR/source/shared_lib/sources/libircclient/"
|
||||
#svn export --force "$SOURCEDIR/shared_lib/sources/libircclient" "$RELEASEDIR/source/shared_lib/sources/libircclient"
|
||||
git archive --remote ${REPODIR} HEAD:source/shared_lib/sources/libircclient | tar x
|
||||
cd "$RELEASEDIR/source/shared_lib/include/libircclient/"
|
||||
#svn export --force "$SOURCEDIR/shared_lib/include/libircclient" "$RELEASEDIR/source/shared_lib/include/libircclient"
|
||||
git archive --remote ${REPODIR} HEAD:source/shared_lib/include/libircclient | tar x
|
||||
|
||||
mkdir -p "$RELEASEDIR/source/shared_lib/sources/platform/miniupnpc/"
|
||||
mkdir -p "$RELEASEDIR/source/shared_lib/include/platform/miniupnpc/"
|
||||
svn export --force "$SOURCEDIR/shared_lib/sources/platform/miniupnpc" "$RELEASEDIR/source/shared_lib/sources/platform/miniupnpc"
|
||||
svn export --force "$SOURCEDIR/shared_lib/include/platform/miniupnpc" "$RELEASEDIR/source/shared_lib/include/platform/miniupnpc"
|
||||
cd "$RELEASEDIR/source/shared_lib/sources/platform/miniupnpc/"
|
||||
#svn export --force "$SOURCEDIR/shared_lib/sources/platform/miniupnpc" "$RELEASEDIR/source/shared_lib/sources/platform/miniupnpc"
|
||||
git archive --remote ${REPODIR} HEAD:source/shared_lib/sources/platform/miniupnpc | tar x
|
||||
cd "$RELEASEDIR/source/shared_lib/include/platform/miniupnpc/"
|
||||
#svn export --force "$SOURCEDIR/shared_lib/include/platform/miniupnpc" "$RELEASEDIR/source/shared_lib/include/platform/miniupnpc"
|
||||
git archive --remote ${REPODIR} HEAD:source/shared_lib/include/platform/miniupnpc | tar x
|
||||
|
||||
#mkdir -p "$RELEASEDIR/source/shared_lib/sources/streflop/"
|
||||
#mkdir -p "$RELEASEDIR/source/shared_lib/include/streflop/"
|
||||
|
@ -33,11 +42,16 @@ svn export --force "$SOURCEDIR/shared_lib/include/platform/miniupnpc" "$RELEASED
|
|||
#svn export --force "$SOURCEDIR/shared_lib/include/streflop" "$RELEASEDIR/source/shared_lib/include/streflop"
|
||||
|
||||
mkdir -p "$RELEASEDIR/source/masterserver/flags/"
|
||||
svn export --force "$SOURCEDIR/masterserver/flags" "$RELEASEDIR/source/masterserver/flags"
|
||||
cd "$RELEASEDIR/source/masterserver/flags/"
|
||||
#svn export --force "$SOURCEDIR/masterserver/flags" "$RELEASEDIR/source/masterserver/flags"
|
||||
git archive --remote ${REPODIR} HEAD:source/masterserver/flags | tar x
|
||||
|
||||
mkdir -p "$RELEASEDIR/data/core/fonts/"
|
||||
svn export --force "$SOURCEDIR/../data/glest_game/data/core/fonts" "$RELEASEDIR/data/core/fonts"
|
||||
cd "$RELEASEDIR/data/core/fonts/"
|
||||
#svn export --force "$SOURCEDIR/../data/glest_game/data/core/fonts" "$RELEASEDIR/data/core/fonts"
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD:data/core/fonts | tar x
|
||||
|
||||
cd "$CURRENTDIR"
|
||||
echo "Creating $PACKAGE"
|
||||
[[ -f "$release/$PACKAGE" ]] && rm "release/$PACKAGE"
|
||||
tar cJf "release/$PACKAGE" -C "$CURRENTDIR/release/$RELEASENAME-$VERSION" "megaglest-$VERSION"
|
||||
|
|
|
@ -10,49 +10,90 @@ PACKAGE="$RELEASENAME-$VERSION.tar.xz"
|
|||
CURRENTDIR="$(dirname $(readlink -f $0))"
|
||||
RELEASEDIR="$CURRENTDIR/release/$RELEASENAME-$VERSION/megaglest-$VERSION"
|
||||
SOURCEDIR="$CURRENTDIR/../../source/"
|
||||
REPODIR="$CURRENTDIR/../../"
|
||||
|
||||
echo "Creating source package in $RELEASEDIR"
|
||||
echo "Creating source package in: ${RELEASEDIR} git REPO is in: ${REPODIR}"
|
||||
# exit 1
|
||||
|
||||
[[ -d "$RELEASEDIR" ]] && rm -rf "$RELEASEDIR"
|
||||
mkdir -p "$RELEASEDIR"
|
||||
|
||||
svn export --force "$SOURCEDIR" "$RELEASEDIR/source"
|
||||
echo "Exporting source ..."
|
||||
# svn export --force "$SOURCEDIR" "$RELEASEDIR/source"
|
||||
cd "$RELEASEDIR"
|
||||
mkdir source
|
||||
cd source
|
||||
git archive --remote ${REPODIR} HEAD:source | tar x
|
||||
cd "$RELEASEDIR"
|
||||
|
||||
mkdir -p "$RELEASEDIR/mk/cmake/"
|
||||
svn export --force "$CURRENTDIR/../cmake/" "$RELEASEDIR/mk/cmake/"
|
||||
mkdir -p "$RELEASEDIR/mk/macosx/"
|
||||
svn export --force "$CURRENTDIR/../macosx/" "$RELEASEDIR/mk/macosx/"
|
||||
mkdir -p "$RELEASEDIR/mk/windoze/"
|
||||
svn export --force "$CURRENTDIR/../windoze/" "$RELEASEDIR/mk/windoze/"
|
||||
echo "Exporting mk ..."
|
||||
# mkdir -p "$RELEASEDIR/mk/cmake/"
|
||||
# svn export --force "$CURRENTDIR/../cmake/" "$RELEASEDIR/mk/cmake/"
|
||||
# mkdir -p "$RELEASEDIR/mk/macosx/"
|
||||
# svn export --force "$CURRENTDIR/../macosx/" "$RELEASEDIR/mk/macosx/"
|
||||
# mkdir -p "$RELEASEDIR/mk/windoze/"
|
||||
# svn export --force "$CURRENTDIR/../windoze/" "$RELEASEDIR/mk/windoze/"
|
||||
mkdir -p mk
|
||||
cd mk
|
||||
git archive --remote ${REPODIR} HEAD:mk | tar x
|
||||
cd "$RELEASEDIR"
|
||||
|
||||
svn export --force "$CURRENTDIR/../../docs" $RELEASEDIR
|
||||
echo "Exporting docs ..."
|
||||
# svn export --force "$CURRENTDIR/../../docs" $RELEASEDIR
|
||||
mkdir docs
|
||||
cd docs
|
||||
git archive --remote ${REPODIR} HEAD:docs | tar x
|
||||
cd "$RELEASEDIR"
|
||||
|
||||
svn export --force "$CURRENTDIR/glest.ini" $RELEASEDIR/glest.ini
|
||||
svn export --force "$CURRENTDIR/glestkeys.ini" $RELEASEDIR/glestkeys.ini
|
||||
svn export --force "$CURRENTDIR/servers.ini" $RELEASEDIR/servers.ini
|
||||
svn export --force "$CURRENTDIR/glest.ico" $RELEASEDIR/glest.ico
|
||||
svn export --force "$CURRENTDIR/megaglest.bmp" $RELEASEDIR/megaglest.bmp
|
||||
svn export --force "$CURRENTDIR/megaglest.png" $RELEASEDIR/megaglest.png
|
||||
svn export --force "$CURRENTDIR/megaglest.xpm" $RELEASEDIR/megaglest.xpm
|
||||
svn export --force "$CURRENTDIR/megaglest.desktop" $RELEASEDIR/megaglest.desktop
|
||||
svn export --force "$CURRENTDIR/megaglest_editor.desktop" $RELEASEDIR/megaglest_editor.desktop
|
||||
svn export --force "$CURRENTDIR/megaglest_g3dviewer.desktop" $RELEASEDIR/megaglest_g3dviewer.desktop
|
||||
echo "Exporting files in mk/linux ..."
|
||||
# svn export --force "$CURRENTDIR/glest.ini" $RELEASEDIR/glest.ini
|
||||
# svn export --force "$CURRENTDIR/glestkeys.ini" $RELEASEDIR/glestkeys.ini
|
||||
# svn export --force "$CURRENTDIR/servers.ini" $RELEASEDIR/servers.ini
|
||||
# svn export --force "$CURRENTDIR/glest.ico" $RELEASEDIR/glest.ico
|
||||
# svn export --force "$CURRENTDIR/megaglest.bmp" $RELEASEDIR/megaglest.bmp
|
||||
# svn export --force "$CURRENTDIR/megaglest.png" $RELEASEDIR/megaglest.png
|
||||
# svn export --force "$CURRENTDIR/megaglest.xpm" $RELEASEDIR/megaglest.xpm
|
||||
# svn export --force "$CURRENTDIR/megaglest.desktop" $RELEASEDIR/megaglest.desktop
|
||||
# svn export --force "$CURRENTDIR/megaglest_editor.desktop" $RELEASEDIR/megaglest_editor.desktop
|
||||
# svn export --force "$CURRENTDIR/megaglest_g3dviewer.desktop" $RELEASEDIR/megaglest_g3dviewer.desktop
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ glest.ini | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ glestkeys.ini | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ servers.ini | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ glest.ico | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.bmp | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.png | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.xpm | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.desktop | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest_editor.desktop | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest_g3dviewer.desktop | tar x
|
||||
|
||||
# The mnpages are auto generated by the build process so no need to ship with source
|
||||
# svn export --force "$CURRENTDIR/megaglest.6" $RELEASEDIR/megaglest.6
|
||||
# svn export --force "$CURRENTDIR/megaglest_editor.6" $RELEASEDIR/megaglest_editor.6
|
||||
# svn export --force "$CURRENTDIR/megaglest_g3dviewer.6" $RELEASEDIR/megaglest_g3dviewer.6
|
||||
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/megaglest.ico" $RELEASEDIR/megaglest.ico
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/g3dviewer.ico" $RELEASEDIR/g3dviewer.ico
|
||||
svn export --force "$CURRENTDIR/../../data/glest_game/editor.ico" $RELEASEDIR/editor.ico
|
||||
svn export --force "$CURRENTDIR/start_megaglest" $RELEASEDIR/start_megaglest
|
||||
svn export --force "$CURRENTDIR/start_megaglest_g3dviewer" $RELEASEDIR/start_megaglest_g3dviewer
|
||||
svn export --force "$CURRENTDIR/start_megaglest_mapeditor" $RELEASEDIR/start_megaglest_mapeditor
|
||||
svn export --force "$CURRENTDIR/setupBuildDeps.sh" $RELEASEDIR/setupBuildDeps.sh
|
||||
svn export --force "$CURRENTDIR/../../CMakeLists.txt" $RELEASEDIR/CMakeLists.txt
|
||||
echo "Exporting files in data/glest_game ..."
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/megaglest.ico" $RELEASEDIR/megaglest.ico
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/g3dviewer.ico" $RELEASEDIR/g3dviewer.ico
|
||||
# svn export --force "$CURRENTDIR/../../data/glest_game/editor.ico" $RELEASEDIR/editor.ico
|
||||
# svn export --force "$CURRENTDIR/start_megaglest" $RELEASEDIR/start_megaglest
|
||||
# svn export --force "$CURRENTDIR/start_megaglest_g3dviewer" $RELEASEDIR/start_megaglest_g3dviewer
|
||||
# svn export --force "$CURRENTDIR/start_megaglest_mapeditor" $RELEASEDIR/start_megaglest_mapeditor
|
||||
# svn export --force "$CURRENTDIR/setupBuildDeps.sh" $RELEASEDIR/setupBuildDeps.sh
|
||||
# svn export --force "$CURRENTDIR/../../CMakeLists.txt" $RELEASEDIR/CMakeLists.txt
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: megaglest.ico | tar x
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: g3dviewer.ico | tar x
|
||||
git archive --remote ${REPODIR}/data/glest_game/ HEAD: editor.ico | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ start_megaglest | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ start_megaglest_g3dviewer | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ start_megaglest_mapeditor | tar x
|
||||
git archive --remote ${REPODIR} HEAD:mk/linux/ setupBuildDeps.sh | tar x
|
||||
git archive --remote ${REPODIR} HEAD: CMakeLists.txt | tar x
|
||||
|
||||
# exit 1
|
||||
|
||||
# START
|
||||
echo "Removing non required files ..."
|
||||
# remove embedded library code as that will be packaged in a seperate archive
|
||||
rm -rf "$RELEASEDIR/source/shared_lib/sources/libircclient/"
|
||||
rm -rf "$RELEASEDIR/source/shared_lib/include/libircclient/"
|
||||
|
@ -63,6 +104,7 @@ rm -rf "$RELEASEDIR/source/shared_lib/include/platform/miniupnpc/"
|
|||
rm -rf "$RELEASEDIR/source/masterserver/flags/"
|
||||
# END
|
||||
|
||||
cd ${CURRENTDIR}
|
||||
echo "Creating $PACKAGE"
|
||||
[[ -f "$release/$PACKAGE" ]] && rm "release/$PACKAGE"
|
||||
tar cJf "release/$PACKAGE" -C "$CURRENTDIR/release/$RELEASENAME-$VERSION" "megaglest-$VERSION"
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
# Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
|
||||
# Copyright (c) 2011 Mark Vejvoda under GNU GPL v3.0+
|
||||
|
||||
OLD_MG_VERSION=3.7.1
|
||||
OLD_MG_VERSION_BINARY=3.7.1
|
||||
MG_VERSION=3.9.0
|
||||
OLD_MG_VERSION=3.9.0
|
||||
OLD_MG_VERSION_BINARY=3.9.0
|
||||
MG_VERSION=3.9.1-dev
|
||||
|
||||
if [ "$1" = "--oldversion" ]; then
|
||||
echo "$OLD_MG_VERSION"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -230,6 +230,7 @@ public:
|
|||
void init(World* world, GameCamera *gameCamera,const XmlNode *rootNode);
|
||||
|
||||
//message box functions
|
||||
void addMessageToQueue(ScriptManagerMessage msg);
|
||||
bool getMessageBoxEnabled() const {return !messageQueue.empty();}
|
||||
GraphicMessageBox* getMessageBox() {return &messageBox;}
|
||||
string getDisplayText() const {return displayText;}
|
||||
|
|
|
@ -748,6 +748,10 @@ vector<string> Config::getPathListForType(PathType type, string scenarioDir) {
|
|||
}
|
||||
}
|
||||
if(scenarioDir != "") {
|
||||
if(EndsWith(scenarioDir, ".xml") == true) {
|
||||
scenarioDir = extractDirectoryPathFromFile(scenarioDir);
|
||||
}
|
||||
|
||||
//string scenarioLocation = data_path + scenarioDir;
|
||||
string scenarioLocation = scenarioDir;
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Scenario path [%s]\n",scenarioLocation.c_str());
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -43,6 +43,8 @@ class GameSettings;
|
|||
|
||||
class CoreData {
|
||||
private:
|
||||
std::map<int,bool> itemLoadAttempted;
|
||||
|
||||
StrSound introMusic;
|
||||
StrSound menuMusic;
|
||||
StaticSound clickSoundA;
|
||||
|
@ -131,8 +133,9 @@ public:
|
|||
tsyst_onServerInstalledTexture,
|
||||
tsyst_statusReadyTexture,
|
||||
tsyst_statusNotReadyTexture,
|
||||
tsyst_statusBRBTexture
|
||||
tsyst_statusBRBTexture,
|
||||
|
||||
tsyst_COUNT
|
||||
//std::vector<Texture2D *> miscTextureList;
|
||||
};
|
||||
|
||||
|
@ -145,46 +148,49 @@ public:
|
|||
void cleanup();
|
||||
void loadFonts();
|
||||
|
||||
// Textures
|
||||
Texture2D *getTextureBySystemId(TextureSystemType type) const;
|
||||
|
||||
Texture2D *getBackgroundTexture() const {return backgroundTexture;}
|
||||
Texture2D *getFireTexture() const {return fireTexture;}
|
||||
Texture2D *getTeamColorTexture() const {return teamColorTexture;}
|
||||
Texture2D *getSnowTexture() const {return snowTexture;}
|
||||
Texture2D *getLogoTexture() const {return logoTexture;}
|
||||
Texture2D *getWaterSplashTexture() const {return waterSplashTexture;}
|
||||
Texture2D *getCustomTexture() const {return customTexture;}
|
||||
Texture2D *getButtonSmallTexture() const {return buttonSmallTexture;}
|
||||
Texture2D *getButtonBigTexture() const {return buttonBigTexture;}
|
||||
Texture2D *getHorizontalLineTexture() const {return horizontalLineTexture;}
|
||||
Texture2D *getVerticalLineTexture() const {return verticalLineTexture;}
|
||||
Texture2D *getCheckBoxTexture() const {return checkBoxTexture;}
|
||||
Texture2D *getCheckedCheckBoxTexture() const {return checkedCheckBoxTexture;}
|
||||
Texture2D *getNotOnServerTexture() const {return notOnServerTexture;}
|
||||
Texture2D *getOnServerDifferentTexture() const {return onServerDifferentTexture;}
|
||||
Texture2D *getOnServerTexture() const {return onServerTexture;}
|
||||
Texture2D *getOnServerInstalledTexture() const {return onServerInstalledTexture;}
|
||||
Texture2D *getStatusReadyTexture() const {return statusReadyTexture;}
|
||||
Texture2D *getStatusNotReadyTexture() const {return statusNotReadyTexture;}
|
||||
Texture2D *getStatusBRBTexture() const {return statusBRBTexture;}
|
||||
Texture2D *getBackgroundTexture();
|
||||
Texture2D *getFireTexture();
|
||||
Texture2D *getTeamColorTexture();
|
||||
Texture2D *getSnowTexture();
|
||||
Texture2D *getLogoTexture();
|
||||
Texture2D *getWaterSplashTexture();
|
||||
Texture2D *getCustomTexture();
|
||||
Texture2D *getButtonSmallTexture();
|
||||
Texture2D *getButtonBigTexture();
|
||||
Texture2D *getHorizontalLineTexture();
|
||||
Texture2D *getVerticalLineTexture();
|
||||
Texture2D *getCheckBoxTexture();
|
||||
Texture2D *getCheckedCheckBoxTexture();
|
||||
Texture2D *getNotOnServerTexture();
|
||||
Texture2D *getOnServerDifferentTexture();
|
||||
Texture2D *getOnServerTexture();
|
||||
Texture2D *getOnServerInstalledTexture();
|
||||
Texture2D *getStatusReadyTexture();
|
||||
Texture2D *getStatusNotReadyTexture();
|
||||
Texture2D *getStatusBRBTexture();
|
||||
Texture2D *getGameWinnerTexture();
|
||||
|
||||
Texture2D *getGameWinnerTexture() const {return gameWinnerTexture;}
|
||||
size_t getLogoTextureExtraCount();
|
||||
Texture2D *getLogoTextureExtra(int idx);
|
||||
|
||||
size_t getLogoTextureExtraCount() const {return logoTextureList.size();}
|
||||
Texture2D *getLogoTextureExtra(int idx) const {return logoTextureList[idx];}
|
||||
std::vector<Texture2D *> & getMiscTextureList();
|
||||
|
||||
std::vector<Texture2D *> & getMiscTextureList() { return miscTextureList; }
|
||||
// Sounds and Music
|
||||
StrSound *getIntroMusic();
|
||||
StrSound *getMenuMusic();
|
||||
|
||||
StrSound *getIntroMusic() {return &introMusic;}
|
||||
StrSound *getMenuMusic() {return &menuMusic;}
|
||||
StaticSound *getClickSoundA() {return &clickSoundA;}
|
||||
StaticSound *getClickSoundB() {return &clickSoundB;}
|
||||
StaticSound *getClickSoundC() {return &clickSoundC;}
|
||||
StaticSound *getAttentionSound() {return &attentionSound;}
|
||||
StaticSound *getHighlightSound() {return &highlightSound;}
|
||||
StaticSound *getMarkerSound() {return &markerSound;}
|
||||
StaticSound *getWaterSound() {return waterSounds.getRandSound();}
|
||||
StaticSound *getClickSoundA();
|
||||
StaticSound *getClickSoundB();
|
||||
StaticSound *getClickSoundC();
|
||||
StaticSound *getAttentionSound();
|
||||
StaticSound *getHighlightSound();
|
||||
StaticSound *getMarkerSound();
|
||||
StaticSound *getWaterSound();
|
||||
|
||||
// Fonts
|
||||
Font2D *getDisplayFont() const {return displayFont;}
|
||||
Font2D *getDisplayFontSmall() const {return displayFontSmall;}
|
||||
Font2D *getMenuFontNormal() const {return menuFontNormal;}
|
||||
|
@ -199,27 +205,29 @@ public:
|
|||
Font3D *getMenuFontVeryBig3D() const {return menuFontVeryBig3D;}
|
||||
Font3D *getConsoleFont3D() const {return consoleFont3D;}
|
||||
|
||||
string getMainMenuVideoFilename() const { return mainMenuVideoFilename; }
|
||||
// Helper functions
|
||||
string getMainMenuVideoFilename() const { return mainMenuVideoFilename; }
|
||||
bool hasMainMenuVideoFilename() const;
|
||||
string getMainMenuVideoFilenameFallback() const { return mainMenuVideoFilenameFallback; }
|
||||
string getMainMenuVideoFilenameFallback() const { return mainMenuVideoFilenameFallback; }
|
||||
bool hasMainMenuVideoFilenameFallback() const;
|
||||
|
||||
string getIntroVideoFilename() const { return introVideoFilename; }
|
||||
string getIntroVideoFilename() const { return introVideoFilename; }
|
||||
bool hasIntroVideoFilename() const;
|
||||
string getIntroVideoFilenameFallback() const { return introVideoFilenameFallback; }
|
||||
string getIntroVideoFilenameFallback() const { return introVideoFilenameFallback; }
|
||||
bool hasIntroVideoFilenameFallback() const;
|
||||
|
||||
string getBattleEndVideoFilename(bool won) const { return won == true ? battleEndWinVideoFilename : battleEndLoseVideoFilename; }
|
||||
string getBattleEndVideoFilename(bool won) const { return won == true ? battleEndWinVideoFilename : battleEndLoseVideoFilename; }
|
||||
bool hasBattleEndVideoFilename(bool won) const;
|
||||
string getBattleEndVideoFilenameFallback(bool won) const { return won == true ? battleEndWinVideoFilenameFallback : battleEndLoseVideoFilenameFallback; }
|
||||
string getBattleEndVideoFilenameFallback(bool won) const { return won == true ? battleEndWinVideoFilenameFallback : battleEndLoseVideoFilenameFallback; }
|
||||
bool hasBattleEndVideoFilenameFallback(bool won) const;
|
||||
|
||||
string getBattleEndMusicFilename(bool won) const { return won == true ? battleEndWinMusicFilename : battleEndLoseMusicFilename; }
|
||||
string getBattleEndMusicFilename(bool won) const { return won == true ? battleEndWinMusicFilename : battleEndLoseMusicFilename; }
|
||||
|
||||
void saveGameSettingsToFile(std::string fileName, GameSettings *gameSettings,int advancedIndex=0);
|
||||
bool loadGameSettingsFromFile(std::string fileName, GameSettings *gameSettings);
|
||||
|
||||
private:
|
||||
|
||||
CoreData();
|
||||
|
||||
int computeFontSize(int size);
|
||||
|
@ -230,6 +238,18 @@ private:
|
|||
void loadIntroMedia(string data_path);
|
||||
void loadMainMenuMedia(string data_path);
|
||||
void loadBattleEndMedia(string data_path);
|
||||
|
||||
string getDataPath();
|
||||
void loadTextureIfRequired(Texture2D **tex,string data_path,
|
||||
string uniqueFilePath, int texSystemId, bool setMipMap,
|
||||
bool setAlpha, bool loadUniqueFilePath,
|
||||
bool compressionDisabled = false);
|
||||
|
||||
void loadLogoTextureExtraIfRequired();
|
||||
void loadMiscTextureListIfRequired();
|
||||
|
||||
void loadWaterSoundsIfRequired();
|
||||
void loadMusicIfRequired();
|
||||
};
|
||||
|
||||
}} //end namespace
|
||||
|
|
|
@ -5509,7 +5509,7 @@ void Renderer::renderWaterEffects(){
|
|||
const World *world= game->getWorld();
|
||||
const WaterEffects *we= world->getWaterEffects();
|
||||
const Map *map= world->getMap();
|
||||
const CoreData &coreData= CoreData::getInstance();
|
||||
CoreData &coreData= CoreData::getInstance();
|
||||
float height= map->getWaterLevel()+0.001f;
|
||||
|
||||
assertGl();
|
||||
|
|
|
@ -834,7 +834,7 @@ void Program::init(WindowGl *window, bool initSound, bool toggleFullScreen){
|
|||
// END
|
||||
|
||||
if(initOk == false) {
|
||||
string sError = "Sound System could not be initialzed!";
|
||||
string sError = "Sound System could not be initialized!";
|
||||
this->showMessage(sError.c_str());
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ string MenuStateAbout::loadAdditionalCredits(){
|
|||
std::cout << buffer << std::endl;
|
||||
file.close();
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
fclose(fp);
|
||||
if(fp) fclose(fp);
|
||||
#endif
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -379,6 +379,8 @@ void MenuStateScenario::launchGame() {
|
|||
GameSettings gameSettings;
|
||||
loadGameSettings(&scenarioInfo, &gameSettings);
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] gameSettings.getScenarioDir() [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,gameSettings.getScenarioDir().c_str());
|
||||
|
||||
const vector<string> pathTechList = Config::getInstance().getPathListForType(ptTechs,gameSettings.getScenarioDir());
|
||||
if(TechTree::exists(gameSettings.getTech(), pathTechList) == false) {
|
||||
char szBuf[8096]="";
|
||||
|
|
|
@ -171,14 +171,14 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
|
|||
if (ret != NULL) {
|
||||
file.close();
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
fclose(fp);
|
||||
if(fp) fclose(fp);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
fclose(fp);
|
||||
if(fp) fclose(fp);
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
|
@ -223,14 +223,14 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
|
|||
if (ret != NULL) {
|
||||
file.close();
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
fclose(fp);
|
||||
if(fp) fclose(fp);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
fclose(fp);
|
||||
if(fp) fclose(fp);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ T* FileReader<T>::read(const string& filepath) const {
|
|||
T* ret = read(file,filepath);
|
||||
file.close();
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
fclose(fp);
|
||||
if(fp) fclose(fp);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
@ -393,7 +393,7 @@ T* FileReader<T>::read(const string& filepath, T* object) const {
|
|||
T* ret = read(file,filepath,object);
|
||||
file.close();
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
fclose(fp);
|
||||
if(fp) fclose(fp);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -763,6 +763,7 @@ void Texture2DGl::init(Filter filter, int maxAnisotropy) {
|
|||
assertGl();
|
||||
|
||||
if(inited == false) {
|
||||
assertGl();
|
||||
//params
|
||||
GLint wrap= toWrapModeGl(wrapMode);
|
||||
GLint glFormat= toFormatGl(format, pixmap.getComponents());
|
||||
|
@ -772,6 +773,7 @@ void Texture2DGl::init(Filter filter, int maxAnisotropy) {
|
|||
glCompressionFormat = glInternalFormat;
|
||||
}
|
||||
|
||||
assertGl();
|
||||
//pixel init var
|
||||
const uint8* pixels= pixmapInit? pixmap.getPixels(): NULL;
|
||||
|
||||
|
@ -793,7 +795,7 @@ void Texture2DGl::init(Filter filter, int maxAnisotropy) {
|
|||
}
|
||||
|
||||
if(mipmap) {
|
||||
GLuint glFilter= filter==fTrilinear? GL_LINEAR_MIPMAP_LINEAR: GL_LINEAR_MIPMAP_NEAREST;
|
||||
GLuint glFilter= (filter == fTrilinear ? GL_LINEAR_MIPMAP_LINEAR : GL_LINEAR_MIPMAP_NEAREST);
|
||||
|
||||
//build mipmaps
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, glFilter);
|
||||
|
|
|
@ -883,7 +883,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||
}
|
||||
}
|
||||
|
||||
fclose(f1);
|
||||
if(f1) fclose(f1);
|
||||
|
||||
fileLoaded = true;
|
||||
mapFileLoaded = path;
|
||||
|
@ -964,7 +964,7 @@ void MapPreview::saveToFile(const string &path) {
|
|||
}
|
||||
}
|
||||
|
||||
fclose(f1);
|
||||
if(f1) fclose(f1);
|
||||
|
||||
hasChanged = false;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ bool FileCRCPreCacheThread::canShutdown(bool deleteSelfIfShutdownDelayed) {
|
|||
void FileCRCPreCacheThread::execute() {
|
||||
{
|
||||
RunningStatusSafeWrapper runningStatus(this);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
if(getQuitStatus() == true) {
|
||||
deleteSelfIfRequired();
|
||||
|
@ -126,20 +126,20 @@ void FileCRCPreCacheThread::execute() {
|
|||
techPaths.erase(iterFindMegaPack);
|
||||
techPaths.insert(techPaths.begin(),megapackTechtreeName);
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Found megapack techtree and placing it at the TOP of the list\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Found megapack techtree and placing it at the TOP of the list\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
unsigned int techsPerWorker = ((unsigned int)techPaths.size() / (unsigned int)MAX_FileCRCPreCacheThread_WORKER_THREADS);
|
||||
if(techPaths.size() % MAX_FileCRCPreCacheThread_WORKER_THREADS != 0) {
|
||||
techsPerWorker++;
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] techsPerWorker = %u, MAX_FileCRCPreCacheThread_WORKER_THREADS = %d, techPaths.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,techsPerWorker,MAX_FileCRCPreCacheThread_WORKER_THREADS,(int)techPaths.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] techsPerWorker = %u, MAX_FileCRCPreCacheThread_WORKER_THREADS = %d, techPaths.size() = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,techsPerWorker,MAX_FileCRCPreCacheThread_WORKER_THREADS,(int)techPaths.size());
|
||||
|
||||
try {
|
||||
unsigned int consumedWorkers = 0;
|
||||
for(unsigned int workerIdx = 0; workerIdx < (unsigned int)MAX_FileCRCPreCacheThread_WORKER_THREADS; ++workerIdx) {
|
||||
if(getQuitStatus() == true) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -154,10 +154,10 @@ void FileCRCPreCacheThread::execute() {
|
|||
string techName = techPaths[idx];
|
||||
workerTechList.push_back(techName);
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Spawning CRC thread for Tech [%s] [%d of %d]\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),idx+1,(int)techPaths.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Spawning CRC thread for Tech [%s] [%d of %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,techName.c_str(),idx+1,(int)techPaths.size());
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] workerIdx = %u, currentWorkerMax = %u, endConsumerIndex = %u\n",__FILE__,__FUNCTION__,__LINE__,workerIdx,currentWorkerMax,endConsumerIndex);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] workerIdx = %u, currentWorkerMax = %u, endConsumerIndex = %u\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,workerIdx,currentWorkerMax,endConsumerIndex);
|
||||
|
||||
// Pause before launching this worker thread
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("About to process CRC for factions waiting...\n");
|
||||
|
@ -168,7 +168,7 @@ void FileCRCPreCacheThread::execute() {
|
|||
sleep(25);
|
||||
}
|
||||
if(getQuitStatus() == true) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ void FileCRCPreCacheThread::execute() {
|
|||
|
||||
consumedWorkers += currentWorkerMax;
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Spawning CRC thread, preCacheWorkerThreadList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,(int)preCacheWorkerThreadList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Spawning CRC thread, preCacheWorkerThreadList.size() = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,(int)preCacheWorkerThreadList.size());
|
||||
|
||||
if(consumedWorkers >= techPaths.size()) {
|
||||
break;
|
||||
|
@ -198,16 +198,16 @@ void FileCRCPreCacheThread::execute() {
|
|||
}
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
}
|
||||
catch(...) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] UNKNOWN Error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] unknown error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] UNKNOWN Error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] unknown error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
sleep(0);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Waiting for Spawned CRC threads to complete, preCacheWorkerThreadList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,(int)preCacheWorkerThreadList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Waiting for Spawned CRC threads to complete, preCacheWorkerThreadList.size() = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,(int)preCacheWorkerThreadList.size());
|
||||
|
||||
try {
|
||||
bool hasRunningWorkerThread = true;
|
||||
|
@ -254,12 +254,12 @@ void FileCRCPreCacheThread::execute() {
|
|||
}
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
}
|
||||
catch(...) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] UNKNOWN Error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] unknown error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] UNKNOWN Error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] unknown error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("********************** CRC Controller thread took %.2f seconds END **********************\n",difftime(time(NULL),elapsedTime));
|
||||
|
@ -275,8 +275,8 @@ void FileCRCPreCacheThread::execute() {
|
|||
break;
|
||||
}
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("--------------------- CRC worker thread START for tech [%s] ---------------------------\n",techName.c_str());
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] caching CRC value for Tech [%s]\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] caching CRC value for Tech [%s]\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str());
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] caching CRC value for Tech [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,techName.c_str());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] caching CRC value for Tech [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,techName.c_str());
|
||||
|
||||
time_t elapsedTime = time(NULL);
|
||||
// Clear existing CRC to force a CRC refresh
|
||||
|
@ -308,8 +308,8 @@ void FileCRCPreCacheThread::execute() {
|
|||
|
||||
uint32 techCRC = getFolderTreeContentsCheckSumRecursively(techDataPaths, string("/") + techName + string("/*"), ".xml", NULL, true);
|
||||
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%u] took %.3f seconds.\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%u] took %.3f seconds.\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
|
||||
vector<string> results;
|
||||
for(unsigned int idx = 0; idx < techDataPaths.size(); idx++) {
|
||||
|
@ -348,8 +348,8 @@ void FileCRCPreCacheThread::execute() {
|
|||
}
|
||||
}
|
||||
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("--------------------- CRC worker thread END for tech [%s] ---------------------------\n",techName.c_str());
|
||||
|
@ -360,26 +360,26 @@ void FileCRCPreCacheThread::execute() {
|
|||
}
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
}
|
||||
catch(...) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] UNKNOWN Error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] unknown error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] UNKNOWN Error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] unknown error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
}
|
||||
catch(...) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] UNKNOWN Error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] unknown error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] UNKNOWN Error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] unknown error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] FILE CRC PreCache thread is exiting...\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] FILE CRC PreCache thread is exiting...\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] FILE CRC PreCache thread is exiting...\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] FILE CRC PreCache thread is exiting...\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
deleteSelfIfRequired();
|
||||
}
|
||||
|
@ -441,8 +441,8 @@ SimpleTaskThread::~SimpleTaskThread() {
|
|||
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
|
||||
throw megaglest_runtime_error(ex.what());
|
||||
//abort();
|
||||
|
@ -515,20 +515,20 @@ void SimpleTaskThread::setSimpleTaskInterfaceValid(bool value) {
|
|||
}
|
||||
|
||||
void SimpleTaskThread::execute() {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
void *ptr_cpy = this->ptr;
|
||||
bool mustDeleteSelf = false;
|
||||
{
|
||||
{
|
||||
RunningStatusSafeWrapper runningStatus(this);
|
||||
try {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(getQuitStatus() == true) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
|
||||
unsigned int idx = 0;
|
||||
for(;this->simpleTaskInterface != NULL;) {
|
||||
|
@ -548,15 +548,15 @@ void SimpleTaskThread::execute() {
|
|||
}
|
||||
|
||||
if(getQuitStatus() == true) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
break;
|
||||
}
|
||||
else if(runTask == true) {
|
||||
if(getQuitStatus() == false) {
|
||||
ExecutingTaskSafeWrapper safeExecutingTaskMutex(this);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
this->simpleTaskInterface->simpleTask(this,this->userdata);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
if(getQuitStatus() == true) {
|
||||
break;
|
||||
|
@ -576,23 +576,23 @@ void SimpleTaskThread::execute() {
|
|||
}
|
||||
}
|
||||
if(getQuitStatus() == true) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(this->millisecsBetweenExecutions);
|
||||
}
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] END\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] END\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
mustDeleteSelf = getDeleteSelfOnExecutionDone();
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] END\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] END\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
mustDeleteSelf = getDeleteSelfOnExecutionDone();
|
||||
|
||||
throw megaglest_runtime_error(ex.what());
|
||||
|
@ -600,11 +600,11 @@ void SimpleTaskThread::execute() {
|
|||
}
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(mustDeleteSelf == true) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(isThreadDeleted(ptr_cpy) == false) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
this->setDeleteAfterExecute(true);
|
||||
}
|
||||
return;
|
||||
|
@ -644,7 +644,7 @@ LogFileThread::~LogFileThread() {
|
|||
delete mutexLogList;
|
||||
mutexLogList = NULL;
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#1 In [%s::%s Line: %d] LogFile thread is deleting\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#1 In [%s::%s Line: %d] LogFile thread is deleting\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
void LogFileThread::addLogEntry(SystemFlags::DebugType type, string logEntry) {
|
||||
|
@ -677,15 +677,15 @@ void LogFileThread::execute() {
|
|||
bool mustDeleteSelf = false;
|
||||
{
|
||||
RunningStatusSafeWrapper runningStatus(this);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
if(getQuitStatus() == true) {
|
||||
deleteSelfIfRequired();
|
||||
return;
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"LogFile thread is running\n");
|
||||
|
||||
try {
|
||||
|
@ -701,24 +701,24 @@ void LogFileThread::execute() {
|
|||
}
|
||||
|
||||
// Ensure remaining entryies are logged to disk on shutdown
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
saveToDisk(true,false);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
}
|
||||
catch(...) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] UNKNOWN Error\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] UNKNOWN Error\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] LogFile thread is starting to exit\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] LogFile thread is starting to exit\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
mustDeleteSelf = getDeleteSelfOnExecutionDone();
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] LogFile thread is exiting, mustDeleteSelf = %d\n",__FILE__,__FUNCTION__,__LINE__,mustDeleteSelf);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] LogFile thread is exiting, mustDeleteSelf = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,mustDeleteSelf);
|
||||
}
|
||||
if(mustDeleteSelf == true) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] LogFile thread is deleting self\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] LogFile thread is deleting self\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(isThreadDeleted(ptr_cpy) == false) {
|
||||
this->setDeleteAfterExecute(true);
|
||||
}
|
||||
|
|
|
@ -455,9 +455,10 @@ void SoundPlayerOpenAL::end() {
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
alcMakeContextCurrent( NULL );
|
||||
SoundPlayerOpenAL::checkAlcError(string(__FILE__) + string(" ") + string(__FUNCTION__) + string(" ") + intToStr(__LINE__));
|
||||
|
||||
if(context != 0) {
|
||||
alcMakeContextCurrent( NULL );
|
||||
SoundPlayerOpenAL::checkAlcError(string(__FILE__) + string(" ") + string(__FUNCTION__) + string(" ") + intToStr(__LINE__));
|
||||
}
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
if(context != 0) {
|
||||
|
|
|
@ -63,7 +63,7 @@ void AllocRegistry::dump(const char *path) {
|
|||
fprintf(f, "Total allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", allocCount, allocBytes);
|
||||
fprintf(f, "Not monitored allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", nonMonitoredCount, nonMonitoredBytes);
|
||||
|
||||
fclose(f);
|
||||
if(f) fclose(f);
|
||||
|
||||
printf("Memory leak dump summary at: %s\n",szBuf2);
|
||||
printf("Total leaks: %d, " MG_SIZE_T_SPECIFIER " bytes\n", leakCount, leakBytes);
|
||||
|
|
|
@ -376,7 +376,7 @@ void Properties::save(const string &path){
|
|||
|
||||
fileStream.close();
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
fclose(fp);
|
||||
if(fp) fclose(fp);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue