diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3879291..86d38b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,7 +69,7 @@ jobs: export CC=clang export CXX=clang++ export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig/ - ./build_appimage_32.sh -j4 -q quirks-ubuntu-1604-32.sh -k "zsync|https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/ng.appimage/version.i386.zsync" -i ${GITHUB_RUN_NUMBER} + ./build_appimage.sh -t x86 -j4 -q quirks-ubuntu-1604-32.sh -k "zsync|https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/ng.appimage/version.i386.zsync" -i ${GITHUB_RUN_NUMBER} - name: create update info run: | cd output @@ -80,14 +80,14 @@ jobs: name: i386.AppImage path: output/ buildbusterappimage: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build run: | docker run --rm --privileged multiarch/qemu-user-static --reset -p yes docker pull buildpack-deps:buster - docker run -e GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER} -v $PWD/ldd:/usr/bin/ldd -v $PWD:$PWD -w $PWD --rm buildpack-deps:buster bash -c "dpkg --add-architecture i386 && dpkg --add-architecture armhf && apt update && DEBIAN_FRONTEND=noninteractive apt install -y libfuse-dev:armhf wget texinfo apt-transport-https vim-common qemu-user clang chrpath libstdc++-8-dev:armhf libatomic1:armhf python3-pip wget cmake g++-arm-linux-gnueabihf patchelf libegl1-mesa:i386 zlib1g:i386 libstdc++6:i386 libgl1-mesa-dri:i386 libasound2:i386 pulseaudio:i386 libpng-dev:armhf libx11-dev:armhf libxi-dev:armhf libcurl4-openssl-dev:armhf libudev-dev:armhf libevdev-dev:armhf libegl1-mesa-dev:armhf libasound2:armhf qt5-default:armhf git cmake pkg-config qtbase5-dev:armhf qtwebengine5-dev:armhf libssl-dev:armhf libcurl4-openssl-dev:armhf libpng-dev:armhf libx11-dev:armhf libxi-dev:armhf libssl-dev:armhf libudev-dev:armhf libevdev-dev:armhf libegl1-mesa-dev:armhf libgl1-mesa-dev:armhf libssl-dev:armhf libuv1-dev:armhf libzip-dev:armhf libprotobuf-dev:armhf protobuf-compiler qtdeclarative5-dev:armhf libqt5svg5-dev:armhf qml-module-qtwebengine:armhf qml-module-qtquick2:armhf qml-module-qtquick-layouts:armhf qml-module-qtquick-controls:armhf qml-module-qtquick-controls2:armhf qml-module-qtquick-window2:armhf qml-module-qtquick-dialogs:armhf qml-module-qt-labs-settings:armhf qml-module-qt-labs-folderlistmodel:armhf jq curl binutils desktop-file-utils squashfs-tools qtdeclarative5-dev-tools:armhf libssl-dev:armhf libpulse-dev:armhf && QMAKE=/usr/bin/arm-linux-gnueabihf-qmake PATH=/usr/lib/arm-linux-gnueabihf/qt5/bin/:$PATH LD_LIBRARY_PATH=${PWD}/build/AppDir/usr/lib NO_STRIP=1 CC=clang CXX=clang++ PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/ ./build_appimage_armhf2.sh -j4 -k 'zsync|https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/ng.appimage/version.armhf.zsync' -i ${GITHUB_RUN_NUMBER}" + docker run -e GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER} -v $PWD/ldd:/usr/bin/ldd -v $PWD:$PWD -w $PWD --rm buildpack-deps:buster bash -c "dpkg --add-architecture i386 && dpkg --add-architecture armhf && apt update && DEBIAN_FRONTEND=noninteractive apt install -y libfuse-dev:armhf wget texinfo apt-transport-https vim-common qemu-user clang chrpath libstdc++-8-dev:armhf libatomic1:armhf python3-pip wget cmake g++-arm-linux-gnueabihf patchelf libegl1-mesa:i386 zlib1g:i386 libstdc++6:i386 libgl1-mesa-dri:i386 libasound2:i386 pulseaudio:i386 libpng-dev:armhf libx11-dev:armhf libxi-dev:armhf libcurl4-openssl-dev:armhf libudev-dev:armhf libevdev-dev:armhf libegl1-mesa-dev:armhf libasound2:armhf qt5-default:armhf git cmake pkg-config qtbase5-dev:armhf qtwebengine5-dev:armhf libssl-dev:armhf libcurl4-openssl-dev:armhf libpng-dev:armhf libx11-dev:armhf libxi-dev:armhf libssl-dev:armhf libudev-dev:armhf libevdev-dev:armhf libegl1-mesa-dev:armhf libgl1-mesa-dev:armhf libssl-dev:armhf libuv1-dev:armhf libzip-dev:armhf libprotobuf-dev:armhf protobuf-compiler qtdeclarative5-dev:armhf libqt5svg5-dev:armhf qml-module-qtwebengine:armhf qml-module-qtquick2:armhf qml-module-qtquick-layouts:armhf qml-module-qtquick-controls:armhf qml-module-qtquick-controls2:armhf qml-module-qtquick-window2:armhf qml-module-qtquick-dialogs:armhf qml-module-qt-labs-settings:armhf qml-module-qt-labs-folderlistmodel:armhf jq curl binutils desktop-file-utils squashfs-tools qtdeclarative5-dev-tools:armhf libssl-dev:armhf libpulse-dev:armhf && QMAKE=/usr/bin/arm-linux-gnueabihf-qmake PATH=/usr/lib/arm-linux-gnueabihf/qt5/bin/:$PATH LD_LIBRARY_PATH=${PWD}/build/AppDir/usr/lib NO_STRIP=1 CC=clang CXX=clang++ PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/ ./build_appimage.sh -t armhf -j4 -k 'zsync|https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/ng.appimage/version.armhf.zsync' -i ${GITHUB_RUN_NUMBER}" - name: Generate update info run: | cd output @@ -98,14 +98,14 @@ jobs: name: armhfappimagebuster path: output/ buildarmappimage64: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build run: | docker run --rm --privileged multiarch/qemu-user-static --reset -p yes docker pull buildpack-deps:bionic - docker run -e GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER} -v $PWD/ldd:/usr/bin/ldd -v $PWD/sources.list:/etc/apt/sources.list -v $PWD:$PWD -w $PWD --rm buildpack-deps:bionic bash -c "dpkg --add-architecture arm64 && dpkg --add-architecture armhf && apt update && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y && add-apt-repository "ppa:rncbc/libs-bionic" -y && apt update && DEBIAN_FRONTEND=noninteractive apt install -y libfuse-dev:arm64 wget texinfo apt-transport-https vim-common qemu-user clang-9 chrpath libstdc++-8-dev:arm64 libstdc++-8-dev:armhf libatomic1:armhf libatomic1:arm64 wget cmake g++-arm-linux-gnueabihf g++-aarch64-linux-gnu patchelf libpng-dev:armhf libx11-dev:armhf libxi-dev:armhf libcurl4-openssl-dev:armhf libudev-dev:armhf libevdev-dev:armhf libegl1-mesa-dev:armhf libasound2:armhf qt5-default:arm64 git cmake pkg-config qtbase5-dev:arm64 qtwebengine5-dev:arm64 libssl-dev:arm64 libcurl4-openssl-dev:arm64 libpng-dev:arm64 libx11-dev:arm64 libxi-dev:arm64 libssl-dev:arm64 libudev-dev:arm64 libevdev-dev:arm64 libegl1-mesa-dev:arm64 libgl1-mesa-dev:arm64 libssl-dev:arm64 libuv1-dev:arm64 libzip-dev:arm64 libprotobuf-dev:arm64 protobuf-compiler qtdeclarative5-dev:arm64 libqt5svg5-dev:arm64 qml-module-qtwebengine:arm64 qml-module-qtquick2:arm64 qml-module-qtquick-layouts:arm64 qml-module-qtquick-controls:arm64 qml-module-qtquick-controls2:arm64 qml-module-qtquick-window2:arm64 qml-module-qtquick-dialogs:arm64 qml-module-qt-labs-settings:arm64 qml-module-qt-labs-folderlistmodel:arm64 jq curl binutils desktop-file-utils squashfs-tools qtdeclarative5-dev-tools:arm64 libssl-dev:arm64 libpulse-dev:arm64 libssl-dev:armhf libpulse-dev:armhf && QMAKE=/usr/bin/aarch64-linux-gnu-qmake PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/ PATH=/usr/lib/aarch64-linux-gnu/qt5/bin/:$PATH LD_LIBRARY_PATH=${PWD}/build/AppDir/usr/lib NO_STRIP=1 CC=clang-9 CXX=clang++-9 ./build_appimage_arm64.sh -j4 -k 'zsync|https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/ng.appimage/version.arm_aarch64.zsync' -i ${GITHUB_RUN_NUMBER}" + docker run -e GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER} -v $PWD/ldd:/usr/bin/ldd -v $PWD/sources.list:/etc/apt/sources.list -v $PWD:$PWD -w $PWD --rm buildpack-deps:bionic bash -c "dpkg --add-architecture arm64 && dpkg --add-architecture armhf && apt update && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y && add-apt-repository "ppa:rncbc/libs-bionic" -y && apt update && DEBIAN_FRONTEND=noninteractive apt install -y libfuse-dev:arm64 wget texinfo apt-transport-https vim-common qemu-user clang-9 chrpath libstdc++-8-dev:arm64 libstdc++-8-dev:armhf libatomic1:armhf libatomic1:arm64 wget cmake g++-arm-linux-gnueabihf g++-aarch64-linux-gnu patchelf libpng-dev:armhf libx11-dev:armhf libxi-dev:armhf libcurl4-openssl-dev:armhf libudev-dev:armhf libevdev-dev:armhf libegl1-mesa-dev:armhf libasound2:armhf qt5-default:arm64 git cmake pkg-config qtbase5-dev:arm64 qtwebengine5-dev:arm64 libssl-dev:arm64 libcurl4-openssl-dev:arm64 libpng-dev:arm64 libx11-dev:arm64 libxi-dev:arm64 libssl-dev:arm64 libudev-dev:arm64 libevdev-dev:arm64 libegl1-mesa-dev:arm64 libgl1-mesa-dev:arm64 libssl-dev:arm64 libuv1-dev:arm64 libzip-dev:arm64 libprotobuf-dev:arm64 protobuf-compiler qtdeclarative5-dev:arm64 libqt5svg5-dev:arm64 qml-module-qtwebengine:arm64 qml-module-qtquick2:arm64 qml-module-qtquick-layouts:arm64 qml-module-qtquick-controls:arm64 qml-module-qtquick-controls2:arm64 qml-module-qtquick-window2:arm64 qml-module-qtquick-dialogs:arm64 qml-module-qt-labs-settings:arm64 qml-module-qt-labs-folderlistmodel:arm64 jq curl binutils desktop-file-utils squashfs-tools qtdeclarative5-dev-tools:arm64 libssl-dev:arm64 libpulse-dev:arm64 libssl-dev:armhf libpulse-dev:armhf && QMAKE=/usr/bin/aarch64-linux-gnu-qmake PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/ PATH=/usr/lib/aarch64-linux-gnu/qt5/bin/:$PATH LD_LIBRARY_PATH=${PWD}/build/AppDir/usr/lib NO_STRIP=1 CC=clang-9 CXX=clang++-9 ./build_appimage.sh -t arm64 -j4 -k 'zsync|https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/ng.appimage/version.arm_aarch64.zsync' -i ${GITHUB_RUN_NUMBER}" - name: Generate update info run: | cd output @@ -116,9 +116,9 @@ jobs: name: arm64appimagebuster path: output/ publish: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: [ build, build32, buildbusterappimage, buildarmappimage64 ] - if: ${{ always() }} + if: ${{ !cancelled() }} steps: - uses: actions/checkout@v2 - run: echo "APPIMAGE_VERSION=$(cat version.txt)" >> $GITHUB_ENV @@ -161,7 +161,8 @@ jobs: ./ghr*/ghr -t ${{ secrets.GITHUB_TOKEN }} -u ChristopherHX -r linux-packaging-scripts -replace appimage output3/ env: LAUNCHER_RELEASE_DESCRIPTION: | - This Release is for Minecraft Android 1.13.0 - 1.18.12 + This Release is for Minecraft Android 1.13.0 - 1.19.30 + Compatbility with the official release of 1.19.40 is unknown **You need to own Minecraft on the google play store and login with your google account to use this launcher** Links for linux flatpak or macOS can be found on our wiki https://mcpelauncher.readthedocs.io. diff --git a/.gitignore b/.gitignore index 750ede6..80fca47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ source/ build/ output/ +appimagetool*/ +linuxdeploy*/ +linuxdeploy-plugin-qt*/ +runtime-* +*.AppImage diff --git a/build_appimage.sh b/build_appimage.sh index 43412c7..f3b71c9 100755 --- a/build_appimage.sh +++ b/build_appimage.sh @@ -6,8 +6,9 @@ QUIRKS_FILE= APP_DIR=${BUILD_DIR}/AppDir UPDATE_CMAKE_OPTIONS="" BUILD_NUM="0" +TARGETARCH="x86_64" -while getopts "h?q:j:u:i:k:" opt; do +while getopts "h?q:j:u:i:k:t:n?m?" opt; do case "$opt" in h|\?) echo "build.sh" @@ -16,6 +17,9 @@ while getopts "h?q:j:u:i:k:" opt; do echo "-u Specify the update check URL" echo "-i Specify the build id for update checking" echo "-k Specify appimageupdate information" + echo "-t Specify the target arch of the appimage" + echo "-n Disable compiling mcpelauncher-client32 for 64bit targets" + echo "-m Disable compiling msa" exit 0 ;; j) MAKE_JOBS=$OPTARG @@ -30,9 +34,87 @@ while getopts "h?q:j:u:i:k:" opt; do k) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DENABLE_APPIMAGE_UPDATE_CHECK=1" export UPDATE_INFORMATION="$OPTARG" ;; + t) TARGETARCH=$OPTARG + ;; + n) DISABLE_32BIT="1" + ;; + m) DISABLE_MSA="1" + ;; esac done +DEFAULT_CMAKE_OPTIONS=() +DEFAULT_CMAKE_OPTIONS32=() +add_default_cmake_options() { + DEFAULT_CMAKE_OPTIONS=("${DEFAULT_CMAKE_OPTIONS[@]}" "$@") +} +add_default_cmake_options32() { + DEFAULT_CMAKE_OPTIONS32=("${DEFAULT_CMAKE_OPTIONS32[@]}" "$@") +} + +CFLAGS32="-DNDEBUG" +CFLAGS="-DNDEBUG" +CXXFLAGS32="-I ${PWD}/curlappimageca" +CXXFLAGS="-I ${PWD}/curlappimageca" +MCPELAUNCHERUI_CXXFLAGS="-DLAUNCHER_INIT_PATCH=\"if(!getenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS\\\")) putenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox\\\");\"" +if [ -n "$DISABLE_32BIT" ] +then + MCPELAUNCHERUI_CXXFLAGS="-DDISABLE_32BIT=1 $MCPELAUNCHERUI_CXXFLAGS" +fi +if [ "$TARGETARCH" = "armhf" ] +then + DEBIANTARGET="arm-linux-gnueabihf" + DEBIANTARGET32="" + APPIMAGE_ARCH="arm" + APPIMAGE_RUNTIME_FILE="runtime-armhf" + LINUXDEPLOY_ARCH="i386" + CFLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon $CFLAGS" + add_default_cmake_options -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../armhftoolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=armhf +fi +if [ "$TARGETARCH" = "arm64" ] +then + DEBIANTARGET="aarch64-linux-gnu" + DEBIANTARGET32="arm-linux-gnueabihf" + APPIMAGE_ARCH="arm_aarch64" + APPIMAGE_RUNTIME_FILE="runtime-aarch64" + LINUXDEPLOY_ARCH="x86_64" + CFLAGS="-latomic --target=aarch64-linux-gnu $CFLAGS" + CFLAGS32="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon $CFLAGS32" + add_default_cmake_options32 -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../armhftoolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=armhf + add_default_cmake_options -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../arm64toolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=arm64 +fi +if [ "$TARGETARCH" = "x86" ] +then + DEBIANTARGET="i386-linux-gnu" + DEBIANTARGET32="" + APPIMAGE_ARCH="i386" + APPIMAGE_RUNTIME_FILE="runtime-i686" + LINUXDEPLOY_ARCH="i386" + CFLAGS="-m32 $CFLAGS" +fi +if [ "$TARGETARCH" = "x86_64" ] +then + DEBIANTARGET="x86_64-linux-gnu" + DEBIANTARGET32="i386-linux-gnu" + APPIMAGE_ARCH="x86_64" + APPIMAGE_RUNTIME_FILE="runtime-x86_64" + LINUXDEPLOY_ARCH="x86_64" + CFLAGS32="-m32 $CFLAGS32" +fi + +show_status "Downloading AppImage tools" +mkdir -p tools +pushd tools +# download linuxdeploy and make it executable +check_run wget -N "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$LINUXDEPLOY_ARCH.AppImage" +# also download Qt plugin, which is needed for the Qt UI +check_run wget -N "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-$LINUXDEPLOY_ARCH.AppImage" +# Needed to cross compile AppImages for ARM and ARM64 +check_run wget -N "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" +# Custom Runtime File for AppImage creation +check_run wget -N "https://github.com/AppImage/AppImageKit/releases/download/continuous/$APPIMAGE_RUNTIME_FILE" +popd + load_quirks "$QUIRKS_FILE" create_build_directories @@ -44,88 +126,160 @@ show_status "Downloading sources" download_repo msa https://github.com/minecraft-linux/msa-manifest.git $(cat msa.commit) download_repo mcpelauncher https://github.com/minecraft-linux/mcpelauncher-manifest.git $(cat mcpelauncher.commit) download_repo mcpelauncher-ui https://github.com/minecraft-linux/mcpelauncher-ui-manifest.git $(cat mcpelauncher-ui.commit) -download_repo "mcpelauncher-ui/lib/AppImageUpdate" https://github.com/AppImage/AppImageUpdate 1b97acc55c89f742d51c3849eb62eb58464d8669 +download_repo versionsdb https://github.com/minecraft-linux/mcpelauncher-versiondb.git $(cat versionsdb.txt) +if [ -n "$UPDATE_INFORMATION" ] +then + # Checkout lib outside of the source tree, to avoid redownloading the repository after mcpelauncher-ui source update + download_repo "AppImageUpdate" https://github.com/AppImage/AppImageUpdate 1b97acc55c89f742d51c3849eb62eb58464d8669 + mkdir -p "$SOURCE_DIR/mcpelauncher-ui/lib" + rm "$SOURCE_DIR/mcpelauncher-ui/lib/AppImageUpdate" + ln -s "$SOURCE_DIR/AppImageUpdate" "$SOURCE_DIR/mcpelauncher-ui/lib/AppImageUpdate" +fi call_quirk build_start install_component() { - pushd $BUILD_DIR/$1 + pushd "$BUILD_DIR/$1" check_run make install DESTDIR="${APP_DIR}" popd } build_component32() { + show_status "Building $1" + mkdir -p "$BUILD_DIR/$1" + pushd "$BUILD_DIR/$1" + echo "cmake" "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" + PKG64_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG_PATH="" + check_run cmake "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" + sed -i "s/\/usr\/lib\/x86_64-linux-gnu/\/usr\/lib\/$DEBIANTARGET32/g" CMakeCache.txt + sed -i "s/\/usr\/include\/x86_64-linux-gnu/\/usr\/include\/$DEBIANTARGET32/g" CMakeCache.txt + check_run make -j${MAKE_JOBS} + export PKG_CONFIG_PATH="${PKG64_CONFIG_PATH}" + popd +} + +build_component64() { show_status "Building $1" mkdir -p $BUILD_DIR/$1 pushd $BUILD_DIR/$1 echo "cmake" "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" check_run cmake "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - sed -i 's/\/usr\/lib\/x86_64-linux-gnu/\/usr\/lib\/i386-linux-gnu/g' CMakeCache.txt + sed -i "s/\/usr\/lib\/x86_64-linux-gnu/\/usr\/lib\/$DEBIANTARGET/g" CMakeCache.txt + sed -i "s/\/usr\/include\/x86_64-linux-gnu/\/usr\/include\/$DEBIANTARGET/g" CMakeCache.txt check_run make -j${MAKE_JOBS} popd } +if [ -z "$DISABLE_MSA" ] +then + reset_cmake_options + add_cmake_options "${DEFAULT_CMAKE_OPTIONS[@]}" -DCMAKE_ASM_FLAGS="$MSA_CFLAGS $CFLAGS" -DCMAKE_C_FLAGS="$MSA_CFLAGS $CFLAGS" -DCMAKE_CXX_FLAGS="$MSA_CXXFLAGS $MSA_CFLAGS $CXXFLAGS $CFLAGS" + add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_MSA_QT_UI=ON -DMSA_UI_PATH_DEV=OFF + call_quirk build_msa + build_component64 msa + install_component msa +fi +if [ -n "$DEBIANTARGET32" ] && [ -z "$DISABLE_32BIT" ] +then + reset_cmake_options + add_cmake_options "${DEFAULT_CMAKE_OPTIONS32[@]}" -DCMAKE_ASM_FLAGS="$MCPELAUNCHER_CFLAGS32 $CFLAGS32" -DCMAKE_C_FLAGS="$MCPELAUNCHER_CFLAGS32 $CFLAGS32" -DCMAKE_CXX_FLAGS="$MCPELAUNCHER_CXXFLAGS32 $MCPELAUNCHER_CFLAGS32 $CXXFLAGS32 $CFLAGS32" + add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DMSA_DAEMON_PATH=. -DBUILD_UI=OFF + call_quirk build_mcpelauncher32 + build_component32 mcpelauncher + cp "$BUILD_DIR/mcpelauncher/mcpelauncher-client/mcpelauncher-client" "${APP_DIR}/usr/bin/mcpelauncher-client32" + #cleanup + rm -r "$BUILD_DIR/mcpelauncher/" +fi reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_MSA_QT_UI=ON -DMSA_UI_PATH_DEV=OFF -call_quirk build_msa -build_component msa -install_component msa -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DMSA_DAEMON_PATH=. -DENABLE_QT_ERROR_UI=OFF -call_quirk build_mcpelauncher32 -build_component32 mcpelauncher -cp $BUILD_DIR/mcpelauncher/mcpelauncher-client/mcpelauncher-client "${APP_DIR}/usr/bin/mcpelauncher-client32" -#cleanup -rm -r $BUILD_DIR/mcpelauncher/ -reset_cmake_options +add_cmake_options "${DEFAULT_CMAKE_OPTIONS[@]}" -DCMAKE_ASM_FLAGS="$MCPELAUNCHER_CFLAGS $CFLAGS" -DCMAKE_C_FLAGS="$MCPELAUNCHER_CFLAGS $CFLAGS" -DCMAKE_CXX_FLAGS="$MCPELAUNCHER_CXXFLAGS $MCPELAUNCHER_CFLAGS $CXXFLAGS $CFLAGS" add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DMSA_DAEMON_PATH=. -DENABLE_QT_ERROR_UI=OFF call_quirk build_mcpelauncher -build_component mcpelauncher +build_component64 mcpelauncher install_component mcpelauncher reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DGAME_LAUNCHER_PATH=. $UPDATE_CMAKE_OPTIONS +add_cmake_options "${DEFAULT_CMAKE_OPTIONS[@]}" -DCMAKE_ASM_FLAGS="$MCPELAUNCHERUI_CFLAGS $CFLAGS" -DCMAKE_C_FLAGS="$MCPELAUNCHERUI_CFLAGS $CFLAGS" -DCMAKE_CXX_FLAGS="$MCPELAUNCHERUI_CXXFLAGS $MCPELAUNCHERUI_CFLAGS $CXXFLAGS $CFLAGS" +add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DGAME_LAUNCHER_PATH=. -DLAUNCHER_VERSION_NAME="$(cat version.txt).${BUILD_NUM}-AppImage-$TARGETARCH" -DLAUNCHER_VERSION_CODE="${BUILD_NUM}" -DLAUNCHER_CHANGE_LOG="Launcher $(cat version.txt)
$(cat changelog.txt)" -DQt5QuickCompiler_FOUND:BOOL=OFF -DLAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK=ON -DLAUNCHER_DISABLE_DEV_MODE=OFF -DLAUNCHER_VERSIONDB_URL=https://raw.githubusercontent.com/minecraft-linux/mcpelauncher-versiondb/$(cat versionsdbremote.txt) -DLAUNCHER_VERSIONDB_PATH="$SOURCE_DIR/versionsdb" $UPDATE_CMAKE_OPTIONS call_quirk build_mcpelauncher_ui -build_component mcpelauncher-ui +build_component64 mcpelauncher-ui install_component mcpelauncher-ui show_status "Packaging" -cp $SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/Resources/proprietary/mcpelauncher-icon-512.png $BUILD_DIR/mcpelauncher-ui-qt.png -cp $SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/mcpelauncher-ui-qt.desktop $BUILD_DIR/mcpelauncher-ui-qt.desktop +cp "$SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/Resources/mcpelauncher-icon.svg" "$BUILD_DIR/mcpelauncher-ui-qt.svg" +cp "$SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/mcpelauncher-ui-qt.desktop" "$BUILD_DIR/mcpelauncher-ui-qt.desktop" + +chmod +x tools/linuxdeploy-*.AppImage +chmod +x tools/appimagetool-*.AppImage -# download linuxdeploy and make it executable -wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -# also download Qt plugin, which is needed for the Qt UI -wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -chmod +x linuxdeploy*-x86_64.AppImage +export ARCH=$APPIMAGE_ARCH -export ARCH=x86_64 +fixarm() { + if [ "$TARGETARCH" = "armhf" ] || [ "$TARGETARCH" = "arm64" ] + then + # fix arm + rm -rf squashfs-root/usr/bin/strip squashfs-root/usr/bin/patchelf + echo '#!/bin/bash' > squashfs-root/usr/bin/patchelf + chmod +x squashfs-root/usr/bin/patchelf + echo '#!/bin/bash' > squashfs-root/usr/bin/strip + chmod +x squashfs-root/usr/bin/strip + fi +} -mkdir linuxdeploy -cd linuxdeploy -../linuxdeploy-x86_64.AppImage --appimage-extract +mkdir linuxdeploy-$LINUXDEPLOY_ARCH +cd linuxdeploy-$LINUXDEPLOY_ARCH +../tools/linuxdeploy-$LINUXDEPLOY_ARCH.AppImage --appimage-extract +fixarm +cd .. +mkdir linuxdeploy-plugin-qt-$LINUXDEPLOY_ARCH +cd linuxdeploy-plugin-qt-$LINUXDEPLOY_ARCH +../tools/linuxdeploy-plugin-qt-$LINUXDEPLOY_ARCH.AppImage --appimage-extract +fixarm cd .. -mkdir linuxdeploy-plugin-qt -cd linuxdeploy-plugin-qt -../linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract +mkdir appimagetool +cd appimagetool +../tools/appimagetool-x86_64.AppImage --appimage-extract cd .. -LINUXDEPLOY_BIN=linuxdeploy/squashfs-root/AppRun -LINUXDEPLOY_PLUGIN_QT_BIN=linuxdeploy-plugin-qt/squashfs-root/AppRun +LINUXDEPLOY_BIN="linuxdeploy-$LINUXDEPLOY_ARCH/squashfs-root/AppRun" +LINUXDEPLOY_PLUGIN_QT_BIN="linuxdeploy-plugin-qt-$LINUXDEPLOY_ARCH/squashfs-root/AppRun" +APPIMAGETOOL_BIN="appimagetool/squashfs-root/AppRun" + +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+"${LD_LIBRARY_PATH}:"}"$APP_DIR/usr/lib" +check_run "$LINUXDEPLOY_BIN" --appdir "$APP_DIR" -i "$BUILD_DIR/mcpelauncher-ui-qt.svg" -d "$BUILD_DIR/mcpelauncher-ui-qt.desktop" + +export QML_SOURCES_PATHS="$SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/qml/:$SOURCE_DIR/mcpelauncher/mcpelauncher-webview" +check_run "$LINUXDEPLOY_PLUGIN_QT_BIN" --appdir "$APP_DIR" + +# libnss needs it's subdirectory to load the google login view +check_run cp -r "/usr/lib/$DEBIANTARGET/nss" "$APP_DIR/usr/lib/" +# glib is excluded by appimagekit, but gmodule isn't which causes issues +check_run rm -rf "$APP_DIR/usr/lib/libgmodule-2.0.so.0" +# these files where removed from the exclude list +check_run rm -rf "$APP_DIR/usr/lib/libgio-2.0.so.0" +check_run rm -rf "$APP_DIR/usr/lib/libglib-2.0.so.0" +check_run rm -rf "$APP_DIR/usr/lib/libgobject-2.0.so.0" -rm -rf ./*.AppImage -check_run $LINUXDEPLOY_BIN --appdir $APP_DIR -i $BUILD_DIR/mcpelauncher-ui-qt.png -d $BUILD_DIR/mcpelauncher-ui-qt.desktop +check_run curl -L -k https://curl.se/ca/cacert.pem --output "$APP_DIR/usr/share/mcpelauncher/cacert.pem" -export QML_SOURCES_PATHS=$SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/qml/:$SOURCE_DIR/mcpelauncher/mcpelauncher-webview -check_run $LINUXDEPLOY_PLUGIN_QT_BIN --appdir $APP_DIR +if [ "$TARGETARCH" = "armhf" ] || [ "$TARGETARCH" = "arm64" ] +then + check_run rm $APP_DIR/AppRun + check_run cp ./AppRun $APP_DIR/AppRun + check_run chmod +x $APP_DIR/AppRun +fi -cp -r /usr/lib/x86_64-linux-gnu/nss $APP_DIR/usr/lib/ -curl -L -k https://curl.se/ca/cacert.pem --output $APP_DIR/usr/share/mcpelauncher/cacert.pem -export OUTPUT="Minecraft_Bedrock_Launcher-${ARCH}-$(cat version.txt).${BUILD_NUM}.AppImage" -check_run $LINUXDEPLOY_BIN --appdir $APP_DIR --output appimage +export OUTPUT="Minecraft_Bedrock_Launcher-${TARGETARCH}-$(cat version.txt).${BUILD_NUM}.AppImage" +export ARCH="$APPIMAGE_ARCH" +if [ -n "$UPDATE_INFORMATION" ] +then + UPDATE_INFORMATION_ARGS=("-u" "${UPDATE_INFORMATION}") +fi +check_run "$APPIMAGETOOL_BIN" --comp xz --runtime-file "tools/$APPIMAGE_RUNTIME_FILE" "${UPDATE_INFORMATION_ARGS[@]}" "$APP_DIR" "$OUTPUT" mkdir -p output/ -mv Minecraft*.AppImage output/ -cat *.zsync | sed -e "s/\(URL: \)\(.*\)/\1..\/$(cat version.txt)-${BUILD_NUM}\/\2/g" > output/version.${ARCH}.zsync +check_run mv Minecraft*.AppImage output/ +cat *.zsync | sed -e "s/\(URL: \)\(.*\)/\1..\/$(cat version.txt)-${BUILD_NUM}\/\2/g" > "output/version.${ARCH}.zsync" +rm *.zsync cleanup_build diff --git a/build_appimage_32.sh b/build_appimage_32.sh deleted file mode 100755 index dce20a2..0000000 --- a/build_appimage_32.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash - -source common.sh - -QUIRKS_FILE= -APP_DIR=${BUILD_DIR}/AppDir -UPDATE_CMAKE_OPTIONS="" -BUILD_NUM="0" - -while getopts "h?q:j:u:i:k:" opt; do - case "$opt" in - h|\?) - echo "build.sh" - echo "-j Specify the number of jobs (the -j arg to make)" - echo "-q Specify the quirks file" - echo "-u Specify the update check URL" - echo "-i Specify the build id for update checking" - echo "-k Specify appimageupdate information" - exit 0 - ;; - j) MAKE_JOBS=$OPTARG - ;; - q) QUIRKS_FILE=$OPTARG - ;; - u) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DENABLE_UPDATE_CHECK=ON -DUPDATE_CHECK_URL=$OPTARG" - ;; - i) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DUPDATE_CHECK_BUILD_ID=$OPTARG" - BUILD_NUM="${OPTARG}" - ;; - k) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DENABLE_APPIMAGE_UPDATE_CHECK=1" - export UPDATE_INFORMATION="$OPTARG" - ;; - esac -done - -load_quirks "$QUIRKS_FILE" - -create_build_directories -rm -rf ${APP_DIR} -mkdir -p ${APP_DIR} -call_quirk init - -show_status "Downloading sources" -download_repo msa https://github.com/minecraft-linux/msa-manifest.git $(cat msa.commit) -download_repo mcpelauncher https://github.com/minecraft-linux/mcpelauncher-manifest.git $(cat mcpelauncher.commit) -download_repo mcpelauncher-ui https://github.com/minecraft-linux/mcpelauncher-ui-manifest.git $(cat mcpelauncher-ui.commit) -download_repo "mcpelauncher-ui/lib/AppImageUpdate" https://github.com/AppImage/AppImageUpdate 1b97acc55c89f742d51c3849eb62eb58464d8669 -call_quirk build_start - -install_component() { - pushd $BUILD_DIR/$1 - check_run make install DESTDIR="${APP_DIR}" - popd -} - -build_component32() { - show_status "Building $1" - mkdir -p $BUILD_DIR/$1 - pushd $BUILD_DIR/$1 - echo "cmake" "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - check_run cmake "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - sed -i 's/\/usr\/lib\/x86_64-linux-gnu/\/usr\/lib\/i386-linux-gnu/g' CMakeCache.txt - check_run make -j${MAKE_JOBS} - popd -} - -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_MSA_QT_UI=ON -DMSA_UI_PATH_DEV=OFF -call_quirk build_msa -build_component msa -install_component msa -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DMSA_DAEMON_PATH=. -DENABLE_QT_ERROR_UI=OFF -call_quirk build_mcpelauncher -build_component mcpelauncher -install_component mcpelauncher -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DGAME_LAUNCHER_PATH=. $UPDATE_CMAKE_OPTIONS -call_quirk build_mcpelauncher_ui - -build_component mcpelauncher-ui -install_component mcpelauncher-ui - -show_status "Packaging" - -cp $SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/Resources/proprietary/mcpelauncher-icon-512.png $BUILD_DIR/mcpelauncher-ui-qt.png -cp $SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/mcpelauncher-ui-qt.desktop $BUILD_DIR/mcpelauncher-ui-qt.desktop - -# download linuxdeploy and make it executable -wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-i386.AppImage -# also download Qt plugin, which is needed for the Qt UI -wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-i386.AppImage - -chmod +x linuxdeploy*-i386.AppImage - -export ARCH=i386 - -mkdir linuxdeploy -cd linuxdeploy -../linuxdeploy-i386.AppImage --appimage-extract -cd .. -mkdir linuxdeploy-plugin-qt -cd linuxdeploy-plugin-qt -../linuxdeploy-plugin-qt-i386.AppImage --appimage-extract -cd .. -LINUXDEPLOY_BIN=linuxdeploy/squashfs-root/AppRun -LINUXDEPLOY_PLUGIN_QT_BIN=linuxdeploy-plugin-qt/squashfs-root/AppRun - -rm -rf ./*.AppImage -check_run $LINUXDEPLOY_BIN --appdir $APP_DIR -i $BUILD_DIR/mcpelauncher-ui-qt.png -d $BUILD_DIR/mcpelauncher-ui-qt.desktop - -export QML_SOURCES_PATHS=$SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/qml/:$SOURCE_DIR/mcpelauncher/mcpelauncher-webview -check_run $LINUXDEPLOY_PLUGIN_QT_BIN --appdir $APP_DIR - -cp -r /usr/lib/i386-linux-gnu/nss $APP_DIR/usr/lib/ -curl -L -k https://curl.se/ca/cacert.pem --output $APP_DIR/usr/share/mcpelauncher/cacert.pem -export OUTPUT="Minecraft_Bedrock_Launcher-${ARCH}-$(cat version.txt).${BUILD_NUM}.AppImage" -check_run $LINUXDEPLOY_BIN --appdir $APP_DIR --output appimage -mv Minecraft*.AppImage output -cat *.zsync | sed -e "s/\(URL: \)\(.*\)/\1..\/$(cat version.txt)-${BUILD_NUM}\/\2/g" > output/version.${ARCH}.zsync - -cleanup_build diff --git a/build_appimage_arm64.sh b/build_appimage_arm64.sh deleted file mode 100755 index 8280288..0000000 --- a/build_appimage_arm64.sh +++ /dev/null @@ -1,189 +0,0 @@ -#!/bin/bash - -source common.sh - -QUIRKS_FILE= -APP_DIR=${BUILD_DIR}/AppDir -UPDATE_CMAKE_OPTIONS="" -BUILD_NUM="0" - -while getopts "h?q:j:u:i:k:" opt; do - case "$opt" in - h|\?) - echo "build.sh" - echo "-j Specify the number of jobs (the -j arg to make)" - echo "-q Specify the quirks file" - echo "-u Specify the update check URL" - echo "-i Specify the build id for update checking" - echo "-k Specify appimageupdate information" - exit 0 - ;; - j) MAKE_JOBS=$OPTARG - ;; - q) QUIRKS_FILE=$OPTARG - ;; - u) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DENABLE_UPDATE_CHECK=ON -DUPDATE_CHECK_URL=$OPTARG" - ;; - i) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DUPDATE_CHECK_BUILD_ID=$OPTARG" - BUILD_NUM="${OPTARG}" - ;; - k) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DENABLE_APPIMAGE_UPDATE_CHECK=1" - export UPDATE_INFORMATION="$OPTARG" - ;; - esac -done - -load_quirks "$QUIRKS_FILE" - -create_build_directories -rm -rf ${APP_DIR} -mkdir -p ${APP_DIR} -call_quirk init - -show_status "Downloading sources" -download_repo msa https://github.com/minecraft-linux/msa-manifest.git $(cat msa.commit) -download_repo mcpelauncher https://github.com/minecraft-linux/mcpelauncher-manifest.git $(cat mcpelauncher.commit) -download_repo mcpelauncher-ui https://github.com/minecraft-linux/mcpelauncher-ui-manifest.git $(cat mcpelauncher-ui.commit) -download_repo "mcpelauncher-ui/lib/AppImageUpdate" https://github.com/AppImage/AppImageUpdate 1b97acc55c89f742d51c3849eb62eb58464d8669 -call_quirk build_start - -install_component() { - pushd $BUILD_DIR/$1 - check_run make install DESTDIR="${APP_DIR}" - popd -} - -build_component32() { - show_status "Building $1" - mkdir -p $BUILD_DIR/$1 - pushd $BUILD_DIR/$1 - echo "cmake" "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - PKG64_CONFIG_PATH="${PKG_CONFIG_PATH}" - export PKG_CONFIG_PATH="" - check_run cmake "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - sed -i 's/\/usr\/lib\/x86_64-linux-gnu/\/usr\/lib\/arm-linux-gnueabihf/g' CMakeCache.txt - sed -i 's/\/usr\/include\/x86_64-linux-gnu/\/usr\/include\/arm-linux-gnueabihf/g' CMakeCache.txt - check_run make -j${MAKE_JOBS} - export PKG_CONFIG_PATH="${PKG64_CONFIG_PATH}" - popd -} -build_component64() { - show_status "Building $1" - mkdir -p $BUILD_DIR/$1 - pushd $BUILD_DIR/$1 - echo "cmake" "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - check_run cmake "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - sed -i 's/\/usr\/lib\/x86_64-linux-gnu/\/usr\/lib\/aarch64-linux-gnu/g' CMakeCache.txt - sed -i 's/\/usr\/include\/x86_64-linux-gnu/\/usr\/include\/aarch64-linux-gnu/g' CMakeCache.txt - check_run make -j${MAKE_JOBS} - popd -} - -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_MSA_QT_UI=ON -DMSA_UI_PATH_DEV=OFF -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../arm64toolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=arm64 -DCMAKE_ASM_FLAGS="--target=aarch64-linux-gnu" -DCMAKE_C_FLAGS="-latomic --target=aarch64-linux-gnu" -DCMAKE_CXX_FLAGS="-latomic --target=aarch64-linux-gnu -DNDEBUG -I ${PWD}/curlappimageca" -call_quirk build_msa -build_component64 msa -install_component msa -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../armhftoolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=armhf -DMSA_DAEMON_PATH=. -DCMAKE_ASM_FLAGS="--target=arm-linux-gnueabihf -march=armv7 -mfpu=neon" -DCMAKE_C_FLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon" -DCMAKE_CXX_FLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon -DNDEBUG -I ${PWD}/curlappimageca" -DBUILD_WEBVIEW=OFF -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. -DENABLE_QT_ERROR_UI=OFF -call_quirk build_mcpelauncher -build_component32 mcpelauncher -cp $BUILD_DIR/mcpelauncher/mcpelauncher-client/mcpelauncher-client "${APP_DIR}/usr/bin/mcpelauncher-client32" -#cleanup -rm -r $BUILD_DIR/mcpelauncher/ -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DMSA_DAEMON_PATH=. -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../arm64toolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=arm64 -DCMAKE_ASM_FLAGS="--target=aarch64-linux-gnu" -DCMAKE_C_FLAGS="-latomic --target=aarch64-linux-gnu" -DCMAKE_CXX_FLAGS="-latomic --target=aarch64-linux-gnu -DNDEBUG -I ${PWD}/curlappimageca" -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. -DQt5QuickCompiler_FOUND:BOOL=OFF -DENABLE_QT_ERROR_UI=OFF -call_quirk build_mcpelauncher -build_component64 mcpelauncher -install_component mcpelauncher -reset_cmake_options -download_repo versionsdb https://github.com/minecraft-linux/mcpelauncher-versiondb.git $(cat versionsdb.txt) -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DGAME_LAUNCHER_PATH=. $UPDATE_CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../arm64toolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=arm64 -DCMAKE_ASM_FLAGS="--target=aarch64-linux-gnu" -DCMAKE_C_FLAGS="-latomic --target=aarch64-linux-gnu" -DCMAKE_CXX_FLAGS="-latomic --target=aarch64-linux-gnu -DNDEBUG -I ${PWD}/curlappimageca -DLAUNCHER_INIT_PATCH=\"if(!getenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS\\\")) putenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox\\\");\"" -DLAUNCHER_VERSION_NAME="$(cat version.txt).${BUILD_NUM}-AppImage-arm64" -DLAUNCHER_VERSION_CODE=${BUILD_NUM} -DLAUNCHER_CHANGE_LOG="Launcher $(cat version.txt)
$(cat changelog.txt)" -DQt5QuickCompiler_FOUND:BOOL=OFF -DLAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK=ON -DLAUNCHER_DISABLE_DEV_MODE=OFF -DLAUNCHER_VERSIONDB_URL=https://raw.githubusercontent.com/minecraft-linux/mcpelauncher-versiondb/$(cat versionsdbremote.txt) -DLAUNCHER_VERSIONDB_PATH=$SOURCE_DIR/versionsdb -call_quirk build_mcpelauncher_ui - -build_component64 mcpelauncher-ui -install_component mcpelauncher-ui - -show_status "Packaging" - -cp $SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/Resources/proprietary/mcpelauncher-icon-512.png $BUILD_DIR/mcpelauncher-ui-qt.png -cp $SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/mcpelauncher-ui-qt.desktop $BUILD_DIR/mcpelauncher-ui-qt.desktop - -# download linuxdeploy and make it executable -wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -# also download Qt plugin, which is needed for the Qt UI -wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage - -wget -N https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage - -wget -N https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-aarch64 - -chmod +x linuxdeploy*-x86_64.AppImage -chmod +x appimagetool*.AppImage - -export ARCH=arm_aarch64 - -mkdir linuxdeploy -cd linuxdeploy -../linuxdeploy-x86_64.AppImage --appimage-extract -# fix arm -rm -rf squashfs-root/usr/bin/strip squashfs-root/usr/bin/patchelf -# ln -s ../../../../patchelf/src/patchelf squashfs-root/usr/bin/patchelf -# cp ../patchelf/src/patchelf squashfs-root/usr/bin/ -# cp ../patchelf squashfs-root/usr/bin/ -echo '#!/bin/bash' > squashfs-root/usr/bin/patchelf -# echo 'echo patchelf $@>>/home/christopher/linux-packaging-scripts/patchelf.log' >> squashfs-root/usr/bin/patchelf -chmod +x squashfs-root/usr/bin/patchelf -# ln -s /usr/arm-linux-gnueabihf/bin/strip squashfs-root/usr/bin/strip -# cp /usr/arm-linux-gnueabihf/bin/strip squashfs-root/usr/bin/strip -echo '#!/bin/bash' > squashfs-root/usr/bin/strip -chmod +x squashfs-root/usr/bin/strip -cd .. -mkdir linuxdeploy-plugin-qt -cd linuxdeploy-plugin-qt -../linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract -# fix arm -rm -rf squashfs-root/usr/bin/strip squashfs-root/usr/bin/patchelf -# ln -s ../../../../patchelf/src/patchelf squashfs-root/usr/bin/patchelf -# cp ../patchelf/src/patchelf squashfs-root/usr/bin/ -# cp ../patchelf squashfs-root/usr/bin/ -echo '#!/bin/bash' > squashfs-root/usr/bin/patchelf -# echo 'echo patchelf $@>>/home/christopher/linux-packaging-scripts/patchelf.log' >> squashfs-root/usr/bin/patchelf -chmod +x squashfs-root/usr/bin/patchelf -# ln -s /usr/arm-linux-gnueabihf/bin/strip squashfs-root/usr/bin/strip -# cp /usr/arm-linux-gnueabihf/bin/strip squashfs-root/usr/bin/strip -echo '#!/bin/bash' > squashfs-root/usr/bin/strip -chmod +x squashfs-root/usr/bin/strip -cd .. -mkdir appimagetool -cd appimagetool -../appimagetool-x86_64.AppImage --appimage-extract -cd .. -LINUXDEPLOY_BIN=linuxdeploy/squashfs-root/AppRun -LINUXDEPLOY_PLUGIN_QT_BIN=linuxdeploy-plugin-qt/squashfs-root/AppRun -APPIMAGETOOL_BIN=appimagetool/squashfs-root/AppRun - -rm -rf ./*.AppImage -check_run $LINUXDEPLOY_BIN --appdir $APP_DIR -i $BUILD_DIR/mcpelauncher-ui-qt.png -d $BUILD_DIR/mcpelauncher-ui-qt.desktop - -export QML_SOURCES_PATHS=$SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/qml/:$SOURCE_DIR/mcpelauncher/mcpelauncher-webview -check_run $LINUXDEPLOY_PLUGIN_QT_BIN --appdir $APP_DIR - -# libnss needs it's subdirectory to load the google login view -check_run cp -r /usr/lib/aarch64-linux-gnu/nss $APP_DIR/usr/lib/ -# glib is excluded by appimagekit, but gmodule isn't which causes issues -check_run rm -rf "$APP_DIR/usr/lib/libgmodule-2.0.so.0" - -curl -L -k https://curl.se/ca/cacert.pem --output $APP_DIR/usr/share/mcpelauncher/cacert.pem - -rm $APP_DIR/AppRun -cp ./AppRun $APP_DIR/AppRun -chmod +x $APP_DIR/AppRun - -export OUTPUT="Minecraft_Bedrock_Launcher-${ARCH}-$(cat version.txt).${BUILD_NUM}.AppImage" -export ARCH=arm_aarch64 -check_run $APPIMAGETOOL_BIN --comp xz ${UPDATE_INFORMATION+"-u"} ${UPDATE_INFORMATION} --runtime-file runtime-aarch64 $APP_DIR $OUTPUT -check_run mv Minecraft*.AppImage output -cat *.zsync | sed -e "s/\(URL: \)\(.*\)/\1..\/$(cat version.txt)-${BUILD_NUM}\/\2/g" > output/version.${ARCH}.zsync - -cleanup_build diff --git a/build_appimage_armhf2.sh b/build_appimage_armhf2.sh deleted file mode 100755 index e4de293..0000000 --- a/build_appimage_armhf2.sh +++ /dev/null @@ -1,182 +0,0 @@ -#!/bin/bash - -source common.sh - -QUIRKS_FILE= -APP_DIR=${BUILD_DIR}/AppDir -UPDATE_CMAKE_OPTIONS="" -BUILD_NUM="0" - -while getopts "h?q:j:u:i:k:" opt; do - case "$opt" in - h|\?) - echo "build.sh" - echo "-j Specify the number of jobs (the -j arg to make)" - echo "-q Specify the quirks file" - echo "-u Specify the update check URL" - echo "-i Specify the build id for update checking" - echo "-k Specify appimageupdate information" - exit 0 - ;; - j) MAKE_JOBS=$OPTARG - ;; - q) QUIRKS_FILE=$OPTARG - ;; - u) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DENABLE_UPDATE_CHECK=ON -DUPDATE_CHECK_URL=$OPTARG" - ;; - i) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DUPDATE_CHECK_BUILD_ID=$OPTARG" - BUILD_NUM="${OPTARG}" - ;; - k) UPDATE_CMAKE_OPTIONS="$UPDATE_CMAKE_OPTIONS -DENABLE_APPIMAGE_UPDATE_CHECK=1" - export UPDATE_INFORMATION="$OPTARG" - ;; - esac -done - -load_quirks "$QUIRKS_FILE" - -create_build_directories -rm -rf ${APP_DIR} -mkdir -p ${APP_DIR} -call_quirk init - -show_status "Downloading sources" -download_repo msa https://github.com/minecraft-linux/msa-manifest.git $(cat msa.commit) -download_repo mcpelauncher https://github.com/minecraft-linux/mcpelauncher-manifest.git $(cat mcpelauncher.commit) -download_repo mcpelauncher-ui https://github.com/minecraft-linux/mcpelauncher-ui-manifest.git $(cat mcpelauncher-ui.commit) -# download_repo curl https://github.com/curl/curl.git master -download_repo "mcpelauncher-ui/lib/AppImageUpdate" https://github.com/AppImage/AppImageUpdate 1b97acc55c89f742d51c3849eb62eb58464d8669 -call_quirk build_start - -install_component() { - pushd $BUILD_DIR/$1 - check_run make install DESTDIR="${APP_DIR}" - popd -} - -build_component32() { - show_status "Building $1" - mkdir -p $BUILD_DIR/$1 - pushd $BUILD_DIR/$1 - echo "cmake" "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - check_run cmake "${CMAKE_OPTIONS[@]}" "$SOURCE_DIR/$1" - sed -i 's/\/usr\/lib\/x86_64-linux-gnu/\/usr\/lib\/arm-linux-gnueabihf/g' CMakeCache.txt - sed -i 's/\/usr\/include\/x86_64-linux-gnu/\/usr\/include\/arm-linux-gnueabihf/g' CMakeCache.txt - check_run make -j${MAKE_JOBS} - popd -} - -# reset_cmake_options -# add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../armhftoolchain.txt -DCMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=/usr/bin/arm-linux-gnueabihf-g++ -# build_component32 curl -# install_component curl - -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_MSA_QT_UI=ON -DMSA_UI_PATH_DEV=OFF -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../armhftoolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=armhf -DCMAKE_ASM_FLAGS="--target=arm-linux-gnueabihf -march=armv7 -mfpu=neon" -DCMAKE_C_FLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon" -DCMAKE_CXX_FLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon -DNDEBUG -I ${PWD}/curlappimageca" -DCURL_INCLUDE_DIRS="$APP_DIR/usr/include" -DCURL_LIBRARIES="$APP_DIR/usr/lib/libcurl.so" -call_quirk build_msa -build_component32 msa -install_component msa -reset_cmake_options -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../armhftoolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=armhf -DMSA_DAEMON_PATH=. -DCMAKE_ASM_FLAGS="--target=arm-linux-gnueabihf -march=armv7 -mfpu=neon" -DCMAKE_C_FLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon" -DCMAKE_CXX_FLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon -DNDEBUG -I ${PWD}/curlappimageca" -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. -DCURL_INCLUDE_DIRS="$APP_DIR/usr/include" -DCURL_LIBRARIES="$APP_DIR/usr/lib/libcurl.so" -DQt5QuickCompiler_FOUND:BOOL=OFF -DENABLE_QT_ERROR_UI=OFF -call_quirk build_mcpelauncher -build_component32 mcpelauncher -install_component mcpelauncher -reset_cmake_options -download_repo versionsdb https://github.com/minecraft-linux/mcpelauncher-versiondb.git $(cat versionsdb.txt) -add_cmake_options -DCMAKE_INSTALL_PREFIX=/usr -DGAME_LAUNCHER_PATH=. $UPDATE_CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${OUTPUT_DIR}/../armhftoolchain.txt -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=armhf -DCMAKE_ASM_FLAGS="--target=arm-linux-gnueabihf -march=armv7 -mfpu=neon" -DCMAKE_C_FLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon" -DCMAKE_CXX_FLAGS="-latomic --target=arm-linux-gnueabihf -march=armv7 -mfpu=neon -DNDEBUG -I ${PWD}/curlappimageca -DLAUNCHER_INIT_PATCH=\"if(!getenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS\\\")) putenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox\\\");\"" -DLAUNCHER_VERSION_NAME="$(cat version.txt).${BUILD_NUM}-AppImage-armhf" -DLAUNCHER_VERSION_CODE=${BUILD_NUM} -DLAUNCHER_CHANGE_LOG="Launcher $(cat version.txt)
$(cat changelog.txt)" -DQt5QuickCompiler_FOUND:BOOL=OFF -DCURL_INCLUDE_DIRS="$APP_DIR/usr/include" -DCURL_LIBRARIES="$APP_DIR/usr/lib/libcurl.so" -DLAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK=ON -DLAUNCHER_DISABLE_DEV_MODE=OFF -DLAUNCHER_VERSIONDB_URL=https://raw.githubusercontent.com/minecraft-linux/mcpelauncher-versiondb/$(cat versionsdbremote.txt) -DLAUNCHER_VERSIONDB_PATH=$SOURCE_DIR/versionsdb -call_quirk build_mcpelauncher_ui - -build_component32 mcpelauncher-ui -install_component mcpelauncher-ui - -show_status "Packaging" - -cp $SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/Resources/proprietary/mcpelauncher-icon-512.png $BUILD_DIR/mcpelauncher-ui-qt.png -cp $SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/mcpelauncher-ui-qt.desktop $BUILD_DIR/mcpelauncher-ui-qt.desktop - -# download linuxdeploy and make it executable -wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-i386.AppImage -# also download Qt plugin, which is needed for the Qt UI -wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-i386.AppImage - -wget -N https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage - -wget -N https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-armhf - -chmod +x linuxdeploy*-i386.AppImage -chmod +x appimagetool*.AppImage - -export ARCH=arm - -# git clone https://github.com/NixOS/patchelf.git -# cd patchelf -# ./bootstrap.sh -# ./configure -# make -j2 -# cd .. - -mkdir linuxdeploy -cd linuxdeploy -../linuxdeploy-i386.AppImage --appimage-extract -# fix arm -rm -rf squashfs-root/usr/bin/strip squashfs-root/usr/bin/patchelf -# ln -s ../../../../patchelf/src/patchelf squashfs-root/usr/bin/patchelf -# cp ../patchelf/src/patchelf squashfs-root/usr/bin/ -# cp ../patchelf squashfs-root/usr/bin/ -echo '#!/bin/bash' > squashfs-root/usr/bin/patchelf -# echo 'echo patchelf $@>>/home/christopher/linux-packaging-scripts/patchelf.log' >> squashfs-root/usr/bin/patchelf -chmod +x squashfs-root/usr/bin/patchelf -# ln -s /usr/arm-linux-gnueabihf/bin/strip squashfs-root/usr/bin/strip -# cp /usr/arm-linux-gnueabihf/bin/strip squashfs-root/usr/bin/strip -echo '#!/bin/bash' > squashfs-root/usr/bin/strip -chmod +x squashfs-root/usr/bin/strip -cd .. -mkdir linuxdeploy-plugin-qt -cd linuxdeploy-plugin-qt -../linuxdeploy-plugin-qt-i386.AppImage --appimage-extract -# fix arm -rm -rf squashfs-root/usr/bin/strip squashfs-root/usr/bin/patchelf -# ln -s ../../../../patchelf/src/patchelf squashfs-root/usr/bin/patchelf -# cp ../patchelf/src/patchelf squashfs-root/usr/bin/ -# cp ../patchelf squashfs-root/usr/bin/ -echo '#!/bin/bash' > squashfs-root/usr/bin/patchelf -# echo 'echo patchelf $@>>/home/christopher/linux-packaging-scripts/patchelf.log' >> squashfs-root/usr/bin/patchelf -chmod +x squashfs-root/usr/bin/patchelf -# ln -s /usr/arm-linux-gnueabihf/bin/strip squashfs-root/usr/bin/strip -# cp /usr/arm-linux-gnueabihf/bin/strip squashfs-root/usr/bin/strip -echo '#!/bin/bash' > squashfs-root/usr/bin/strip -chmod +x squashfs-root/usr/bin/strip -cd .. -mkdir appimagetool -cd appimagetool -../appimagetool-x86_64.AppImage --appimage-extract -cd .. -LINUXDEPLOY_BIN=linuxdeploy/squashfs-root/AppRun -LINUXDEPLOY_PLUGIN_QT_BIN=linuxdeploy-plugin-qt/squashfs-root/AppRun -APPIMAGETOOL_BIN=appimagetool/squashfs-root/AppRun - -rm -rf ./*.AppImage -check_run $LINUXDEPLOY_BIN --appdir $APP_DIR -i $BUILD_DIR/mcpelauncher-ui-qt.png -d $BUILD_DIR/mcpelauncher-ui-qt.desktop - -export QML_SOURCES_PATHS=$SOURCE_DIR/mcpelauncher-ui/mcpelauncher-ui-qt/qml/:$SOURCE_DIR/mcpelauncher/mcpelauncher-webview -check_run $LINUXDEPLOY_PLUGIN_QT_BIN --appdir $APP_DIR - -# libnss needs it's subdirectory to load the google login view -check_run cp -r /usr/lib/arm-linux-gnueabihf/nss $APP_DIR/usr/lib/ -# glib is excluded by appimagekit, but gmodule isn't which causes issues -check_run rm -rf "$APP_DIR/usr/lib/libgmodule-2.0.so.0" - -curl -L -k https://curl.se/ca/cacert.pem --output $APP_DIR/usr/share/mcpelauncher/cacert.pem - -rm $APP_DIR/AppRun -cp ./AppRun $APP_DIR/AppRun -chmod +x $APP_DIR/AppRun - -export OUTPUT="Minecraft_Bedrock_Launcher-${ARCH}-$(cat version.txt).${BUILD_NUM}.AppImage" -export ARCH=arm -check_run $APPIMAGETOOL_BIN --comp xz ${UPDATE_INFORMATION+"-u"} ${UPDATE_INFORMATION} --runtime-file runtime-armhf $APP_DIR $OUTPUT -check_run mv Minecraft*.AppImage output -#cat '~/Downloads/version.x86_64.zsync' | sed -e 's/\(URL: \)\(.*\)/\1..\/test\/\2/g' | less -#mv *.zsync output/version.armhf.zsync -cat *.zsync | sed -e "s/\(URL: \)\(.*\)/\1..\/$(cat version.txt)-${BUILD_NUM}\/\2/g" > output/version.armhf.zsync -cleanup_build diff --git a/changelog.txt b/changelog.txt index cb2e1be..073f980 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1 +1 @@ -

Disable chromium sandbox to fix loading the sign in pages on linux distributions newer than ubuntu 20.04, this AppImage contains an outdated qt5.9 version and other old ubuntu 16.04 libraries. Both don't receive any ( security ) updates for years.

\ No newline at end of file +

Updated to be able to launch 1.18.30 to 1.19.30

Replaced Launcher Icons, this causes a new UI issue in this AppImage which won't be fixed

AppImage creation scripts updated, may cause regressions if so use get an old AppImage

1.18.30 - 1.19.30 may stop responding while showing a progress of 56%-58%, just close and reopen the game again this issue is not planned to be fixed

1.18.30 - 1.19.30 the game doesn't allow to select any skins, choose game version 1.16.201 to fix this

1.18.30 - 1.19.30 will crash very frequently, this is not planned to be fixed

Realms might work again for some time, but don't rely beeing able to access them due to incompatible game updates

Credits for fixing access to the new world screens go to GitHub user reedacartwright

Credits for 1.19.40 beta patches go to GitHub user 0xCatPKG

Cross Play with macOS is current not possible for game version 1.18.30 and newer, choose an older game version on linux to match the macOS Launcher

\ No newline at end of file diff --git a/common.sh b/common.sh index 501166f..732dc81 100755 --- a/common.sh +++ b/common.sh @@ -45,13 +45,15 @@ create_build_directories() { } download_repo() { - show_status "Downloading $2" if [ -d $SOURCE_DIR/$1 ]; then + show_status "Updating $2" pushd $SOURCE_DIR/$1 - check_run git pull - check_run git submodule update + check_run git fetch origin $3 + check_run git reset --hard FETCH_HEAD + check_run git submodule update --init --recursive popd else + show_status "Downloading $2" mkdir -p $SOURCE_DIR/$1 pushd $SOURCE_DIR/$1 check_run git init diff --git a/curlappimageca/curl/curl.h b/curlappimageca/curl/curl.h index d108f0a..376e634 100644 --- a/curlappimageca/curl/curl.h +++ b/curlappimageca/curl/curl.h @@ -5,7 +5,7 @@ static inline void __curl_appimage_ca(CURL *curl) { const char* appdir = getenv("APPDIR"); - if (appdir) { + if (appdir && !getenv("MCPELAUNCHER_NOCAINFO")) { std::ostringstream cacert; cacert << appdir << "/usr/share/mcpelauncher/cacert.pem"; curl_easy_setopt(curl, CURLOPT_CAINFO, cacert.str().data()); diff --git a/mcpelauncher-ui.commit b/mcpelauncher-ui.commit index 308c2f4..ecdd086 100644 --- a/mcpelauncher-ui.commit +++ b/mcpelauncher-ui.commit @@ -1 +1 @@ -6039645b3d9e5d422d4039bd8e3272dd6b2d4673 +0da9956a953fdfcf928e00a5b24e86faaa0eaed2 diff --git a/mcpelauncher.commit b/mcpelauncher.commit index aee7033..d41fe83 100644 --- a/mcpelauncher.commit +++ b/mcpelauncher.commit @@ -1 +1 @@ -680d827b4bd2bb7a078d57d4957a20bacdb6ffd5 +4c7dadf29df543856db9b73f8a7b220e65d489a2 diff --git a/quirks-ubuntu-1604-32.sh b/quirks-ubuntu-1604-32.sh index 1c06eb1..08c427e 100644 --- a/quirks-ubuntu-1604-32.sh +++ b/quirks-ubuntu-1604-32.sh @@ -1,17 +1,18 @@ git clone https://github.com/openssl/openssl.git -b OpenSSL_1_1_1-stable pushd openssl setarch i386 ./config -m32 --prefix=$PWD/../copenssl32 --openssldir=$PWD/../copenssl32/ssl -make install_sw +make install_sw -j8 export LD_LIBRARY_PATH=$PWD/../copenssl32/lib:${LD_LIBRARY_PATH} popd +MCPELAUNCHER_CFLAGS="-I ${PWD}/copenssl32/include -Wl,-L$PWD/copenssl32/lib $MCPELAUNCHER_CFLAGS" +MCPELAUNCHER_CXXFLAGS="-stdlib=libc++ $MCPELAUNCHER_CXXFLAGS" + quirk_build_msa() { - add_cmake_options -DQT_RPATH=/opt/qt59/lib/ -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS="-m32 -DNDEBUG -I ${PWD}/curlappimageca" -DOPENSSL_ROOT_DIR=/usr/lib/i386-linux-gnu/ -DCMAKE_FIND_ROOT_PATH=/usr/lib/i386-linux-gnu/ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH + add_cmake_options -DQT_RPATH=/opt/qt59/lib/ -DOPENSSL_ROOT_DIR=$PWD/copenssl32/ -DCMAKE_FIND_ROOT_PATH=/usr/lib/i386-linux-gnu/ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH } quirk_build_mcpelauncher() { - add_cmake_options -DCMAKE_ASM_FLAGS=-m32 -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS="-m32 -DNDEBUG -stdlib=libc++ -I ${PWD}/curlappimageca -I ${PWD}/copenssl32/include -Wl,-L$PWD/copenssl32/lib" -DCMAKE_CXX_COMPILER_TARGET="i686-linux-gnu" -DBUILD_FAKE_JNI_TESTS=OFF -DBUILD_FAKE_JNI_EXAMPLES=OFF -DUSE_OWN_CURL=ON -DOPENSSL_ROOT_DIR=$PWD/copenssl32/ -DOPENSSL_LIBRARIES=$PWD/copenssl32/lib -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. + add_cmake_options -DCMAKE_CXX_COMPILER_TARGET="i686-linux-gnu" -DBUILD_FAKE_JNI_TESTS=OFF -DBUILD_FAKE_JNI_EXAMPLES=OFF -DUSE_OWN_CURL=ON -DOPENSSL_ROOT_DIR=$PWD/copenssl32/ -DOPENSSL_LIBRARIES=$PWD/copenssl32/lib -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. } quirk_build_mcpelauncher_ui() { - download_repo versionsdb https://github.com/minecraft-linux/mcpelauncher-versiondb.git $(cat versionsdb.txt) - add_cmake_options -DCMAKE_INSTALL_RPATH="/opt/qt59/lib/:${APP_DIR}/usr/lib/" -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS="-m32 -DNDEBUG -I ${PWD}/curlappimageca -DLAUNCHER_INIT_PATCH=\"if(!getenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS\\\")) putenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox\\\");\"" -DLAUNCHER_VERSION_NAME="$(cat version.txt).${BUILD_NUM}-AppImage-x86" -DLAUNCHER_VERSION_CODE=${BUILD_NUM} -DLAUNCHER_CHANGE_LOG="Launcher $(cat version.txt)
$(cat changelog.txt)" -DOPENSSL_ROOT_DIR=/usr/lib/i386-linux-gnu/ -DCMAKE_FIND_ROOT_PATH=/usr/lib/i386-linux-gnu/ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH -DLAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK=ON -DLAUNCHER_DISABLE_DEV_MODE=OFF -DLAUNCHER_VERSIONDB_URL=https://raw.githubusercontent.com/minecraft-linux/mcpelauncher-versiondb/$(cat versionsdbremote.txt) -DLAUNCHER_VERSIONDB_PATH=$SOURCE_DIR/versionsdb -} - + add_cmake_options -DCMAKE_INSTALL_RPATH="/opt/qt59/lib/:${APP_DIR}/usr/lib/" -DOPENSSL_ROOT_DIR=$PWD/copenssl32/ -DCMAKE_FIND_ROOT_PATH=/usr/lib/i386-linux-gnu/ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH +} \ No newline at end of file diff --git a/quirks-ubuntu-1604.sh b/quirks-ubuntu-1604.sh index d6142d7..5d00ee0 100644 --- a/quirks-ubuntu-1604.sh +++ b/quirks-ubuntu-1604.sh @@ -1,25 +1,29 @@ git clone https://github.com/openssl/openssl.git -b OpenSSL_1_1_1-stable pushd openssl setarch i386 ./config -m32 --prefix=$PWD/../copenssl32 --openssldir=$PWD/../copenssl32/ssl -make install_sw +make install_sw -j8 ./config --prefix=$PWD/../copenssl64 --openssldir=$PWD/../copenssl64/ssl -make clean -make install_sw +make clean -j8 +make install_sw -j8 export LD_LIBRARY_PATH=$PWD/../copenssl64/lib:$PWD/../copenssl32/lib:${LD_LIBRARY_PATH} popd +MCPELAUNCHER_CFLAGS32="-I ${PWD}/copenssl32/include -Wl,-L$PWD/copenssl32/lib $MCPELAUNCHER_CFLAGS32" +MCPELAUNCHER_CFLAGS="-stdlib=libc++ -I ${PWD}/copenssl64/include -Wl,-L$PWD/copenssl64/lib $MCPELAUNCHER_CFLAGS" +MCPELAUNCHER_CXXFLAGS32="-stdlib=libc++ $MCPELAUNCHER_CXXFLAGS32" +MCPELAUNCHER_CXXFLAGS="-stdlib=libc++ $MCPELAUNCHER_CXXFLAGS" + quirk_build_msa() { - add_cmake_options -DQT_RPATH=/opt/qt59/lib/ -DCMAKE_C_COMPILER="/usr/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/bin/g++" -DCMAKE_CXX_FLAGS="-DNDEBUG -I ${PWD}/curlappimageca" + add_cmake_options -DQT_RPATH=/opt/qt59/lib/ } quirk_build_mcpelauncher() { DEBIAN_FRONTEND=noninteractive apt -y remove libegl1-mesa-dev:i386 libevdev-dev:i386 libpng-dev:i386 libx11-dev:i386 libxi-dev:i386 libcurl4-openssl-dev:i386 libudev-dev:i386 libevdev-dev:i386 libegl1-mesa-dev:i386 zlib1g-dev:i386 DEBIAN_FRONTEND=noninteractive apt -y install libegl1-mesa-dev libevdev-dev libpng-dev libx11-dev libxi-dev libcurl4-openssl-dev libudev-dev libevdev-dev libegl1-mesa-dev libasound2 zlib1g-dev - add_cmake_options -DZLIB_LIBRARY=/usr/lib/x86_64-linux-gnu/libz.so -DPNG_LIBRARY=/usr/lib/x86_64-linux-gnu/libpng.so -DPNG_PNG_INCLUDE_DIR=/usr/include/libpng -DX11_X11_LIB=/usr/lib/x86_64-linux-gnu/libX11.so -DCURL_LIBRARY=/usr/lib/x86_64-linux-gnu/libcurl.so -DCMAKE_CXX_FLAGS="-DNDEBUG -stdlib=libc++ -I ${PWD}/curlappimageca -I ${PWD}/copenssl64/include -Wl,-L$PWD/copenssl64/lib" -DBUILD_FAKE_JNI_TESTS=OFF -DBUILD_FAKE_JNI_EXAMPLES=OFF -DOPENSSL_ROOT_DIR=$PWD/copenssl64/ -DOPENSSL_LIBRARIES=$PWD/copenssl64/lib -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. + add_cmake_options -DZLIB_LIBRARY=/usr/lib/x86_64-linux-gnu/libz.so -DPNG_LIBRARY=/usr/lib/x86_64-linux-gnu/libpng.so -DPNG_PNG_INCLUDE_DIR=/usr/include/libpng -DX11_X11_LIB=/usr/lib/x86_64-linux-gnu/libX11.so -DCURL_LIBRARY=/usr/lib/x86_64-linux-gnu/libcurl.so -DBUILD_FAKE_JNI_TESTS=OFF -DBUILD_FAKE_JNI_EXAMPLES=OFF -DOPENSSL_ROOT_DIR=$PWD/copenssl64/ -DOPENSSL_LIBRARIES=$PWD/copenssl64/lib -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. } quirk_build_mcpelauncher32() { - add_cmake_options -DCMAKE_ASM_FLAGS=-m32 -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS="-m32 -DNDEBUG -stdlib=libc++ -I ${PWD}/curlappimageca -I ${PWD}/copenssl32/include -Wl,-L$PWD/copenssl32/lib" -DCMAKE_CXX_COMPILER_TARGET="i686-linux-gnu" -DBUILD_FAKE_JNI_TESTS=OFF -DBUILD_FAKE_JNI_EXAMPLES=OFF -DUSE_OWN_CURL=ON -DOPENSSL_ROOT_DIR=$PWD/copenssl32/ -DOPENSSL_LIBRARIES=$PWD/copenssl32/lib -DBUILD_WEBVIEW=OFF -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. + add_cmake_options -DCMAKE_CXX_COMPILER_TARGET="i686-linux-gnu" -DBUILD_FAKE_JNI_TESTS=OFF -DBUILD_FAKE_JNI_EXAMPLES=OFF -DUSE_OWN_CURL=ON -DOPENSSL_ROOT_DIR=$PWD/copenssl32/ -DOPENSSL_LIBRARIES=$PWD/copenssl32/lib -DBUILD_WEBVIEW=OFF -DJNI_USE_JNIVM=ON -DXAL_WEBVIEW_QT_PATH=. } quirk_build_mcpelauncher_ui() { - download_repo versionsdb https://github.com/minecraft-linux/mcpelauncher-versiondb.git $(cat versionsdb.txt) - add_cmake_options -DCMAKE_INSTALL_RPATH="/opt/qt59/lib/:${APP_DIR}/usr/lib/" -DCMAKE_CXX_FLAGS="-DNDEBUG -I ${PWD}/curlappimageca -DLAUNCHER_INIT_PATCH=\"if(!getenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS\\\")) putenv(\\\"QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox\\\");\"" -DLAUNCHER_VERSION_NAME="$(cat version.txt).${BUILD_NUM}-AppImage-x86_64" -DLAUNCHER_VERSION_CODE=${BUILD_NUM} -DLAUNCHER_CHANGE_LOG="Launcher $(cat version.txt)
$(cat changelog.txt)" -DLAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK=ON -DLAUNCHER_DISABLE_DEV_MODE=OFF -DLAUNCHER_VERSIONDB_URL=https://raw.githubusercontent.com/minecraft-linux/mcpelauncher-versiondb/$(cat versionsdbremote.txt) -DLAUNCHER_VERSIONDB_PATH=$SOURCE_DIR/versionsdb + add_cmake_options -DCMAKE_INSTALL_RPATH="/opt/qt59/lib/:${APP_DIR}/usr/lib/" } diff --git a/quirks.sh b/quirks.sh new file mode 100644 index 0000000..6ac53ac --- /dev/null +++ b/quirks.sh @@ -0,0 +1,4 @@ +CFLAGS32="-I ${PWD}/copenssl32/include -Wl,-L$PWD/copenssl32/lib $CFLAGS32" +CFLAGS="-I ${PWD}/copenssl64/include -Wl,-L$PWD/copenssl64/lib $CFLAGS" +CXXFLAGS32="-stdlib=libc++ $CXXFLAGS32" +CXXFLAGS="-stdlib=libc++ $CXXFLAGS" \ No newline at end of file diff --git a/version.txt b/version.txt index f54b243..b043aa6 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v0.3.4 +v0.5.0 diff --git a/versionsdb.txt b/versionsdb.txt index 6ee22f8..e50b1a6 100644 --- a/versionsdb.txt +++ b/versionsdb.txt @@ -1 +1 @@ -62b2661758db127f21e2ec80336b45f56a6256d1 +8de4069db08403f86a22d4d558295e83a0ebfcfa diff --git a/versionsdbremote.txt b/versionsdbremote.txt index 268b033..b277d44 100644 --- a/versionsdbremote.txt +++ b/versionsdbremote.txt @@ -1 +1 @@ -v0.3.0 +v0.5.x