diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2f778d62..aa7065368 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -288,9 +288,13 @@ jobs: shell: bash run: | cargo make dist-to-installer - INSTALLER_ARCHIVE=$(find installers/Windows -maxdepth 1 -iname "*.exe") + if [ "$RUNNER_OS" == "Linux" ]; then + INSTALLER_ARCHIVE=$(find installers/Linux -maxdepth 1 -iname "*.deb") + elif [ "$RUNNER_OS" == "Windows" ]; then + INSTALLER_ARCHIVE=$(find installers/Windows -maxdepth 1 -iname "*.exe") + fi echo "INSTALLER_ARCHIVE=$INSTALLER_ARCHIVE" >>$GITHUB_ENV - if: matrix.os == 'windows-2019' && github.event_name == 'push' && contains(github.ref, 'refs/tags') + if: matrix.os != 'macos-10.15' && github.event_name == 'push' && contains(github.ref, 'refs/tags') - name: Pull Git LFS objects run: git lfs pull @@ -326,7 +330,7 @@ jobs: name: ${{ runner.os }}-installer path: | ${{ env.INSTALLER_ARCHIVE }} - if: matrix.os == 'windows-2019' && github.event_name == 'push' && contains(github.ref, 'refs/tags') + if: matrix.os != 'macos-10.15' && github.event_name == 'push' && contains(github.ref, 'refs/tags') - uses: actions/upload-artifact@v2 with: name: ${{ runner.os }}-artifacts-debug diff --git a/.gitignore b/.gitignore index e19ee8081..b4bc20783 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ console_backend/tests/fileout.json get-pip.py .*.sw? installers/Windows/*.exe +installers/Linux/*.deb installers/Windows/NSIS/ diff --git a/Makefile.toml b/Makefile.toml index 518fef835..d6b14cdb7 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -550,6 +550,27 @@ run_task = [{ name = ["build-dist", "purge-dist", "compress-dist"] }] [tasks.dist-to-installer] +[tasks.dist-to-installer.linux] +env = { TMP_DIR = "target/installer", OPT_DIR = "opt", USR_DIR = "usr", APP_DIR_NAME = "swift-navigation-console", APPS_DIR = "share/applications", ICONS_DIR = "share/icons/hicolor" } +script_runner = "@shell" +script = ''' + +if [ -d $TMP_DIR ]; then + rm -rf $TMP_DIR +fi + +mkdir -p $TMP_DIR/$OPT_DIR +cp -r py39-dist/ $TMP_DIR/$OPT_DIR/$APP_DIR_NAME/ + +mkdir -p $TMP_DIR/$USR_DIR/$APPS_DIR +cp installers/Linux/$APP_DIR_NAME.desktop $TMP_DIR/$USR_DIR/$APPS_DIR/ +mkdir -p $TMP_DIR/$USR_DIR/$ICONS_DIR +cp -r installers/Linux/hicolor/* $TMP_DIR/$USR_DIR/$ICONS_DIR + +fpm -t deb -s dir --depends libxcb-xinerama0 -v $(cat console_backend/src/version.txt) --debug --verbose -C $TMP_DIR -f -n $APP_DIR_NAME $OPT_DIR $USR_DIR +mv *.deb installers/Linux/ +''' + [tasks.install-nsis-plugin] script_runner = "@duckscript" script = ''' diff --git a/installers/Linux/hicolor/128x128/apps/swift-navigation-console.png b/installers/Linux/hicolor/128x128/apps/swift-navigation-console.png new file mode 100644 index 000000000..abf8d463c Binary files /dev/null and b/installers/Linux/hicolor/128x128/apps/swift-navigation-console.png differ diff --git a/installers/Linux/hicolor/16x16/apps/swift-navigation-console.png b/installers/Linux/hicolor/16x16/apps/swift-navigation-console.png new file mode 100644 index 000000000..d120a47b7 Binary files /dev/null and b/installers/Linux/hicolor/16x16/apps/swift-navigation-console.png differ diff --git a/installers/Linux/hicolor/24x24/apps/swift-navigation-console.png b/installers/Linux/hicolor/24x24/apps/swift-navigation-console.png new file mode 100644 index 000000000..ee4a6e39a Binary files /dev/null and b/installers/Linux/hicolor/24x24/apps/swift-navigation-console.png differ diff --git a/installers/Linux/hicolor/32x32/apps/swift-navigation-console.png b/installers/Linux/hicolor/32x32/apps/swift-navigation-console.png new file mode 100644 index 000000000..b4854b19a Binary files /dev/null and b/installers/Linux/hicolor/32x32/apps/swift-navigation-console.png differ diff --git a/installers/Linux/hicolor/48x48/apps/swift-navigation-console.png b/installers/Linux/hicolor/48x48/apps/swift-navigation-console.png new file mode 100644 index 000000000..f8a84247d Binary files /dev/null and b/installers/Linux/hicolor/48x48/apps/swift-navigation-console.png differ diff --git a/installers/Linux/hicolor/64x64/apps/swift-navigation-console.png b/installers/Linux/hicolor/64x64/apps/swift-navigation-console.png new file mode 100644 index 000000000..15169e5bd Binary files /dev/null and b/installers/Linux/hicolor/64x64/apps/swift-navigation-console.png differ diff --git a/installers/Linux/swift-navigation-console.desktop b/installers/Linux/swift-navigation-console.desktop new file mode 100644 index 000000000..136eba0b2 --- /dev/null +++ b/installers/Linux/swift-navigation-console.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Swift Navigation Console +Type=Application +Exec=/opt/swift-navigation-console/console +Terminal=false +NoDisplay=false +Categories=Science +Version=1.2 +Icon=swift-navigation-console