Skip to content

Commit

Permalink
windows preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjj1024 committed Dec 30, 2024
2 parents 96d35e1 + 9403285 commit c880fe1
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 67 deletions.
File renamed without changes.
50 changes: 30 additions & 20 deletions .github/workflows/auto.yml → .github/back/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: 'publish'

name: Release
on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:
inputs:
branch:
description: 'Branch to run the workflow on'
required: true
default: 'template'

jobs:
publish-tauri:
Expand All @@ -19,14 +24,9 @@ jobs:
- platform: 'macos-latest' # for Intel based macs.
target: 'x86_64-apple-darwin'
args: '--target x86_64-apple-darwin'

- platform: 'ubuntu-20.04'
target: 'x86_64-unknown-linux-gnu'
args: ''
- platform: 'ubuntu-20.04'
target: 'aarch64-unknown-linux-gnu'
args: ''

- platform: 'windows-latest'
target: 'x86_64-pc-windows-msvc'
- platform: 'windows-latest'
Expand All @@ -36,13 +36,20 @@ jobs:
args: '--target aarch64-pc-windows-msvc'

runs-on: ${{ matrix.platform }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v3

- name: Install rust target
run: rustup target add ${{ matrix.target }}

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Setup node
uses: actions/setup-node@v4
with:
Expand All @@ -52,33 +59,36 @@ jobs:
with:
version: latest

# 获取 pnpm 缓存
- name: Sync node version and setup cache
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: install frontend dependencies
run: pnpm install # change this to npm, pnpm or bun depending on which one you use.
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: pnpm install # change this to npm or pnpm depending on which one you use.

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: PakePlus-v__VERSION__
tagName: ${{ github.ref_name }}
releaseName: 'PakePlus v__VERSION__'
body_path: ./Note.md
releaseDraft: true
releaseDraft: false
prerelease: false
publish: true
args: ${{ matrix.args }}
50 changes: 20 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: Release
name: 'publish'

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
branch:
description: 'Branch to run the workflow on'
required: true
default: 'template'
branches:
- main

jobs:
publish-tauri:
Expand All @@ -24,9 +19,14 @@ jobs:
- platform: 'macos-latest' # for Intel based macs.
target: 'x86_64-apple-darwin'
args: '--target x86_64-apple-darwin'

- platform: 'ubuntu-20.04'
target: 'x86_64-unknown-linux-gnu'
args: ''
- platform: 'ubuntu-20.04'
target: 'aarch64-unknown-linux-gnu'
args: ''

- platform: 'windows-latest'
target: 'x86_64-pc-windows-msvc'
- platform: 'windows-latest'
Expand All @@ -36,20 +36,13 @@ jobs:
args: '--target aarch64-pc-windows-msvc'

runs-on: ${{ matrix.platform }}
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install rust target
run: rustup target add ${{ matrix.target }}

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Setup node
uses: actions/setup-node@v4
with:
Expand All @@ -59,36 +52,33 @@ jobs:
with:
version: latest

# 获取 pnpm 缓存
- name: Sync node version and setup cache
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: pnpm install # change this to npm or pnpm depending on which one you use.
run: pnpm install # change this to npm, pnpm or bun depending on which one you use.

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
tagName: PakePlus-v__VERSION__
releaseName: 'PakePlus v__VERSION__'
body_path: ./Note.md
releaseDraft: false
releaseDraft: true
prerelease: false
publish: true
args: ${{ matrix.args }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pakeplus",
"private": true,
"version": "0.4.2",
"version": "0.4.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
"title": "PakePlus",
"width": 800,
"height": 600,
"center": true
"center": true,
"additionalBrowserArgs": "--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection"
}
],
"security": {
Expand Down
14 changes: 0 additions & 14 deletions src/components/TauriConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,20 +233,6 @@
/>
</el-form-item>
</el-form>
<!-- <el-form-item
label="additionalBrowserArgs"
prop="additionalBrowserArgs"
class="formItem"
>
<el-input
v-model="tauriConfig.windows.additionalBrowserArgs"
autocomplete="off"
autoCapitalize="off"
autoCorrect="off"
spellCheck="false"
placeholder="additionalBrowserArgs"
/>
</el-form-item> -->
</div>
</el-collapse-item>
<el-collapse-item title="cli" name="2" disabled>
Expand Down
1 change: 0 additions & 1 deletion src/pages/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ const tauriConfig = reactive({
hiddenTitle: false,
acceptFirstMouse: false,
tabbingIdentifier: '',
// additionalBrowserArgs: '',
},
})
Expand Down

0 comments on commit c880fe1

Please sign in to comment.