From e32a7f1537b484fc639b46a89b2be4d210fc9ab7 Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Wed, 16 Oct 2024 21:55:42 +0800 Subject: [PATCH] change windows product name --- .github/workflows/build.yml | 3 +-- aur/mihomo-party-electron/PKGBUILD | 1 + aur/mihomo-party-git/PKGBUILD | 1 + aur/mihomo-party/PKGBUILD | 1 + electron-builder.yml | 3 +-- src/main/utils/dirs.ts | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1c1ee21..835bb3bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -142,6 +142,7 @@ jobs: run: | pnpm install pnpm add @mihomo-party/sysproxy-linux-${{ matrix.arch }}-gnu + sed -i "s/productName: Mihomo Party/productName: mihomo-party/" electron-builder.yml pnpm prepare --${{ matrix.arch }} - name: Build env: @@ -197,7 +198,6 @@ jobs: npm_config_arch: ${{ matrix.arch }} npm_config_target_arch: ${{ matrix.arch }} run: | - sed -i "" -e "s/productName: mihomo-party/productName: Mihomo Party/" electron-builder.yml chmod +x build/pkg-scripts/postinstall pnpm build:mac --${{ matrix.arch }} - name: Generate checksums @@ -248,7 +248,6 @@ jobs: npm_config_arch: ${{ matrix.arch }} npm_config_target_arch: ${{ matrix.arch }} run: | - sed -i "" -e "s/productName: mihomo-party/productName: Mihomo Party/" electron-builder.yml sed -i "" -e "s/macos/catalina/" electron-builder.yml chmod +x build/pkg-scripts/postinstall pnpm build:mac --${{ matrix.arch }} diff --git a/aur/mihomo-party-electron/PKGBUILD b/aur/mihomo-party-electron/PKGBUILD index 408f3269..7d26b998 100644 --- a/aur/mihomo-party-electron/PKGBUILD +++ b/aur/mihomo-party-electron/PKGBUILD @@ -24,6 +24,7 @@ options=('!lto') prepare(){ cd $srcdir/${_pkgname}-${pkgver} + sed -i "s/productName: Mihomo Party/productName: mihomo-party/" electron-builder.yml pnpm install } diff --git a/aur/mihomo-party-git/PKGBUILD b/aur/mihomo-party-git/PKGBUILD index 30fc5231..f8162eb0 100644 --- a/aur/mihomo-party-git/PKGBUILD +++ b/aur/mihomo-party-git/PKGBUILD @@ -25,6 +25,7 @@ pkgver() { prepare(){ cd $srcdir/${_pkgname} + sed -i "s/productName: Mihomo Party/productName: mihomo-party/" electron-builder.yml pnpm install } diff --git a/aur/mihomo-party/PKGBUILD b/aur/mihomo-party/PKGBUILD index fb361054..15b5e37e 100644 --- a/aur/mihomo-party/PKGBUILD +++ b/aur/mihomo-party/PKGBUILD @@ -20,6 +20,7 @@ options=('!lto') prepare(){ cd $srcdir/${pkgname}-${pkgver} + sed -i "s/productName: Mihomo Party/productName: mihomo-party/" electron-builder.yml pnpm install } diff --git a/electron-builder.yml b/electron-builder.yml index 7429815b..202f22b7 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -1,5 +1,5 @@ appId: party.mihomo.app -productName: mihomo-party +productName: Mihomo Party directories: buildResources: build files: @@ -30,7 +30,6 @@ win: artifactName: ${name}-windows-${version}-${arch}-portable.${ext} nsis: artifactName: ${name}-windows-${version}-${arch}-setup.${ext} - shortcutName: Mihomo Party uninstallDisplayName: ${productName} allowToChangeInstallationDirectory: true oneClick: false diff --git a/src/main/utils/dirs.ts b/src/main/utils/dirs.ts index 0907a60e..87df764b 100644 --- a/src/main/utils/dirs.ts +++ b/src/main/utils/dirs.ts @@ -13,7 +13,7 @@ export function dataDir(): string { if (isPortable()) { return path.join(exeDir(), 'data') } else { - return path.join(app.getPath('appData'), 'mihomo-party') + return app.getPath('userData') } }