From 0447f18b424a5c67397472ef10b891a5acd515af Mon Sep 17 00:00:00 2001 From: msojocs Date: Tue, 17 Jan 2023 22:42:20 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=9B=BE=E6=A0=87=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=8F=98=E6=9B=B4=E4=B8=BAshell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/flatpak-verify.yml | 38 ++++++++++++------------ changelog.md | 6 +++- tools/install-desktop-icon-bash | 17 +++++++++++ tools/install-desktop-icon-node | 43 ---------------------------- 4 files changed, 41 insertions(+), 63 deletions(-) create mode 100755 tools/install-desktop-icon-bash delete mode 100755 tools/install-desktop-icon-node diff --git a/.github/workflows/flatpak-verify.yml b/.github/workflows/flatpak-verify.yml index 76a218d..57fdfff 100644 --- a/.github/workflows/flatpak-verify.yml +++ b/.github/workflows/flatpak-verify.yml @@ -31,22 +31,22 @@ jobs: - uses: actions/checkout@v2 with: submodules: 'recursive' - - name: Prepare - run: | - yum install -y p7zip p7zip-plugins nodejs - cd compiler && npm install - cat /etc/issue - 7z - # Docker is required by the docker/setup-qemu-action which enables emulation - - name: Install deps - run: | - dnf -y install docker - - uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4 - env: - ACTION_MODE: true - with: - bundle: wechat-devtools.flatpak - manifest-path: io.github.msojocs.wechat-devtools.yml - cache-key: flatpak-builder-${{ github.sha }} - cache: false - arch: ${{ matrix.arch }} \ No newline at end of file + # - name: Prepare + # run: | + # yum install -y p7zip p7zip-plugins nodejs + # cd compiler && npm install + # cat /etc/issue + # 7z + # # Docker is required by the docker/setup-qemu-action which enables emulation + # - name: Install deps + # run: | + # dnf -y install docker + # - uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4 + # env: + # ACTION_MODE: true + # with: + # bundle: wechat-devtools.flatpak + # manifest-path: io.github.msojocs.wechat-devtools.yml + # cache-key: flatpak-builder-${{ github.sha }} + # cache: false + # arch: ${{ matrix.arch }} \ No newline at end of file diff --git a/changelog.md b/changelog.md index 2ac6d2e..d00c509 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,8 @@ -# 1.06.2209070-1 / 2022-09- +# 1.06.2209070-2 / 2023-01- + +- fix: compiler not found + +# 1.06.2209070-1 / 2022-09-09 - update: devtools to v1.06.2209070 diff --git a/tools/install-desktop-icon-bash b/tools/install-desktop-icon-bash new file mode 100755 index 0000000..b4db75d --- /dev/null +++ b/tools/install-desktop-icon-bash @@ -0,0 +1,17 @@ +#!/bin/bash + +root_dir=$(cd `dirname $0`/.. && pwd -P) + +for size in "64" "128" "256" "512"; do + echo "size: $size" + install -Dm644 "$root_dir/res/icons/${size}x${size}.png" "${HOME}/.local/share/icons/hicolor/${size}x${size}/wechat-devtools.png" +done + +# svg +svg_path="${HOME}/.local/share/icons/hicolor/scalable/wechat-devtools.svg" +install -Dm644 "$root_dir/res/icons/wechat-devtools.svg" "$svg_path" + +# desktop +template_path="$root_dir/res/template.desktop" +install -Dm644 "$template_path" "$HOME/.local/share/applications/wechat-devtools.desktop" +sed -i 's#dir#'$root_dir'#g' "$HOME/.local/share/applications/wechat-devtools.desktop" \ No newline at end of file diff --git a/tools/install-desktop-icon-node b/tools/install-desktop-icon-node deleted file mode 100755 index bf00d8c..0000000 --- a/tools/install-desktop-icon-node +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node -const path = require("path"); -const fs = require("fs"); -const os = require("os"); -const { spawn } = require("child_process"); -const { info } = require("console"); - -for (let size of ["64", "128", "256", "512"]) { - let iconPath = - os.homedir() + - `/.local/share/icons/hicolor/${size}x${size}/wechat-devtools.png`; - try { - fs.mkdirSync(path.dirname(iconPath)); - } catch (error) {} - info(`Writing icon file ${iconPath}`); - fs.copyFileSync( - path.resolve(__dirname, "../res/icons", `${size}x${size}.png`), - iconPath - ); -} - -let svgPath = - os.homedir() + "/.local/share/icons/hicolor/scalable/wechat-devtools.svg"; -try { - fs.mkdirSync(path.dirname(svgPath)); -} catch (error) {} -info(`Writing icon file ${svgPath}`); -fs.copyFileSync( - path.resolve(__dirname, "../res/icons/wechat-devtools.svg"), - svgPath -); - -let desktopCode = fs - .readFileSync(path.resolve(__dirname, "../res/template.desktop"), "utf8") - .replace(new RegExp("dir", "g"), path.resolve(__dirname, "..")); - -desktopPath = - os.homedir() + "/.local/share/applications/wechat-devtools.desktop"; -try { - fs.mkdirSync(path.dirname(desktopPath)); -} catch (error) {} -info(`Writing desktop file ${desktopPath}`); -fs.writeFileSync(desktopPath, desktopCode);