From db97c5c09c71fdca4bb03c607b359abe90e53dff Mon Sep 17 00:00:00 2001 From: rang <378694192@qq.com> Date: Sat, 25 Oct 2025 11:49:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0window=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/flutter-ci.yaml | 35 ++++++++++++++++++++++++++++++- windows/runner/main.cpp | 2 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flutter-ci.yaml b/.github/workflows/flutter-ci.yaml index c503b65..8a48626 100644 --- a/.github/workflows/flutter-ci.yaml +++ b/.github/workflows/flutter-ci.yaml @@ -158,10 +158,43 @@ jobs: dist/vaani-linux-amd64.deb dist/vaani-linux-amd64.AppImage + build_windows: + runs-on: windows-latest + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: "3.32.0" + cache: true + - name: Restore Packages + run: | + flutter pub get + + - name: Install flutter_distributor + run: dart pub global activate flutter_distributor + + - name: Build Windows + run: | + flutter_distributor package --platform windows --targets msix,zip --skip-clean + + - name: Upload Windows APP to Artifacts + uses: actions/upload-artifact@v4 + with: + name: windows + path: | + dist/*/*.msix + dist/*/*.zip + # Job 4: Create GitHub Release (NEW - runs only on tag pushes) create_release: name: Create GitHub Release - needs: [build_android, build_linux] # Depends on successful builds + needs: [build_android, build_linux, build_windows] # Depends on successful builds runs-on: ubuntu-latest permissions: contents: write # Need write access to create release diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp index 855a95b..a0d4afe 100644 --- a/windows/runner/main.cpp +++ b/windows/runner/main.cpp @@ -26,7 +26,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); // 居中 - UINT windowWidth = 832, windowHeight = 640; + UINT windowWidth = 1050, windowHeight = 700; UINT scrWidth, scrHeight, xShaft, yShaft; scrWidth = GetSystemMetrics(SM_CXFULLSCREEN); scrHeight = GetSystemMetrics(SM_CYFULLSCREEN);