mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-07 00:02:14 +08:00
perf: 图标安装方式变更为shell
This commit is contained in:
parent
43cea86b7a
commit
0447f18b42
38
.github/workflows/flatpak-verify.yml
vendored
38
.github/workflows/flatpak-verify.yml
vendored
@ -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 }}
|
||||
# - 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 }}
|
@ -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
|
||||
|
||||
|
17
tools/install-desktop-icon-bash
Executable file
17
tools/install-desktop-icon-bash
Executable file
@ -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"
|
@ -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);
|
Loading…
x
Reference in New Issue
Block a user