diff --git a/.cirrus.yml b/.cirrus.yml index 189dc32a7..da97517ef 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -111,7 +111,7 @@ linux_qt5_qbs_task_template: &LINUX_QT5_QBS_TASK_TEMPLATE - qbs -p autotest-runner -d build profile:qt5 config:release - ccache -s -linuxdeployqt_task_template: &LINUXDEPLOYQT_TASK_TEMPLATE +appimage_task_template: &APPIMAGE_TASK_TEMPLATE pip_cache: folder: ${PIP_CACHE_DIR} install_script: @@ -136,10 +136,9 @@ linuxdeployqt_task_template: &LINUXDEPLOYQT_TASK_TEMPLATE - qbs setup-qt /opt/qt515/bin/qmake qt5 - qbs config defaultProfile qt5 - qbs config profiles.qt5.baseProfile ${COMPILER} - - qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --jobs $(nproc) profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root modules.buildconfig.enableAppImage:true + - qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --jobs $(nproc) profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/AppDir modules.buildconfig.enableAppImage:true modules.buildconfig.enableRPath:false - qbs -p autotest-runner -d build profile:qt5 config:release - - export LD_LIBRARY_PATH=/opt/qt515/lib:$CIRRUS_WORKING_DIR/build/install-root/usr/local/lib/valentina:$LD_LIBRARY_PATH - - linuxdeployqt $CIRRUS_WORKING_DIR/build/install-root/usr/local/share/applications/ua.com.smart-pattern.valentina.desktop -appimage -qmake='/opt/qt515/bin/qmake' -executable-dir=$CIRRUS_WORKING_DIR/build/install-root/usr/local/bin -extra-plugins=iconengines,platformthemes/libqgtk3.so + - appimage-builder --recipe dist/AppImage/AppImageBuilder.yml --appdir $CIRRUS_WORKING_DIR/build/AppDir --skip-test - ccache -s deploy_script: - pwd @@ -209,7 +208,7 @@ linux_task: cpu: 2 memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container - container: - image: dismine/linuxdeployqt:latest + image: dismine/appimage-builder:latest env: COMPILER: gcc QMAKE_SPEC: "linux-g++" @@ -218,7 +217,7 @@ linux_task: PIP_CACHE_DIR: ${HOME}/.cache/pip matrix: - name: 'AppImage' - << : *LINUXDEPLOYQT_TASK_TEMPLATE + << : *APPIMAGE_TASK_TEMPLATE env: ACCESS_TOKEN: ENCRYPTED[81e0b2381ffb628b73f5c94f834010e6631191e0ad03cdd0850d440fb2737a74b68131d842030f010c1bf73ab4cdc1ae] DEPLOY: "true" diff --git a/dist/AppImage/AppImageBuilder.yml b/dist/AppImage/AppImageBuilder.yml new file mode 100644 index 000000000..e165cb847 --- /dev/null +++ b/dist/AppImage/AppImageBuilder.yml @@ -0,0 +1,126 @@ +# appimage-builder recipe see https://appimage-builder.readthedocs.io for details +version: 1 +AppDir: + app_info: + id: ua.com.smart-pattern.valentina + name: Valentina + icon: valentina + version: continuous + exec: usr/local/bin/valentina + exec_args: $@ + apt: + arch: + - amd64 + allow_unauthenticated: true + sources: + - sourceline: deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted + - sourceline: deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted + - sourceline: deb http://us.archive.ubuntu.com/ubuntu/ focal universe + - sourceline: deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe + - sourceline: deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse + - sourceline: deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse + - sourceline: deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted + universe multiverse + - sourceline: deb http://security.ubuntu.com/ubuntu focal-security main restricted + - sourceline: deb http://security.ubuntu.com/ubuntu focal-security universe + - sourceline: deb http://security.ubuntu.com/ubuntu focal-security multiverse + - sourceline: deb http://ppa.launchpad.net/beineri/opt-qt-5.15.4-focal/ubuntu + focal main + include: + - xdg-desktop-portal-kde + - libgtk-3-0 + - libgtk-3-common + - librsvg2-2 + - librsvg2-common:amd64 + - liblzma5:amd64 + - libpcre3:amd64 + - libgdk-pixbuf2.0-0 + - libgdk-pixbuf2.0-bin + - libgdk-pixbuf2.0-common + - qt515base + - qt515imageformats + - qt515svg + - qt515xmlpatterns + - libpango-1.0-0 + files: + include: [] + exclude: + - usr/share/man + - usr/share/doc/*/README.* + - usr/share/doc/*/changelog.* + - usr/share/doc/*/NEWS.* + - usr/share/doc/*/TODO.* + - usr/lib/x86_64-linux-gnu/libQt5* + - opt/qt515/include + - opt/qt515/bin/opt/qt515/bin/fixqt4headers.pl + - opt/qt515/bin/moc + - opt/qt515/bin/qdbuscpp2xml + - opt/qt515/bin/qdbusxml2cpp + - opt/qt515/bin/qlalr + - opt/qt515/bin/qmake + - opt/qt515/bin/qt.conf + - opt/qt515/bin/qt515-env.sh + - opt/qt515/bin/qvkgen + - opt/qt515/bin/rcc + - opt/qt515/bin/syncqt.pl + - opt/qt515/bin/uic + - opt/qt515/doc + - opt/qt515/examples + - opt/qt515/mkspecs + - opt/qt515/lib/cmake + - opt/qt515/lib/metatypes + - opt/qt515/lib/pkgconfig + - opt/qt515/lib/*.a + - opt/qt515/lib/*.la + - opt/qt515/lib/*.prl + - opt/qt515/lib/libQt5AccessibilitySupport.* + - opt/qt515/lib/libQt5Bootstrap.* + - opt/qt515/lib/libQt5DeviceDiscoverySupport.* + - opt/qt515/lib/libQt5EdidSupport.* + - opt/qt515/lib/libQt5EglFSDeviceIntegration.* + - opt/qt515/lib/libQt5EglSupport.* + - opt/qt515/lib/libQt5EventDispatcherSupport.* + - opt/qt515/lib/libQt5FbSupport.* + - opt/qt515/lib/libQt5FontDatabaseSupport.* + - opt/qt515/lib/libQt5GlxSupport.* + - opt/qt515/lib/libQt5InputSupport.* + - opt/qt515/lib/libQt5LinuxAccessibilitySupport.* + - opt/qt515/lib/libQt5OpenGL.* + - opt/qt515/lib/libQt5OpenGLExtensions.* + - opt/qt515/lib/libQt5PlatformCompositorSupport.* + - opt/qt515/lib/libQt5ServiceSupport.* + - opt/qt515/lib/libQt5ThemeSupport.* + - opt/qt515/lib/libQt5VulkanSupport.* + - opt/qt515/lib/libQt5XcbQpa.* + - opt/qt515/lib/libQt5XkbCommonSupport.* + - opt/qt515/plugins/egldeviceintegrations + - opt/qt515/plugins/platforminputcontexts + - opt/qt515/plugins/sqldrivers + - opt/qt515/plugins/xcbglintegrations + runtime: + env: + APPDIR_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/opt/qt515/lib:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/local/lib/valentina" + LD_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/opt/qt515/lib:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/local/lib/valentina" + QT_PLUGIN_PATH: "$APPDIR/opt/qt515/plugins" + QT_QPA_PLATFORMTHEME: xdgdesktopportal + GDK_PIXBUF_MODULEDIR: $APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders + GDK_PIXBUF_MODULE_FILE: $APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache + test: + fedora-30: + image: appimagecrafters/tests-env:fedora-30 + command: ./AppRun + debian-stable: + image: appimagecrafters/tests-env:debian-stable + command: ./AppRun + archlinux-latest: + image: appimagecrafters/tests-env:archlinux-latest + command: ./AppRun + centos-7: + image: appimagecrafters/tests-env:centos-7 + command: ./AppRun + ubuntu-xenial: + image: appimagecrafters/tests-env:ubuntu-xenial + command: ./AppRun +AppImage: + arch: x86_64 + update-information: guess diff --git a/dist/AppImage/_icon b/dist/AppImage/_icon deleted file mode 100644 index 99d1a087c..000000000 Binary files a/dist/AppImage/_icon and /dev/null differ diff --git a/dist/AppImage/appimage.yml b/dist/AppImage/appimage.yml deleted file mode 100644 index 24406dec2..000000000 --- a/dist/AppImage/appimage.yml +++ /dev/null @@ -1,71 +0,0 @@ -# -# Building an AppImage for Valentina in openSuse Build Service (OBS) -# -# Unfortunately the C++ compiler in the appimage build service is stuck with C++11 -# - -app: valentina -# binpatch: true - -# resources required at build time -build: - # packages which get installed in the build enviroment. - # These are NOT part of the resulting image. - packages: - - gcc-c++ - - libqt5-qtbase-devel - - pkgconfig(Qt5Svg) - - pkgconfig(Qt5Core) - - pkgconfig(Qt5Gui) - - pkgconfig(Qt5Network) - - pkgconfig(Qt5PrintSupport) - - pkgconfig(Qt5Widgets) - - pkgconfig(Qt5Xml) - - pkgconfig(Qt5Concurrent) - - pkgconfig(Qt5XmlPatterns) - - pkgconfig(zlib) - - libQt5Core-devel - - libpng-devel - - libqt5-linguist-devel - - libicu-devel # to be able to fix the icu data path - - linuxdeployqt # required tooling, see script section - -# resources which will become available as part of the source. -# The "appimage" source service needs to be enabled to process these. -# git: -# - https://gitlab.com/smart-pattern/valentina.git -# hg: -# - .... -# svn: -# - .... -# - files: - - "https://gitlab.com/smart-pattern/valentina/-/archive/develop/valentina-develop.tar.gz" - -# OPTIONAL: ingredient packages are packages which become part of the AppImage. -# you may want to remove parts of their content in script section. -ingredients: - packages: - - libqt5-qtimageformats - -script: -# OPTIONAL: compile or modify the AppDir. The environment variables: -# - $BUILD_SOURCE_DIR point to the source directory -# - $BUILD_APPDIR point to the AppDir. This directory will become the content of the AppImage - - cd $BUILD_SOURCE_DIR - - tar zxvf $BUILD_SOURCE_DIR/valentina-develop.tar.gz - - mv -v valentina-develop valentina - - cd $BUILD_SOURCE_DIR/valentina - - qmake-qt5 PREFIX=/usr PREFIX_LIB=/usr/lib LRELEASE=lrelease-qt5 Valentina.pro -r DEFINES+=APPIMAGE "CONFIG += noTests noRunPath no_ccache noDebugSymbols" - - make -j$(nproc) - - make INSTALL_ROOT=$BUILD_APPDIR -j$(nproc) install - -# create the image file - - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH - - rm -rf /usr/share/licenses/libqt5-qtimageformats -# bundle icu's data - - mkdir -p $BUILD_APPDIR/usr/share/icu - - cp /usr/share/icu/*/icudt*.dat $BUILD_APPDIR/usr/share/icu/ - - linuxdeployqt $BUILD_APPDIR/usr/share/applications/ua.com.smart-pattern.valentina.desktop -bundle-non-qt-libs -verbose=2 -no-strip -# Show what we have done - - find $BUILD_APPDIR/ diff --git a/scripts/appimage-deploy.sh b/scripts/appimage-deploy.sh index 444321ba2..3b67ca464 100755 --- a/scripts/appimage-deploy.sh +++ b/scripts/appimage-deploy.sh @@ -25,7 +25,7 @@ if [[ "$DEPLOY" == "true" ]]; then check_failure "Unable to clean stale artifacts."; print_info "Start uploading."; - python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/Valentina-continuous-x86_64.AppImage "/0.7.x/Linux/valentina-${TARGET_PLATFORM}-${ARCH}-${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}.AppImage"; + python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/build/Valentina-continuous-x86_64.AppImage "/0.7.x/Linux/valentina-${TARGET_PLATFORM}-${ARCH}-${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}.AppImage"; check_failure "Unable to upload Valentina's AppImage."; print_info "Successfully uploaded.";