diff --git a/.github/workflows/build-quickgui.yml b/.github/workflows/build-quickgui.yml index 681b14f..76ee0f6 100644 --- a/.github/workflows/build-quickgui.yml +++ b/.github/workflows/build-quickgui.yml @@ -13,20 +13,23 @@ on: # https://github.blog/changelog/2024-06-03-actions-arm-based-linux-and-windows-runners-are-now-in-public-beta/ jobs: - build-linux-x64: + test-build-linux-x64: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 + - name: "Checkout ๐ฅก" + uses: actions/checkout@v4 + - name: "Install Flutter ๐ฆ" + uses: subosito/flutter-action@v2 with: channel: stable architecture: x64 flutter-version-file: pubspec.yaml - - name: Install system dependencies ๐ฆ๏ธ - run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5 + - name: "Install dependencies ๐พ" + run: | + sudo apt-get -y install clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5 - name: Install Flutter dependencies ๐ฆ run: flutter pub get - - name: Enable Linux build ๐ง + - name: Enable Linux Desktop ๐ง run: flutter config --enable-linux-desktop - name: Build artifacts ๐๏ธ run: flutter build linux --release @@ -39,15 +42,77 @@ jobs: path: build/linux/x64/release/bundle overwrite: true - build-with-nix: + test-build-ppa-x64: + runs-on: ubuntu-22.04 + steps: + - name: "Checkout ๐ฅก" + uses: actions/checkout@v4 + - name: "Install Flutter ๐ฆ" + uses: subosito/flutter-action@v2 + with: + channel: stable + architecture: x64 + flutter-version-file: pubspec.yaml + - name: "Install dependencies ๐พ" + run: | + sudo apt-get -y install clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5 + sudo apt-get -y install debhelper-compat distro-info dput devscripts rsync + - name: Install Flutter dependencies ๐ฆ + run: flutter pub get + - name: Enable Linux Desktop ๐ง + run: flutter config --enable-linux-desktop + - name: Build artifacts ๐๏ธ + run: flutter build linux --release + - name: "Import gpg key ๐" + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }} + - name: "Upload to PPA โคด๏ธ" + env: + DEBEMAIL: ${{ secrets.DEBEMAIL }} + DEBFULLNAME: ${{ secrets.DEBFULLNAME }} + run: | + # Version variables + DEB_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2 | sed 's/+/-/') + TAR_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2 | sed 's/+.*//') + STAMP=$(date +%y%j.%H%M) + # Create a "fake" orig.tar.xz + mkdir -p ubuntu/build + cp -a build/linux/x64/release/bundle/* ubuntu/build/ + cp -a assets/resources/quickgui.desktop ubuntu/build/ + for SIZE in 16 32 48 64 128 256 512; do + mkdir -p ubuntu/build/icons/hicolor/${SIZE}x${SIZE}/apps/ + cp -av assets/resources/quickgui_${SIZE}.png ubuntu/build/icons/hicolor/${SIZE}x${SIZE}/apps/quickgui.png + done + tar cvf "ubuntu/quickgui_${TAR_VER}.orig.tar" --directory ubuntu/build . + xz -vv -fz "ubuntu/quickgui_${TAR_VER}.orig.tar" + # Make a debian "source" package + mkdir -p ubuntu/build/debian + cp -a linux/packaging/debian/* ubuntu/build/debian/ + sed -i 's/Architecture: any/Architecture: amd64/g' ubuntu/build/debian/control + cd ubuntu/build + for CODENAME in $(distro-info --supported); do + rm debian/changelog + dch --package quickgui --newversion="${DEB_VER}~${CODENAME}${STAMP}" --distribution=${CODENAME} "New upstream release." --create + dpkg-buildpackage -d -S -sa + #dput ppa:flexiondotorg/rubbish ../quickgui_${DEB_VER}~${CODENAME}${STAMP}_source.changes + done + - name: Show artifacts ๐ + run: tree ubuntu/ + + test-build-nix-x64: runs-on: ubuntu-22.04 permissions: id-token: "write" contents: "read" steps: - - uses: "actions/checkout@v4" - - uses: "DeterminateSystems/nix-installer-action@v12" - - uses: "DeterminateSystems/magic-nix-cache-action@v7" + - name: "Checkout ๐ฅก" + uses: "actions/checkout@v4" + - name: "Install Nix โ๏ธ" + uses: "DeterminateSystems/nix-installer-action@v12" + - name: "Enable Magic Nix Cache ๐ช" + uses: "DeterminateSystems/magic-nix-cache-action@v7" - name: "Build with Nix โ๏ธ" run: | nix build .#quickgui diff --git a/.github/workflows/publish-quickgui.yml b/.github/workflows/publish-quickgui.yml index c6cfe30..f3c5229 100644 --- a/.github/workflows/publish-quickgui.yml +++ b/.github/workflows/publish-quickgui.yml @@ -1,5 +1,9 @@ name: Publish Quickgui ๐ท๏ธ - +# To release a new version: +# - Make sure pubspec.yaml version: has been revved and is in the format "X.Y.Z+n" +# - Create a git tag with the format "X.Y.Z" and push it +# - The build and publish will run automatically if the git tag matches the +# pubspec.yaml version without the +n suffix on: push: tags: @@ -27,9 +31,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - APP_VERSION=$(grep "^version" pubspec.yaml | cut -d' ' -f2) + APP_VERSION=$(grep "^version" pubspec.yaml | cut -d' ' -f2 | sed 's/+.*//') GIT_VERSION=$(git describe --tags | cut -d'-' -f1) - echo "App version: ${REL_VERSION}" + echo "App version: ${APP_VERSION}" echo "Git version: ${GIT_VERSION}" if [ "${APP_VERSION}" != "${GIT_VERSION}" ]; then echo "ERROR! Version mismatch."; @@ -41,31 +45,34 @@ jobs: name: "Build Linux x64 ๐๏ธ" runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 + - name: "Checkout ๐ฅก" + uses: actions/checkout@v4 + - name: "Install Flutter ๐ฆ" + uses: subosito/flutter-action@v2 with: channel: stable architecture: x64 flutter-version-file: pubspec.yaml - name: Install system dependencies ๐ฆ๏ธ - run: sudo apt-get install -y clang cmake libblkid1 liblzma5 libgtk-3-0 libgtk-3-dev ninja-build pkg-config + run: | + sudo apt-get -y install clang cmake libblkid1 liblzma5 libgtk-3-0 libgtk-3-dev ninja-build pkg-config - name: Install Flutter dependencies ๐ฆ run: flutter pub get - name: Activate flutter_distributor ๐ run: dart pub global activate flutter_distributor - name: Build AppImage ๐ง run: | - sudo apt-get install -y libfuse-dev locate + sudo apt-get -y install libfuse-dev locate wget -q "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" -O /usr/local/bin/appimagetool chmod +x /usr/local/bin/appimagetool flutter_distributor package --platform=linux --targets=appimage - name: Build .deb ๐ฅ run: | - sudo apt-get install -y dpkg + sudo apt-get -y install dpkg flutter_distributor package --platform=linux --targets=deb - name: Build .rpm ๐ฉ run: | - sudo apt-get install -y patchelf rpm + sudo apt-get -y install patchelf rpm flutter_distributor package --platform=linux --targets=rpm - name: Build .zip ๐ค run: flutter_distributor package --platform=linux --targets=zip @@ -110,3 +117,63 @@ jobs: visibility: "public" name: "quickemu-project/quickgui" tag: "${{ inputs.tag }}" + + publish-ppa-x64: + needs: [version-check] + runs-on: ubuntu-22.04 + steps: + - name: "Checkout ๐ฅก" + uses: actions/checkout@v4 + - name: "Install Flutter ๐ฆ" + uses: subosito/flutter-action@v2 + with: + channel: stable + architecture: x64 + flutter-version-file: pubspec.yaml + - name: "Install dependencies ๐พ" + run: | + sudo apt-get -y install clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5 + sudo apt-get -y install debhelper-compat distro-info dput devscripts rsync + - name: Install Flutter dependencies ๐ฆ + run: flutter pub get + - name: Enable Linux Desktop ๐ง + run: flutter config --enable-linux-desktop + - name: Build artifacts ๐๏ธ + run: flutter build linux --release + - name: "Import gpg key ๐" + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }} + - name: "Upload to PPA โคด๏ธ" + env: + DEBEMAIL: ${{ secrets.DEBEMAIL }} + DEBFULLNAME: ${{ secrets.DEBFULLNAME }} + run: | + # Version variables + DEB_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2 | sed 's/+/-/') + TAR_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2 | sed 's/+.*//') + STAMP=$(date +%y%j.%H%M) + # Create a "fake" orig.tar.xz + mkdir -p ubuntu/build + cp -a build/linux/x64/release/bundle/* ubuntu/build/ + cp -a assets/resources/quickgui.desktop ubuntu/build/ + for SIZE in 16 32 48 64 128 256 512; do + mkdir -p ubuntu/build/icons/hicolor/${SIZE}x${SIZE}/apps/ + cp -av assets/resources/quickgui_${SIZE}.png ubuntu/build/icons/hicolor/${SIZE}x${SIZE}/apps/quickgui.png + done + tar cvf "ubuntu/quickgui_${TAR_VER}.orig.tar" --directory ubuntu/build . + xz -vv -fz "ubuntu/quickgui_${TAR_VER}.orig.tar" + # Make a debian "source" package + mkdir -p ubuntu/build/debian + cp -a linux/packaging/debian/* ubuntu/build/debian/ + sed -i 's/Architecture: any/Architecture: amd64/g' ubuntu/build/debian/control + cd ubuntu/build + for CODENAME in $(distro-info --supported); do + rm debian/changelog + dch --package quickgui --newversion="${DEB_VER}~${CODENAME}${STAMP}" --distribution=${CODENAME} "New upstream release." --create + dpkg-buildpackage -d -S -sa + dput ppa:flexiondotorg/quickemu ../quickgui_${DEB_VER}~${CODENAME}${STAMP}_source.changes + done + - name: Show artifacts ๐ + run: tree ubuntu/ diff --git a/Makefile b/Makefile deleted file mode 100644 index 35862fa..0000000 --- a/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -SHELL := /usr/bin/env bash -VERSION := $(shell cat pubspec.yaml | grep "^version: " | cut -c 10- | sed 's/+/\-/') -SHORT_VERSION := $(shell xx="$(VERSION)"; arrVersion=($${xx//-/ }); echo $${arrVersion[0]};) -BUILD_ROOT := ../build-package -BASE_NAME := quickgui_$(SHORT_VERSION) -BUILD_DIR := $(BUILD_ROOT)/$(BASE_NAME) -BIN_TAR := $(BUILD_ROOT)/$(BASE_NAME).tar -ORIG_TAR := $(BASE_NAME).orig.tar -SRC_TAR := $(BUILD_ROOT)/$(BASE_NAME)-src.tar -FLUTTER := /opt/flutter/bin/flutter - -version: - @echo VERSION is $(VERSION) - @echo SHORT_VERSION is $(SHORT_VERSION) - @echo BUILD_ROOT is $(BUILD_ROOT) - @echo type "make bin" to create binary package - @echo type "make ppa" to upload to launchpad - -spawn: - echo "#! /bin/env bash" > /home/yannick/machines/focal/home/yannick/build.sh - echo "" >> /home/yannick/machines/focal/home/yannick/build.sh - echo "cd /opt/flutter-projects/quickgui" >> /home/yannick/machines/focal/home/yannick/build.sh - echo "make bin" >> /home/yannick/machines/focal/home/yannick/build.sh - chmod +x /home/yannick/machines/focal/home/yannick/build.sh - sudo systemd-nspawn -D /home/yannick/machines/focal --resolv-conf=off --bind-ro=/home/yannick/machines/resolv.conf:/etc/resolv.conf --bind=/opt/flutter:/opt/flutter --bind=/opt/flutter-projects:/opt/flutter-projects -u yannick bash /home/yannick/build.sh - -distclean: - $(FLUTTER) clean - rm -rf $(BUILD_ROOT)/* - -quickgui: distclean - $(FLUTTER) pub get - $(FLUTTER) build linux --release - -bin: quickgui - mkdir -p $(BUILD_DIR) - cp -a build/linux/x64/release/bundle/* $(BUILD_DIR) - cp -a assets/resources $(BUILD_DIR) - tar -C $(BUILD_ROOT) -c -v --exclude "quickemu-icons/*.png" -f $(BIN_TAR) $(BASE_NAME) - xz -z $(BIN_TAR) - -ppa: version - cp $(BIN_TAR).xz /mnt/data/dev/debianpackages/quickgui.deb/$(ORIG_TAR).xz - cd /mnt/data/dev/debianpackages/quickgui.deb/quickgui ; \ - dch -v $(VERSION) "New changelog message" ; \ - vi debian/changelog ; \ - for dist in focal jammy kinetic lunar; do \ - sed -i "1 s/^\(.*\)) UNRELEASED;\(.*\)\$$/\1~xxx1.0) xxx;\2/g" debian/changelog ; \ - sed -i "1 s/~.*1\.0) .*;\(.*\)\$$/~$${dist}1.0) $$dist;\1/g" debian/changelog ; \ - dpkg-buildpackage -d -S -sa ; \ - dput ppa:yannick-mauray/quickgui ../quickgui_$(VERSION)~$${dist}1.0_source.changes ; \ - done - -download: version - for dist in focal jammy kinetic; do \ - aria2c https://launchpad.net/~yannick-mauray/+archive/ubuntu/quickgui/+files/quickgui_$(VERSION)~$${dist}1.0_amd64.deb; \ - done - -src: - mkdir -p $(BUILD_ROOT) - tar -C .. -c -v -f $(SRC_TAR) --exclude .git --transform 's/^quickgui/$(BASE_NAME)/' quickgui - rm ${SRC_TAR}.xz - xz -z $(SRC_TAR) diff --git a/README.md b/README.md index dc4715d..28920da 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Quickgui -
A Flutter frontend for quickget and quickemu.
+An elegant virtual machine manager for the desktop

Fri, 25 Feb 2022 08:27:45 +0100
diff --git a/linux/packaging/debian/control b/linux/packaging/debian/control
new file mode 100644
index 0000000..448a690
--- /dev/null
+++ b/linux/packaging/debian/control
@@ -0,0 +1,27 @@
+Source: quickgui
+Section: utils
+Priority: optional
+Maintainer: Martin Wimpress
+Build-Depends:
+ debhelper-compat (= 12),
+Standards-Version: 4.5.1
+Homepage: https://github.com/quickemu-project/quickgui
+Vcs-Browser: https://github.com/quickemu-project/quickgui
+Vcs-Git: https://github.com/quickemu-project/quickgui.git
+Rules-Requires-Root: no
+
+Package: quickgui
+Architecture: any
+Depends:
+ zenity,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Recommends:
+ quickemu,
+Description: An elegant virtual machine manager for the desktop
+ An elegant desktop application to quickly create an run optimised virtual
+ machines using Quickget and Quickemu.
+ .
+ Nearly 1000 operating systems supported including Windows, macOS, BSDs, and
+ 100s of Linux distros. All with automated download and configuration.
+ .
diff --git a/linux/packaging/debian/copyright b/linux/packaging/debian/copyright
new file mode 100644
index 0000000..0aeb998
--- /dev/null
+++ b/linux/packaging/debian/copyright
@@ -0,0 +1,45 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: quickgui
+Upstream-Contact: Martin Wimpress
+Source: https://github.com/quickemu-project/quickgui
+
+Files: *
+Copyright: 2021 - 2024 Yannick Mauray
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+# If you want to use GPL v2 or later for the /debian/* files use
+# the following clauses, or change it to suit. Delete these two lines
+Files: debian/*
+Copyright: 2021 - 2024 Martin Wimpress
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/linux/packaging/debian/install b/linux/packaging/debian/install
new file mode 100644
index 0000000..d98e217
--- /dev/null
+++ b/linux/packaging/debian/install
@@ -0,0 +1,5 @@
+quickgui usr/share/quickgui
+data/ usr/share/quickgui
+lib/ usr/share/quickgui
+icons/ usr/share
+quickgui.desktop usr/share/applications
diff --git a/linux/packaging/debian/quickgui.links b/linux/packaging/debian/quickgui.links
new file mode 100644
index 0000000..0266ce4
--- /dev/null
+++ b/linux/packaging/debian/quickgui.links
@@ -0,0 +1 @@
+/usr/share/quickgui/quickgui /usr/bin/quickgui
diff --git a/linux/packaging/debian/rules b/linux/packaging/debian/rules
new file mode 100755
index 0000000..d940b12
--- /dev/null
+++ b/linux/packaging/debian/rules
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+export DH_VERBOSE = 1
+
+%:
+ dh $@
+
+override_dh_usrlocal:
+
+override_dh_shlibdeps:
diff --git a/linux/packaging/debian/source/format b/linux/packaging/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/linux/packaging/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/linux/packaging/debian/source/include-binaries b/linux/packaging/debian/source/include-binaries
new file mode 100644
index 0000000..9d42e4e
--- /dev/null
+++ b/linux/packaging/debian/source/include-binaries
@@ -0,0 +1,4 @@
+lib/libapp.so
+lib/libflutter_linux_gtk.so
+lib/liburl_launcher_linux_plugin.so
+lib/libwindow_size_plugin.so
diff --git a/linux/packaging/rpm/make_config.yaml b/linux/packaging/rpm/make_config.yaml
index e2a31df..3316341 100644
--- a/linux/packaging/rpm/make_config.yaml
+++ b/linux/packaging/rpm/make_config.yaml
@@ -1,13 +1,15 @@
display_name: Quickgui
-group: Application/Emulator
-vendor: Quickemu Project
+summary: An elegant virtual machine manager for the desktop
+icon: assets/images/logo_pink.png
packager: Martin Wimpress
packagerEmail: code@wimpress.io
-license: MIT
-url: https://github.com/quickemu-project/quickgui
-icon: assets/images/logo_pink.png
+
+vendor: Quickemu Project
requires:
- zenity
+group: Application/Emulator
+license: MIT
+url: https://github.com/quickemu-project/quickgui
keywords:
- QEMU
@@ -18,12 +20,9 @@ keywords:
- macOS
- Windows
-summary: Desktop frontend for Quickget and Quickemu
-
categories:
- System
- Development
- - Emulator
startup_notify: true