From 8844c34736e78607feca2bf6c3093b78debb1dc4 Mon Sep 17 00:00:00 2001 From: pasnox Date: Sat, 19 Jun 2010 21:32:28 +0000 Subject: [PATCH] Better crossbuild openssl configuration for windows. Better skip libgcc if not found for windows package. Better wine integration in release-all.sh --- libwbfs/shared.pri | 9 +++++--- packages/release-all.sh | 48 ++++++++++++++++++++++++----------------- packages/windows.iss | 6 +++--- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/libwbfs/shared.pri b/libwbfs/shared.pri index f409450..05bf7ae 100644 --- a/libwbfs/shared.pri +++ b/libwbfs/shared.pri @@ -19,9 +19,12 @@ INCLUDEPATH *= $${LIB_WBFS_PWD} DEPENDPATH *= $${LIB_WBFS_PWD} win32 { - isEqual( QT_ARCH, "x86_64" ):OPENSSL_INSTALL_DIR = $(HOME)/.wine/drive_c/Development/OpenSSL - else:OPENSSL_INSTALL_DIR = D:/Developpement/OpenSSL - #OPENSSL_INSTALL_DIR = $(HOME)/Win32Libraries + OS=$$system( "uname -s" ) + + OPENSSL_INSTALL_DIR = D:/Developpement/OpenSSL + isEqual( OS, "Darwin" ):OPENSSL_INSTALL_DIR = $(HOME)/Win32Libraries + else:isEqual( OS, "Linux" ):OPENSSL_INSTALL_DIR = $(HOME)/.wine/drive_c/Development/OpenSSL + *-g++*:LIBS *= -L$${OPENSSL_INSTALL_DIR}/lib -L$${OPENSSL_INSTALL_DIR}/lib/MinGW *-msvc*:LIBS *= -L$${OPENSSL_INSTALL_DIR}/lib -L$${OPENSSL_INSTALL_DIR}/lib/VC INCLUDEPATH *= $${OPENSSL_INSTALL_DIR}/include diff --git a/packages/release-all.sh b/packages/release-all.sh index fb806e5..cee6dd7 100755 --- a/packages/release-all.sh +++ b/packages/release-all.sh @@ -28,6 +28,18 @@ WIN_PACKAGE=$BASE_NAME-win32.zip MAC_PACKAGE=$BASE_NAME.dmg CUR_PATH=$PWD +if [ $OS = "Linux" ]; then + WINE="wine" + WINE_DRIVE="$HOME/.wine/drive_c" + WINE_PROGRAM_FILES="$WINE_DRIVE/Program Files" +fi + +if [ $OS = "Darwin" ]; then + WINE="/Applications/Wine.app/Contents/Resources/bin/wine" + WINE_DRIVE="$HOME/.wine/drive_c" + WINE_PROGRAM_FILES="$WINE_DRIVE/Program Files" +fi + export OS export VERSION export VERSION_STR @@ -74,10 +86,9 @@ crossBuild() QT_WIN32_VERSION="4.6.1" QT_PATH="/usr" MKSPEC="$HOME/.qt/win32-x11-g++" - QT_WIN32_PATH="$HOME/Disk Wine/Development/Qt/$QT_WIN32_VERSION" - WINE="wine" - ISCC="$HOME/Disk Wine/Program Files/Inno Setup 5/ISCC.exe" - DLLS_PATH="$HOME/Disk Wine/Development/OpenSSL" + QT_WIN32_PATH="$WINE_DRIVE/Development/Qt/$QT_WIN32_VERSION" + ISCC="$WINE_PROGRAM_FILES/Inno Setup 5/ISCC.exe" + DLLS_PATH="$WINE_DRIVE/Development/OpenSSL" fi if [ $OS = "Darwin" ]; then @@ -86,8 +97,7 @@ crossBuild() QT_PATH="/usr/local/Trolltech/Qt-$QT_VERSION" MKSPEC="$HOME/mkspecs/4.6.x/win32-osx-g++" QT_WIN32_PATH="/usr/local/Trolltech/win32/$QT_WIN32_VERSION" - WINE="/Applications/Wine.app/Contents/Resources/bin/wine" - ISCC="$HOME/Wine Files/drive_c/Program Files/Inno_Setup_5_gpl/ISCC.exe" + ISCC="$WINE_PROGRAM_FILES/Inno_Setup_5_gpl/ISCC.exe" DLLS_PATH="$HOME/Win32Libraries/bin" fi @@ -117,16 +127,6 @@ windowsZipPackage() { echo "Creating windows zip package" - if [ $OS = "Linux" ]; then - WINE="wine" - WINE_PROGRAM_FILES="$HOME/Disk Wine/Program Files" - fi - - if [ $OS = "Darwin" ]; then - WINE="/Applications/Wine.app/Contents/Resources/bin/wine" - WINE_PROGRAM_FILES="$HOME/Wine Files/drive_c/Program Files" - fi - # uninstall previous package find "$WINE_PROGRAM_FILES/QWBFS Manager" -name "unins*.exe" -print0 | xargs -0 -I {} $WINE {} /silent @@ -161,8 +161,11 @@ macPackage() "$QT_PATH/bin/qmake" -r make -j4 release "$QT_PATH/bin/macdeployqt" "$BUNDLE_APP_PATH" -dmg - mv "$BUNDLE_PATH/$BUNDLE_NAME.dmg" "$MAC_PACKAGE" cd "$CUR_PATH" + + if [ -f "./$FOLDER_NAME/$BUNDLE_PATH/$BUNDLE_NAME.dmg" ]; then + mv "./$FOLDER_NAME/$BUNDLE_PATH/$BUNDLE_NAME.dmg" "./$MAC_PACKAGE" + fi } # delete source folder @@ -191,13 +194,18 @@ crossBuild # create windows zip package windowsZipPackage -# delete exported repository -deleteIfExists ./$FOLDER_NAME - if [ $OS = "Darwin" ]; then macPackage + killall wine + killall WineBottler + killall X11.bin fi if [ $OS = "Linux" ]; then echo "Linux" fi + +# delete exported repository +deleteIfExists ./$FOLDER_NAME + +echo "********** Processing release finished **********" diff --git a/packages/windows.iss b/packages/windows.iss index a8239e4..24a34fe 100644 --- a/packages/windows.iss +++ b/packages/windows.iss @@ -64,9 +64,9 @@ Source: {#QT_PATH}\plugins\codecs\*.dll; DestDir: {app}\qt\plugins\codecs; Flags Source: {#QT_PATH}\plugins\graphicssystems\*.dll; DestDir: {app}\qt\plugins\graphicssystems; Flags: promptifolder; Excludes: *d4.dll Source: {#QT_PATH}\plugins\imageformats\*.dll; DestDir: {app}\qt\plugins\imageformats; Flags: promptifolder; Excludes: *d4.dll Source: {#QT_PATH}\translations\qt*.qm; DestDir: {app}\qt\translations; Flags: promptifolder recursesubdirs; Excludes: qt_help*.qm,qtconfig*.qm -; MinGW related files -Source: {#DLLS_PATH}\mingwm10.dll; DestDir: {app}; Flags: promptifolder -Source: {#DLLS_PATH}\libgcc_s_dw2-1.dll; DestDir: {app}; Flags: promptifolder +; Dependencies related files +Source: {#QT_PATH}\bin\mingwm10.dll; DestDir: {app}; Flags: promptifolder +Source: {#QT_PATH}\bin\libgcc_s_dw2-1.dll; DestDir: {app}; Flags: promptifolder skipifsourcedoesntexist Source: {#DLLS_PATH}\libeay32.dll; DestDir: {app}; Flags: promptifolder Source: {#DLLS_PATH}\libssl32.dll; DestDir: {app}; Flags: promptifolder