From 79aba82be3de5b6b571e2f59f7a34ded4b03160f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 15 Jun 2012 18:35:03 +0300 Subject: Add profile build to windows version. Change mingw dirs. --- build/bcmake | 4 ++-- build/bmake | 6 ++++-- build/dcmake | 10 ++++++++++ build/packevol | 2 +- build/packwin | 2 +- build/pcmake | 10 ++++++++++ build/toolchain.cmake | 12 ++++++------ build/toolchain.nightly | 14 +++++++------- nightly/packevol | 14 ++++++++++++++ nightly/packwin | 14 ++++++++++++++ packaging/windows/evol.nsi | 23 ++++++++++++++++++++--- packaging/windows/setup.nsi | 22 +++++++++++++++++++--- 12 files changed, 108 insertions(+), 25 deletions(-) create mode 100755 build/dcmake create mode 100755 build/pcmake create mode 100755 nightly/packevol create mode 100755 nightly/packwin diff --git a/build/bcmake b/build/bcmake index e4ac00022..d81499e0a 100755 --- a/build/bcmake +++ b/build/bcmake @@ -2,8 +2,8 @@ cd .. -#export PATH=/usr/i586-mingw32msvc/bin:$PATH -export CXXFLAGS="-Wall -g1 -O3 -static-libstdc++" +export PATH=/home/mingw/cross/i686-w64-mingw32/bin:/home/mingw/cross/bin:$PATH +export CXXFLAGS="-Wall -O3 -flto -fwhole-program -ffast-math -funswitch-loops" cmake -DCMAKE_TOOLCHAIN_FILE=build/toolchain.cmake . 2>build/make1.log make -j5 VERBOSE=1 2>>build/make.log diff --git a/build/bmake b/build/bmake index 83040ccd8..8ed74fc21 100755 --- a/build/bmake +++ b/build/bmake @@ -9,7 +9,9 @@ export CXX=g++-4.7 export LANG=C -export CXXFLAGS="-Wvariadic-macros -Wvla -Wredundant-decls \ +export CXXFLAGS="-ggdb3 -O3 -pipe -flto -fwhole-program -ffast-math \ +-funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ -Wpacked-bitfield-compat -Wtrampolines \ -Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ -fstrict-aliasing -Wunreachable-code -Wabi -Wdisabled-optimization \ @@ -18,7 +20,7 @@ export CXXFLAGS="-Wvariadic-macros -Wvla -Wredundant-decls \ -Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ -Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ -Wcast-align -Wpointer-arith -Wundef \ --Wmissing-include-dirs -Winit-self -pedantic -Wall -ggdb3 -O2 -pipe \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ -Wpacked -Wextra -Wstrict-overflow=1 -Wunknown-pragmas -Wwrite-strings \ -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ -Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated -Wextra \ diff --git a/build/dcmake b/build/dcmake new file mode 100755 index 000000000..7dd06c370 --- /dev/null +++ b/build/dcmake @@ -0,0 +1,10 @@ +#!/bin/bash + +cd .. + +export PATH=/home/mingw/cross/i686-w64-mingw32/bin:/home/mingw/cross/bin:$PATH +export CXXFLAGS="-Wall -g1 -O2 -ffast-math" +cmake -DCMAKE_TOOLCHAIN_FILE=build/toolchain.cmake . 2>build/make1.log + +make -j5 VERBOSE=1 2>>build/make.log + diff --git a/build/packevol b/build/packevol index 53ee258c2..91bde9423 100755 --- a/build/packevol +++ b/build/packevol @@ -6,7 +6,7 @@ dir=`pwd` cd packaging/windows ./make-translations.sh -makensis -DDLLDIR=$dir/../mana_win/libs/dll/ \ +makensis -DDLLDIR=$dir/../libs/dll/ \ -DPRODUCT_VERSION="1.2.6.10" \ -DEXESUFFIX=/src \ -DUPX=true \ diff --git a/build/packwin b/build/packwin index 16d92a32c..1b671b7d6 100755 --- a/build/packwin +++ b/build/packwin @@ -6,7 +6,7 @@ dir=`pwd` cd packaging/windows ./make-translations.sh -makensis -DDLLDIR=$dir/../mana_win/libs/dll/ \ +makensis -DDLLDIR=$dir/../libs/dll/ \ -DPRODUCT_VERSION="1.2.6.10" \ -DEXESUFFIX=/src \ -DUPX=true \ diff --git a/build/pcmake b/build/pcmake new file mode 100755 index 000000000..6f8db72d4 --- /dev/null +++ b/build/pcmake @@ -0,0 +1,10 @@ +#!/bin/bash + +cd .. + +export PATH=/home/mingw/cross/i686-w64-mingw32/bin:/home/mingw/cross/bin:$PATH +export CXXFLAGS="-Wall -g1 -O2 -pg -ffast-math" +cmake -DCMAKE_TOOLCHAIN_FILE=build/toolchain.cmake . 2>build/make1.log + +make -j5 VERBOSE=1 2>>build/make.log + diff --git a/build/toolchain.cmake b/build/toolchain.cmake index 1a40095cd..fab923a1f 100644 --- a/build/toolchain.cmake +++ b/build/toolchain.cmake @@ -16,15 +16,15 @@ SET(CMAKE_BUILD_TYPE None) SET(CMAKE_C_FLAGS -O3 -Wall) SET(CMAKE_CXX_FLAGS -O3 -Wall) -SET(SDLIMAGE_INCLUDE_DIR ../mana_win/libs/include/SDL) -SET(SDLMIXER_INCLUDE_DIR ../mana_win/libs/include/SDL) -SET(SDLNET_INCLUDE_DIR ../mana_win/libs/include/SDL) -SET(SDLTTF_INCLUDE_DIR ../mana_win/libs/include/SDL) -SET(SDL_INCLUDE_DIR ../mana_win/libs/include/SDL) +SET(SDLIMAGE_INCLUDE_DIR ../libs/include/SDL) +SET(SDLMIXER_INCLUDE_DIR ../libs/include/SDL) +SET(SDLNET_INCLUDE_DIR ../libs/include/SDL) +SET(SDLTTF_INCLUDE_DIR ../libs/include/SDL) +SET(SDL_INCLUDE_DIR ../libs/include/SDL) SET(ENABLE_MANASERV OFF) # here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /../mana_win/libs ) +SET(CMAKE_FIND_ROOT_PATH /home/mingw/cross/i686-w64-mingw32 /../libs/lib ) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search diff --git a/build/toolchain.nightly b/build/toolchain.nightly index 564732897..fab923a1f 100644 --- a/build/toolchain.nightly +++ b/build/toolchain.nightly @@ -3,7 +3,7 @@ SET(CMAKE_SYSTEM_NAME Windows) # toolchain prefix, can be overridden by -DTOOLCHAIN=... # IF (NOT TOOLCHAIN) -SET(TOOLCHAIN "i586-mingw32msvc-") +SET(TOOLCHAIN "i686-w64-mingw32-") # ENDIF() # which compilers to use for C and C++ @@ -16,15 +16,15 @@ SET(CMAKE_BUILD_TYPE None) SET(CMAKE_C_FLAGS -O3 -Wall) SET(CMAKE_CXX_FLAGS -O3 -Wall) -SET(SDLIMAGE_INCLUDE_DIR ./packaging/windows/libs/include/SDL) -SET(SDLMIXER_INCLUDE_DIR ./packaging/windows/libs/include/SDL) -SET(SDLNET_INCLUDE_DIR ./packaging/windows/libs/include/SDL) -SET(SDLTTF_INCLUDE_DIR ./packaging/windows/libs/include/SDL) -SET(SDL_INCLUDE_DIR ./packaging/windows/libs/include/SDL) +SET(SDLIMAGE_INCLUDE_DIR ../libs/include/SDL) +SET(SDLMIXER_INCLUDE_DIR ../libs/include/SDL) +SET(SDLNET_INCLUDE_DIR ../libs/include/SDL) +SET(SDLTTF_INCLUDE_DIR ../libs/include/SDL) +SET(SDL_INCLUDE_DIR ../libs/include/SDL) SET(ENABLE_MANASERV OFF) # here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc ./packaging/windows/ ) +SET(CMAKE_FIND_ROOT_PATH /home/mingw/cross/i686-w64-mingw32 /../libs/lib ) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search diff --git a/nightly/packevol b/nightly/packevol new file mode 100755 index 000000000..1e0bc5d7d --- /dev/null +++ b/nightly/packevol @@ -0,0 +1,14 @@ +#!/bin/bash + +cd .. + +dir=`pwd` + +cd packaging/windows +./make-translations.sh +makensis -DDLLDIR=$dir/../libs/dll/ \ + -DPRODUCT_VERSION="nightly-$1" \ + -DEXESUFFIX=/src \ + -DUPX=true \ + evol.nsi + diff --git a/nightly/packwin b/nightly/packwin new file mode 100755 index 000000000..05e4eac14 --- /dev/null +++ b/nightly/packwin @@ -0,0 +1,14 @@ +#!/bin/bash + +cd .. + +dir=`pwd` + +cd packaging/windows +./make-translations.sh +makensis -DDLLDIR=$dir/../libs/dll/ \ + -DPRODUCT_VERSION="nightly-$1" \ + -DEXESUFFIX=/src \ + -DUPX=true \ + setup.nsi + diff --git a/packaging/windows/evol.nsi b/packaging/windows/evol.nsi index debdfb296..4469c7b85 100644 --- a/packaging/windows/evol.nsi +++ b/packaging/windows/evol.nsi @@ -253,11 +253,14 @@ Section "Core files (required)" SecCore File "${DLLDIR}\exchndl.dll" File "${DLLDIR}\libcurl-4.dll" File "${DLLDIR}\libgcc_s_sjlj-1.dll" + File "${DLLDIR}\libfreetype-6.dll" File "${DLLDIR}\libiconv-2.dll" File "${DLLDIR}\libintl-8.dll" File "${DLLDIR}\libjpeg-8.dll" File "${DLLDIR}\libogg-0.dll" File "${DLLDIR}\libpng15-15.dll" + File "${DLLDIR}\libSDL_gfx-13.dll" + File "${DLLDIR}\libstdc++-6.dll" File "${DLLDIR}\libvorbis-0.dll" File "${DLLDIR}\libvorbisfile-3.dll" File "${DLLDIR}\libxml2-2.dll" @@ -342,9 +345,20 @@ SectionEnd Section /o "Debugger" SecDebug SetOutPath "$INSTDIR" File "${DLLDIR}\gdb.exe" + File "${EXEDIR}\manaplusd.exe" ${If} ${SectionIsSelected} ${SecShortcuts} - CreateShortCut "$SMPROGRAMS\EvolOnline\EvolOnline (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplus.exe"' "$INSTDIR\manaplus.exe" 1 - CreateShortCut "$DESKTOP\EvolOnline (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplus.exe"' "$INSTDIR\manaplus.exe" 1 + CreateShortCut "$SMPROGRAMS\EvolOnline\EvolOnline (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplusd.exe"' "$INSTDIR\manaplusd.exe" 1 + CreateShortCut "$DESKTOP\EvolOnline (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplusd.exe"' "$INSTDIR\manaplusd.exe" 1 + ${EndIf} +SectionEnd + +Section /o "Profiler" SecProfiler + SetOutPath "$INSTDIR" + File "${EXEDIR}\manaplusp.exe" + + ${If} ${SectionIsSelected} ${SecShortcuts} + CreateShortCut "$SMPROGRAMS\EvolOnline\EvolOnline (profiler).lnk" '"$INSTDIR\manaplusp.exe"' '"$INSTDIR\evol.manaplus"' "$INSTDIR\manaplus.exe" 1 + CreateShortCut "$DESKTOP\EvolOnline (profiler).lnk" '"$INSTDIR\manaplusp.exe"' '"$INSTDIR\evol.manaplus"' "$INSTDIR\manaplus.exe" 1 ${EndIf} SectionEnd @@ -369,7 +383,8 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${SecPortable} "Portable client. (If selected client will work as portable client.)" !insertmacro MUI_DESCRIPTION_TEXT ${SecEvolMusic} "Background evol music. (If selected the evol music will be downloaded from the internet.)" !insertmacro MUI_DESCRIPTION_TEXT ${SecTrans} "Translations for the user interface. Uncheck this component to leave it in English." - !insertmacro MUI_DESCRIPTION_TEXT ${SecDebug} "Install debugger for try to find stability problems." + !insertmacro MUI_DESCRIPTION_TEXT ${SecDebug} "Install debugger for try to detect stability issues." + !insertmacro MUI_DESCRIPTION_TEXT ${SecProfiler} "Install profiler build to detect perfomance issues." !insertmacro MUI_FUNCTION_DESCRIPTION_END @@ -407,9 +422,11 @@ Section Uninstall Delete "$SMPROGRAMS\EvolOnline\Uninstall.lnk" Delete "$DESKTOP\EvolOnline.lnk" Delete "$DESKTOP\EvolOnline (debug).lnk" + Delete "$DESKTOP\EvolOnline (profiler).lnk" Delete "$DESKTOP\EvolOnline (tests).lnk" Delete "$SMPROGRAMS\EvolOnline\EvolOnline.lnk" Delete "$SMPROGRAMS\EvolOnline\EvolOnline (debug).lnk" + Delete "$SMPROGRAMS\EvolOnline\EvolOnline (profiler).lnk" Delete "$SMPROGRAMS\EvolOnline\EvolOnline (no opengl).lnk" Delete "$SMPROGRAMS\EvolOnline\EvolOnline (safemode).lnk" Delete "$SMPROGRAMS\EvolOnline\EvolOnline (tests).lnk" diff --git a/packaging/windows/setup.nsi b/packaging/windows/setup.nsi index 689165699..4443b6e1f 100644 --- a/packaging/windows/setup.nsi +++ b/packaging/windows/setup.nsi @@ -250,11 +250,14 @@ Section "Core files (required)" SecCore File "${DLLDIR}\exchndl.dll" File "${DLLDIR}\libcurl-4.dll" File "${DLLDIR}\libgcc_s_sjlj-1.dll" + File "${DLLDIR}\libfreetype-6.dll" File "${DLLDIR}\libiconv-2.dll" File "${DLLDIR}\libintl-8.dll" File "${DLLDIR}\libjpeg-8.dll" File "${DLLDIR}\libogg-0.dll" File "${DLLDIR}\libpng15-15.dll" + File "${DLLDIR}\libSDL_gfx-13.dll" + File "${DLLDIR}\libstdc++-6.dll" File "${DLLDIR}\libvorbis-0.dll" File "${DLLDIR}\libvorbisfile-3.dll" File "${DLLDIR}\libxml2-2.dll" @@ -343,9 +346,19 @@ SectionEnd Section /o "Debugger" SecDebug SetOutPath "$INSTDIR" File "${DLLDIR}\gdb.exe" + File "${EXEDIR}\manaplusd.exe" ${If} ${SectionIsSelected} ${SecShortcuts} - CreateShortCut "$SMPROGRAMS\Mana\ManaPlus (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplus.exe"' "$INSTDIR\manaplus.exe" - CreateShortCut "$DESKTOP\ManaPlus (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplus.exe"' "$INSTDIR\manaplus.exe" + CreateShortCut "$SMPROGRAMS\Mana\ManaPlus (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplusd.exe"' "$INSTDIR\manaplusd.exe" + CreateShortCut "$DESKTOP\ManaPlus (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplusd.exe"' "$INSTDIR\manaplusd.exe" + ${EndIf} +SectionEnd + +Section /o "Profiler" SecProfiler + SetOutPath "$INSTDIR" + File "${EXEDIR}\manaplusp.exe" + ${If} ${SectionIsSelected} ${SecShortcuts} + CreateShortCut "$SMPROGRAMS\Mana\ManaPlus (profiler).lnk" "$INSTDIR\manaplusp.exe" + CreateShortCut "$DESKTOP\ManaPlus (profiler).lnk" "$INSTDIR\manaplusp.exe" ${EndIf} SectionEnd @@ -389,7 +402,8 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${SecEvol} "Create shortcuts for Evol Online." !insertmacro MUI_DESCRIPTION_TEXT ${SecEvolMusic} "Background evol music. (If selected the evol music will be downloaded from the internet.)" !insertmacro MUI_DESCRIPTION_TEXT ${SecTrans} "Translations for the user interface. Uncheck this component to leave it in English." - !insertmacro MUI_DESCRIPTION_TEXT ${SecDebug} "Install debugger for try to find stability problems." + !insertmacro MUI_DESCRIPTION_TEXT ${SecDebug} "Install debugger for try to detect stability issues." + !insertmacro MUI_DESCRIPTION_TEXT ${SecProfiler} "Install profiler build to detect perfomance issues." !insertmacro MUI_FUNCTION_DESCRIPTION_END @@ -425,9 +439,11 @@ Section Uninstall Delete "$SMPROGRAMS\Mana\Uninstall.lnk" Delete "$DESKTOP\ManaPlus.lnk" Delete "$DESKTOP\ManaPlus (debug).lnk" + Delete "$DESKTOP\ManaPlus (profiler).lnk" Delete "$DESKTOP\ManaPlus (tests).lnk" Delete "$SMPROGRAMS\Mana\ManaPlus.lnk" Delete "$SMPROGRAMS\Mana\ManaPlus (debug).lnk" + Delete "$SMPROGRAMS\Mana\ManaPlus (profiler).lnk" Delete "$SMPROGRAMS\Mana\ManaPlus (no opengl).lnk" Delete "$SMPROGRAMS\Mana\ManaPlus (safemode).lnk" Delete "$SMPROGRAMS\Mana\ManaPlus (tests).lnk" -- cgit v1.2.3-60-g2f50