Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

RIP static windows build script

parent 39cfab46
Pipeline #28596 passed with stages
in 49 minutes and 2 seconds
......@@ -37,21 +37,6 @@ linux-appimage:
- master
- stable
windows-mxe:
stage: deploy
image: kaidan/windows-mxe
script:
- utils/build-windows-mxe.sh
- mv build/bin/kaidan.exe kaidan.exe
allow_failure: true
artifacts:
paths:
- "kaidan.exe"
expire_in: 1 week
only:
- master
- stable
android:
stage: deploy
image: kdeorg/android-sdk
......
......@@ -255,9 +255,7 @@ if(STATIC_BUILD)
CONVERT_PRL_LIBS_TO_CMAKE(${qt_module})
endforeach()
if(WIN32)
CONVERT_PRL_LIBS_TO_CMAKE(QWindowsIntegrationPlugin)
elseif(IOS)
if(IOS)
foreach(qt_module QIOSIntegrationPlugin QMacHeifPlugin QMacJp2Plugin
QICNSPlugin QTgaPlugin QTiffPlugin QWbmpPlugin QWebpPlugin)
CONVERT_PRL_LIBS_TO_CMAKE(${qt_module})
......@@ -313,11 +311,7 @@ if(STATIC_BUILD)
${__Qt5Widgets_LIBRARIES}
)
if(WIN32)
target_link_libraries(${PROJECT_NAME}
Qt5::QWindowsIntegrationPlugin
)
elseif(IOS)
if(IOS)
target_link_libraries(${PROJECT_NAME}
Qt5::QIOSIntegrationPlugin
Qt5::QMacHeifPlugin
......
#!/bin/bash
# NOTE: To use this script, you need to set $MXE_ROOT to your the root of your MXE toolchain
if [ -z "$MXE_ROOT" ]; then
echo "MXE_ROOT has to be set"
exit 1
fi
# Build type is one of:
# Debug, Release, RelWithDebInfo and MinSizeRel
BUILD_TYPE="${BUILD_TYPE:-Debug}"
# MXE target is one of:
# i686-w64-mingw32.static, i686-w64-mingw32.shared,
# x86_64-w64-mingw32.static, x86_64-w64-mingw32.shared
MXE_TARGET="${MXE_TARGET:-i686-w64-mingw32.static}"
KAIDAN_SOURCES=$(dirname "$(readlink -f "${0}")")/..
echo "-- Starting $BUILD_TYPE build of Kaidan --"
echo "*****************************************"
echo "Fetching dependencies if required"
echo "*****************************************"
if [ ! -f "$KAIDAN_SOURCES/3rdparty/kirigami/.git" ] || [ ! -f "$KAIDAN_SOURCES/3rdparty/breeze-icons/.git" ]; then
echo "Cloning Kirigami and Breeze icons"
git submodule update --init
fi
if [ ! -d "$KAIDAN_SOURCES/3rdparty/qxmpp/.git" ]; then
echo "Cloning QXmpp"
git clone https://github.com/qxmpp-project/qxmpp.git 3rdparty/qxmpp
fi
if [ ! -d $MXE_ROOT ]; then
if [ ! -z "$INIT_TOOLCHAIN" ]; then
echo "INIT_TOOLCHAIN is set, cloning the MXE toolchain"
git clone https://github.com/mxe/mxe.git $MXE_ROOT
else
echo "MXE toolchain does not exist and INIT_TOOLCHAIN is not set"
exit 1
fi
fi
if [ ! -d $MXE_ROOT ]; then
if [ ! -z "$INIT_TOOLCHAIN" ]; then
echo "INIT_TOOLCHAIN is set, cloning the MXE toolchain"
git clone https://github.com/mxe/mxe.git
else
echo "MXE toolchain does not exist and INIT_TOOLCHAIN is not set"
exit 1
fi
fi
if [ ! -d $MXE_ROOT/usr/$MXE_TARGET ]; then
cd $MXE_ROOT
make MXE_TARGETS="$MXE_TARGET" qtbase qtdeclarative qtquickcontrols2 qtgraphicaleffects qttools --jobs=$(nproc)
fi
export PATH=$MXE_ROOT/usr/bin:$PATH
cdnew() {
if [ -d "$1" ]; then
rm -rf "$1"
fi
mkdir $1
cd $1
}
if [ ! -d "$MXE_ROOT/usr/$MXE_TARGET/lib/cmake/KF5Kirigami2" ]; then
echo "*****************************************"
echo "Building Kirigami"
echo "*****************************************"
{
cdnew $KAIDAN_SOURCES/3rdparty/kirigami/build
$MXE_TARGET-cmake .. \
-DECM_DIR=/usr/share/ECM/cmake \
-DSTATIC_LIBRARY=1 \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
make -j$(nproc)
make install
rm -rf $KAIDAN_SOURCES/3rdparty/kirigami/build
}
fi
if [ ! -f "$MXE_ROOT/usr/$MXE_TARGET/lib/pkgconfig/qxmpp.pc" ]; then
echo "*****************************************"
echo "Building QXmpp"
echo "*****************************************"
{
cdnew $KAIDAN_SOURCES/3rdparty/qxmpp/build
$MXE_TARGET-cmake .. \
-DBUILD_TESTS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_SHARED=OFF \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
make -j$(nproc)
make install
rm -rf $KAIDAN_SOURCES/3rdparty/qxmpp/build
}
fi
if [ ! -d "$KAIDAN_SOURCES/misc/windows" ]; then
echo "*****************************************"
echo "Rendering logos"
echo "*****************************************"
rendersvg() {
inkscape -z -e $2 -w $3 -h $3 $1
optipng -quiet $2
}
winlogo() {
rendersvg $KAIDAN_SOURCES/data/images/kaidan.svg "$KAIDAN_SOURCES/misc/windows/$1-kaidan.png" $1
optipng -o9 "$KAIDAN_SOURCES/misc/windows/$1-kaidan.png"
}
mkdir -p $KAIDAN_SOURCES/misc/windows
winlogo 16
winlogo 32
winlogo 48
winlogo 256
fi
if [ ! -f "$KAIDAN_SOURCES/build/bin/kaidan" ]; then
echo "*****************************************"
echo "Building Kaidan"
echo "*****************************************"
{
cdnew $KAIDAN_SOURCES/build
$MXE_TARGET-cmake .. \
-DECM_DIR=/usr/share/ECM/cmake -DI18N=1 \
-DSTATIC_BUILD=1 \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DQUICK_COMPILER=1 \
-DUSE_KNOTIFICATIONS=OFF
make -j$(nproc)
}
fi
if [ ! -z "$UPX" ]; then
echo "*****************************************"
echo "Compressing executable"
echo "*****************************************"
{
upx -9 $KAIDAN_SOURCES/build/bin/kaidan.exe
}
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment