mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Compare commits
6 Commits
qt6-cmake
...
snap/lates
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f1567ec97 | ||
|
|
e152717a05 | ||
|
|
0f645e9b76 | ||
|
|
821e681520 | ||
|
|
d27bc35022 | ||
|
|
61d3adad9b |
20
.github/workflows/publish-candidate-snap.yml
vendored
Normal file
20
.github/workflows/publish-candidate-snap.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: Publish Candidate Snap
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "snap/latest/candidate"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish_amd64:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: snapcore/action-build@v1
|
||||||
|
id: build
|
||||||
|
- uses: snapcore/action-publish@v1
|
||||||
|
with:
|
||||||
|
store_login: ${{ secrets.STORE_LOGIN }}
|
||||||
|
snap: ${{ steps.build.outputs.snap }}
|
||||||
|
release: candidate
|
||||||
@@ -1,15 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# a KDE session forces the KDE Plasma platformtheme which is incompatible with QET
|
|
||||||
# unset the ENV vars in that case to prevent loading of the theme
|
|
||||||
if [ ! -z "$KDE_FULL_SESSION" ]; then
|
|
||||||
unset KDE_FULL_SESSION
|
|
||||||
fi
|
|
||||||
|
|
||||||
if echo "$XDG_CURRENT_DESKTOP" | grep -q KDE; then
|
|
||||||
unset XDG_CURRENT_DESKTOP
|
|
||||||
fi
|
|
||||||
|
|
||||||
# migrate .qet directory from SNAP_USER_DATA to SNAP_USER_COMMON
|
# migrate .qet directory from SNAP_USER_DATA to SNAP_USER_COMMON
|
||||||
from="$SNAP_USER_DATA/.qet"
|
from="$SNAP_USER_DATA/.qet"
|
||||||
to="$SNAP_USER_COMMON/.qet"
|
to="$SNAP_USER_COMMON/.qet"
|
||||||
@@ -23,12 +13,4 @@ fi
|
|||||||
mkdir -p "$HOME/.qet"
|
mkdir -p "$HOME/.qet"
|
||||||
ln -snf "$SNAP/bin/DXFtoQET" "$HOME/.qet/DXFtoQET"
|
ln -snf "$SNAP/bin/DXFtoQET" "$HOME/.qet/DXFtoQET"
|
||||||
|
|
||||||
# start desktop portal. Open & save dialogs might fail if it is not running
|
|
||||||
dbus-send --print-reply \
|
|
||||||
--dest=org.freedesktop.DBus \
|
|
||||||
/org/freedesktop/DBus \
|
|
||||||
org.freedesktop.DBus.StartServiceByName \
|
|
||||||
string:org.freedesktop.portal.Desktop \
|
|
||||||
uint32:0
|
|
||||||
|
|
||||||
exec "${@}"
|
exec "${@}"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: qelectrotech
|
name: qelectrotech
|
||||||
title: QElectroTech
|
title: QElectroTech
|
||||||
base: core18
|
base: core20
|
||||||
adopt-info: qelectrotech
|
version: "0.8.0"
|
||||||
license: GPL-2.0
|
license: GPL-2.0
|
||||||
summary: Electrical diagram editor
|
summary: Electrical diagram editor
|
||||||
description: |
|
description: |
|
||||||
@@ -10,10 +10,7 @@ description: |
|
|||||||
|
|
||||||
grade: stable
|
grade: stable
|
||||||
confinement: strict
|
confinement: strict
|
||||||
|
compression: lzo
|
||||||
architectures:
|
|
||||||
- build-on: amd64
|
|
||||||
run-on: amd64
|
|
||||||
|
|
||||||
layout:
|
layout:
|
||||||
/usr/local/share/qelectrotech:
|
/usr/local/share/qelectrotech:
|
||||||
@@ -30,15 +27,14 @@ apps:
|
|||||||
extensions: [kde-neon]
|
extensions: [kde-neon]
|
||||||
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control]
|
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control]
|
||||||
environment: &env
|
environment: &env
|
||||||
__EGL_VENDOR_LIBRARY_DIRS: $SNAP/kf5/usr/share/glvnd/egl_vendor.d:$SNAP/usr/share/glvnd/egl_vendor.d
|
|
||||||
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
|
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
|
||||||
QT_QPA_PLATFORMTHEME: gtk3
|
|
||||||
QT_AUTO_SCREEN_SCALE_FACTOR: 1
|
|
||||||
HOME: $SNAP_USER_COMMON
|
HOME: $SNAP_USER_COMMON
|
||||||
PYTHONPATH: $SNAP:$SNAP/lib/python3.6/site-packages:$SNAP/usr/lib/python3.6:$SNAP/usr/lib/python3.6/lib-dynload
|
PYTHONPATH: $SNAP:$SNAP/lib/python3.8/site-packages:$SNAP/usr/lib/python3.8:$SNAP/usr/lib/python3.8/lib-dynload
|
||||||
|
|
||||||
qet-tb-generator:
|
qet-tb-generator:
|
||||||
command: bin/qelectrotech-launch $SNAP/bin/qet_tb_generator
|
command: bin/qet_tb_generator
|
||||||
|
command-chain:
|
||||||
|
- bin/qelectrotech-launch
|
||||||
extensions: [kde-neon]
|
extensions: [kde-neon]
|
||||||
plugs: *plugs
|
plugs: *plugs
|
||||||
environment: *env
|
environment: *env
|
||||||
@@ -58,8 +54,8 @@ parts:
|
|||||||
|
|
||||||
qet-tb-generator:
|
qet-tb-generator:
|
||||||
plugin: python
|
plugin: python
|
||||||
python-version: python3
|
source: https://github.com/raulroda/qet_tb_generator-plugin.git
|
||||||
source: https://github.com/qelectrotech/qet_tb_generator.git
|
python-packages: [PySimpleGUI]
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- python3-lxml
|
- python3-lxml
|
||||||
- python3-tk
|
- python3-tk
|
||||||
@@ -68,15 +64,15 @@ parts:
|
|||||||
kde-sdk-setup:
|
kde-sdk-setup:
|
||||||
plugin: nil
|
plugin: nil
|
||||||
build-snaps:
|
build-snaps:
|
||||||
- kde-frameworks-5-core18-sdk
|
- kde-frameworks-5-qt-5-15-3-core20-sdk
|
||||||
build-packages:
|
build-packages:
|
||||||
- g++
|
- g++
|
||||||
- mesa-common-dev
|
- mesa-common-dev
|
||||||
- libglvnd-dev
|
- libglvnd-dev
|
||||||
- rsync
|
- rsync
|
||||||
override-build: |
|
override-build: |
|
||||||
rsync -a --ignore-existing /snap/kde-frameworks-5-core18-sdk/current/ /
|
rsync -a --ignore-existing /snap/kde-frameworks-5-qt-5-15-3-core20-sdk/current/ /
|
||||||
|
|
||||||
dxf-to-qet:
|
dxf-to-qet:
|
||||||
after: [kde-sdk-setup]
|
after: [kde-sdk-setup]
|
||||||
plugin: nil
|
plugin: nil
|
||||||
@@ -91,19 +87,15 @@ parts:
|
|||||||
after: [kde-sdk-setup]
|
after: [kde-sdk-setup]
|
||||||
plugin: nil
|
plugin: nil
|
||||||
source: .
|
source: .
|
||||||
stage-packages: [ git, sqlite3 ]
|
stage-packages: [ git, sqlite3, xdg-user-dirs ]
|
||||||
build-packages:
|
build-packages:
|
||||||
- git
|
- git
|
||||||
- libsqlite3-dev
|
- libsqlite3-dev
|
||||||
override-pull: |
|
|
||||||
snapcraftctl pull
|
|
||||||
snap_version=$(git describe --dirty)
|
|
||||||
modified_displayed_version=$snap_version".snap"
|
|
||||||
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
|
|
||||||
snapcraftctl set-version "$snap_version"
|
|
||||||
override-build: |
|
override-build: |
|
||||||
|
modified_displayed_version="${SNAPCRAFT_PROJECT_VERSION}.snap"
|
||||||
|
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
|
||||||
qmake "$SNAPCRAFT_PART_SRC/qelectrotech.pro"
|
qmake "$SNAPCRAFT_PART_SRC/qelectrotech.pro"
|
||||||
make -j$(nproc)
|
make -j${SNAPCRAFT_PARALLEL_BUILD_COUNT}
|
||||||
make install INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL"
|
make install INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL"
|
||||||
override-stage: |
|
override-stage: |
|
||||||
snapcraftctl stage
|
snapcraftctl stage
|
||||||
@@ -114,11 +106,14 @@ parts:
|
|||||||
cleanup:
|
cleanup:
|
||||||
after: [qelectrotech, dxf-to-qet, qet-tb-generator]
|
after: [qelectrotech, dxf-to-qet, qet-tb-generator]
|
||||||
plugin: nil
|
plugin: nil
|
||||||
build-snaps: [core18, kde-frameworks-5-core18]
|
build-snaps: [kde-frameworks-5-qt-5-15-3-core20]
|
||||||
override-prime: |
|
override-prime: |
|
||||||
# Remove all files from snap that are already included in the base snap or in
|
|
||||||
# any connected content snaps
|
|
||||||
set -eux
|
set -eux
|
||||||
for snap in "core18" "kde-frameworks-5-core18"; do # List all content-snaps and base snaps you're using here
|
for snap in "kde-frameworks-5-qt-5-15-3-core20"; do # List all content-snaps you're using here
|
||||||
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
|
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" "$SNAPCRAFT_PRIME/usr/{}" \;
|
||||||
done
|
done
|
||||||
|
for cruft in bug lintian man; do
|
||||||
|
rm -rf $SNAPCRAFT_PRIME/usr/share/$cruft
|
||||||
|
done
|
||||||
|
find $SNAPCRAFT_PRIME/usr/share/doc/ -type f -not -name 'copyright' -delete
|
||||||
|
find $SNAPCRAFT_PRIME/usr/share -type d -empty -delete
|
||||||
|
|||||||
@@ -339,8 +339,11 @@ QString ProjectView::askUserForFilePath(bool assign) {
|
|||||||
// if no filepath is provided, return an empty string
|
// if no filepath is provided, return an empty string
|
||||||
if (filepath.isEmpty()) return(filepath);
|
if (filepath.isEmpty()) return(filepath);
|
||||||
|
|
||||||
// // if the name does not end with the .qet extension, append it
|
// if the name does not end with the .qet extension and we're _not_ using xdg-desktop-portal, append it
|
||||||
// if (!filepath.endsWith(".qet", Qt::CaseInsensitive)) filepath += ".qet";
|
bool usesPortal =
|
||||||
|
qEnvironmentVariableIsSet("FLATPAK_ID") ||
|
||||||
|
qEnvironmentVariableIsSet("SNAP_NAME");
|
||||||
|
if (!filepath.endsWith(".qet", Qt::CaseInsensitive) && !usesPortal) filepath += ".qet";
|
||||||
|
|
||||||
if (assign) {
|
if (assign) {
|
||||||
// assign the provided filepath to the currently edited project
|
// assign the provided filepath to the currently edited project
|
||||||
|
|||||||
Reference in New Issue
Block a user