new dependency related with curl in the deb family; fixed bug related with unrecognized translated option

This commit is contained in:
filux 2015-10-06 17:28:52 +02:00
parent 5c5493397a
commit 563837ba7a
3 changed files with 49 additions and 65 deletions

View File

@ -21,6 +21,7 @@ CLANG_FORCED=0
WANT_STATIC_LIBS="-DWANT_STATIC_LIBS=ON" WANT_STATIC_LIBS="-DWANT_STATIC_LIBS=ON"
LUA_FORCED_VERSION=0 LUA_FORCED_VERSION=0
FORCE_32BIT_CROSS_COMPILE=0 FORCE_32BIT_CROSS_COMPILE=0
BUILD_MEGAGLEST_TESTS="ON"
while getopts "c:dfhl:mnx" option; do while getopts "c:dfhl:mnx" option; do
case "${option}" in case "${option}" in
@ -146,6 +147,7 @@ case $distribution in
*) *)
echo 'Turning ON dynamic FTGL, LUA, JPEG, PNG ... and forcing use the embedded IRCCLIENT' echo 'Turning ON dynamic FTGL, LUA, JPEG, PNG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_JPEG=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON" EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_JPEG=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
if [ $CLANG_FORCED = 1 ]; then BUILD_MEGAGLEST_TESTS="OFF"; fi
;; ;;
esac esac
;; ;;
@ -233,15 +235,15 @@ if [ $FORCE_32BIT_CROSS_COMPILE != 0 ]; then
fi fi
if [ $MAKE_ONLY = 0 ]; then if [ $MAKE_ONLY = 0 ]; then
echo "Calling cmake with EXTRA_CMAKE_OPTIONS = ${EXTRA_CMAKE_OPTIONS}" echo "Calling cmake with EXTRA_CMAKE_OPTIONS = ${EXTRA_CMAKE_OPTIONS}"
cmake -DCMAKE_INSTALL_PREFIX='' -DWANT_DEV_OUTPATH=ON $WANT_STATIC_LIBS -DBUILD_MEGAGLEST_TESTS=ON -DBREAKPAD_ROOT=$BREAKPAD_ROOT $EXTRA_CMAKE_OPTIONS ../../.. cmake -DCMAKE_INSTALL_PREFIX='' -DWANT_DEV_OUTPATH=ON $WANT_STATIC_LIBS -DBUILD_MEGAGLEST_TESTS=$BUILD_MEGAGLEST_TESTS -DBREAKPAD_ROOT=$BREAKPAD_ROOT $EXTRA_CMAKE_OPTIONS ../../..
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo 'ERROR: CMAKE failed.' >&2; exit 1 echo 'ERROR: CMAKE failed.' >&2; exit 1
fi fi
fi fi
if [ $CMAKE_ONLY = 1 ]; then if [ $CMAKE_ONLY = 1 ]; then
echo "==================> You may now call make with $NUMCORES cores... <==================" echo "==================> You may now call make with $NUMCORES cores... <=================="
else else
echo "==================> About to call make with $NUMCORES cores... <==================" echo "==================> About to call make with $NUMCORES cores... <=================="

View File

@ -23,21 +23,20 @@ then
fi fi
# Do you have the 'git' command? # Do you have the 'git' command?
if [ `which git`'x' = 'x' ] if [ `which git`'x' = 'x' ]
then then
echo 'Could not find "git", please make sure it is installed.' >&2 echo 'Could not find "git", please make sure it is installed.' >&2
exit 1 exit 1
fi fi
# Allow for quiet/silent installs # Allow for quiet/silent installs
if [ $1'x' = '-qx' -o $1'x' = '--quietx' -o $1'x' = '--silentx' ] if [ $1'x' = '-qx' -o $1'x' = '--quietx' -o $1'x' = '--silentx' ]
then then
quiet=1 quiet=1
else else
quiet=0 quiet=0
fi fi
# Included from shared functions # Included from shared functions
detect_system detect_system
@ -47,40 +46,31 @@ echo ''
echo 'On supported systems, we will now install build dependencies.' echo 'On supported systems, we will now install build dependencies.'
echo '' echo ''
# Until this point you may cancel without any modifications applied common_info() {
#exit 0 echo ''
echo 'Please report a bug at http://bugs.megaglest.org providing the following information:'
echo '--- snip ---'
echo 'Git revision: '"$gitcommit"
echo 'LSB support: '"$lsb"
echo 'Distribution: '"$distribution"
echo 'Release: '"$release"
echo 'Codename: '"$codename"
echo 'Architecture: '"$architecture"
echo '--- snip ---'
echo ''
if [ "$1" = "+wiki" ]; then
echo 'For now, you may want to take a look at the build hints on the MegaGlest wiki at:'
echo ' https://docs.megaglest.org/MG/Linux_Compiling'
echo 'If you can come up with something which works for you, please report back to us, too. Thanks!'
fi
}
unsupported_distribution () { unsupported_distribution () {
echo 'Unsupported Linux distribution.' >&2 echo 'Unsupported Linux distribution.' >&2
echo '' common_info +wiki
echo 'Please report a bug at http://bugs.megaglest.org providing the following information:'
echo '--- snip ---'
echo 'Git revision: '"$gitcommit"
echo 'LSB support: '"$lsb"
echo 'Distribution: '"$distribution"
echo 'Release: '"$release"
echo 'Codename: '"$codename"
echo 'Architecture: '"$architecture"
echo '--- snip ---'
echo ''
echo 'For now, you may want to take a look at the build hints on the MegaGlest wiki at http://wiki.megaglest.org/'
echo 'If you can come up with something which works for you, please report back to us, too. Thanks!'
} }
unsupported_release () { unsupported_release () {
echo 'Unsupported '"$distribution"' release.' >&2 echo 'Unsupported '"$distribution"' release.' >&2
echo '' common_info
echo 'Please report a bug at http://bugs.megaglest.org providing the following information:'
echo '--- snip ---'
echo 'Git revision: '"$gitcommit"
echo 'LSB support: '"$lsb"
echo 'Distribution: '"$distribution"
echo 'Release: '"$release"
echo 'Codename: '"$codename"
echo 'Architecture: '"$architecture"
echo '--- snip ---'
echo ''
if [ "$installcommand" != '' ] if [ "$installcommand" != '' ]
then then
echo 'For now, please try this (which works with other '"$distribution"' releases) and report back how it works for you:' echo 'For now, please try this (which works with other '"$distribution"' releases) and report back how it works for you:'
@ -88,22 +78,9 @@ unsupported_release () {
echo 'Thanks!' echo 'Thanks!'
fi fi
} }
error_during_installation () { error_during_installation () {
echo 'An error occurred while installing build dependencies.' >&2 echo 'An error occurred while installing build dependencies.' >&2
echo '' common_info +wiki
echo 'Please report a bugs at http://bugs.megaglest.org providing the following information:'
echo '--- snip ---'
echo 'Git revision: '"$gitcommit"
echo 'LSB support: '"$lsb"
echo 'Distribution: '"$distribution"
echo 'Release: '"$release"
echo 'Codename: '"$codename"
echo 'Architecture: '"$architecture"
echo '--- snip ---'
echo ''
echo 'For now, you may want to take a look at the build hints on the MegaGlest wiki at http://wiki.megaglest.org/'
echo 'If you can come up with something which works for you, please report back to us, too. Thanks!'
} }
if [ "$quiet" -eq "1" ]; then if [ "$quiet" -eq "1" ]; then
@ -111,7 +88,7 @@ if [ "$quiet" -eq "1" ]; then
URPMI_OPTIONS="$URPMI_OPTIONS -q --auto" URPMI_OPTIONS="$URPMI_OPTIONS -q --auto"
fi fi
packages_for_next_debian_ubuntu_mint="build-essential cmake libcurl4-gnutls-dev libsdl1.2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev" packages_for_next_debian_ubuntu_mint="build-essential cmake libcurl4-gnutls-dev libsdl1.2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev"
case $distribution in case $distribution in
Debian) Debian)
@ -152,11 +129,6 @@ case $distribution in
$installcommand $installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;; ;;
14.10)
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl1.2-dev libopenal-dev liblua5.2-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev"
$installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;;
15.04) 15.04)
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl1.2-dev libopenal-dev liblua5.2-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev" installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl1.2-dev libopenal-dev liblua5.2-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev"
$installcommand $installcommand
@ -188,12 +160,6 @@ case $distribution in
SuSE|SUSE?LINUX|Opensuse*|openSUSE*) SuSE|SUSE?LINUX|Opensuse*|openSUSE*)
case $release in case $release in
11.4)
#LTS
installcommand="zypper install gcc gcc-c++ cmake libSDL-devel MesaGLw-devel freeglut-devel libvorbis-devel wxGTK-devel lua-devel libjpeg-devel libpng14-devel libcurl-devel openal-soft-devel xorg-x11-libX11-devel libxml2-devel libircclient-devel glew-devel ftgl-devel fribidi-devel cppunit-devel"
$installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;;
13.1) 13.1)
#LTS #LTS
installcommand="zypper install gcc gcc-c++ cmake libSDL-devel Mesa-libGL-devel freeglut-devel libvorbis-devel wxGTK-devel lua-devel libjpeg-devel libpng-devel libcurl-devel openal-soft-devel xorg-x11-libX11-devel libxml2-devel libircclient-devel glew-devel ftgl-devel fribidi-devel cppunit-devel" installcommand="zypper install gcc gcc-c++ cmake libSDL-devel Mesa-libGL-devel freeglut-devel libvorbis-devel wxGTK-devel lua-devel libjpeg-devel libpng-devel libcurl-devel openal-soft-devel xorg-x11-libX11-devel libxml2-devel libircclient-devel glew-devel ftgl-devel fribidi-devel cppunit-devel"
@ -253,7 +219,7 @@ case $distribution in
esac esac
;; ;;
*) *)
unsupported_distribution unsupported_distribution
exit 1 exit 1
;; ;;

View File

@ -110,7 +110,12 @@ MenuStateOptionsSound::MenuStateOptionsSound(Program *program, MainMenu *mainMen
listBoxSoundFactory.pushBackItem(lang.getString("None")); listBoxSoundFactory.pushBackItem(lang.getString("None"));
listBoxSoundFactory.pushBackItem("OpenAL"); listBoxSoundFactory.pushBackItem("OpenAL");
listBoxSoundFactory.setSelectedItem(config.getString("FactorySound")); string FSoundMode=config.getString("FactorySound");
string FSoundModeT=lang.getString(config.getString("FactorySound"));
if(FSoundModeT != "???" + FSoundMode + "???") {
FSoundMode=FSoundModeT;
}
listBoxSoundFactory.setSelectedItem(FSoundMode);
currentLine-=lineOffset; currentLine-=lineOffset;
labelVolumeFx.registerGraphicComponent(containerName,"labelVolumeFx"); labelVolumeFx.registerGraphicComponent(containerName,"labelVolumeFx");
@ -419,7 +424,18 @@ void MenuStateOptionsSound::saveConfig(){
Lang &lang= Lang::getInstance(); Lang &lang= Lang::getInstance();
setActiveInputLable(NULL); setActiveInputLable(NULL);
config.setString("FactorySound", listBoxSoundFactory.getSelectedItem()); int FSoundIndex=listBoxSoundFactory.getSelectedItemIndex();
string FSoundMode;
switch (FSoundIndex) {
case 0:
FSoundMode = "None";
break;
case 1:
FSoundMode = "OpenAL";
break;
}
config.setString("FactorySound",FSoundMode);
config.setString("SoundVolumeFx", listBoxVolumeFx.getSelectedItem()); config.setString("SoundVolumeFx", listBoxVolumeFx.getSelectedItem());
config.setString("SoundVolumeAmbient", listBoxVolumeAmbient.getSelectedItem()); config.setString("SoundVolumeAmbient", listBoxVolumeAmbient.getSelectedItem());
CoreData::getInstance().getMenuMusic()->setVolume(strToInt(listBoxVolumeMusic.getSelectedItem())/100.f); CoreData::getInstance().getMenuMusic()->setVolume(strToInt(listBoxVolumeMusic.getSelectedItem())/100.f);