diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88851bb..b189014 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,13 +40,16 @@ jobs: - name: Publish (framework-dependent) run: dotnet publish WinLens.csproj -c Release -r ${{ matrix.rid }} --self-contained false -p:PublishSingleFile=true -o publish-fd - # Self-contained: larger (~75 MB) but runs with no runtime install. + # Self-contained: no runtime install needed. NOT single-file — WPF's native + # DLLs (PresentationNative, wpfgfx, D3DCompiler, ...) can't be embedded in a + # single-file bundle and a bare exe crashes with DllNotFoundException (badly + # on ARM64). So we publish a normal folder and ship it as a zip. - name: Publish (self-contained) - run: dotnet publish WinLens.csproj -c Release -r ${{ matrix.rid }} --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -o publish-sc + run: dotnet publish WinLens.csproj -c Release -r ${{ matrix.rid }} --self-contained true -o publish-sc - - name: Rename self-contained artifact + - name: Zip self-contained build shell: pwsh - run: Rename-Item publish-sc/WinLens.exe "WinLens-${{ matrix.rid }}-standalone.exe" + run: Compress-Archive -Path publish-sc/* -DestinationPath "WinLens-${{ matrix.rid }}-standalone.zip" - name: Upload framework-dependent artifact uses: actions/upload-artifact@v4 @@ -58,4 +61,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: WinLens-${{ matrix.rid }}-standalone - path: publish-sc/WinLens-${{ matrix.rid }}-standalone.exe + path: WinLens-${{ matrix.rid }}-standalone.zip diff --git a/README.md b/README.md index 15d0c5d..e4cb94d 100644 --- a/README.md +++ b/README.md @@ -87,10 +87,12 @@ flavours are offered: | Download | Size | Needs a runtime? | | --- | --- | --- | | `WinLens-win-x64.exe` | ~25 MB | Yes — the [.NET 10 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/10.0) | -| `WinLens-win-x64-standalone.exe` | ~75 MB | No — everything is bundled, just run it | +| `WinLens-win-x64-standalone.zip` | ~75 MB | No — the runtime is bundled | -Pick the small one if you already have (or don't mind installing) the .NET 10 Desktop Runtime; -pick the standalone one if you want a single file that runs with no install. +Pick the small `.exe` if you already have (or don't mind installing) the .NET 10 Desktop +Runtime. Pick the standalone `.zip` if you want it to run with no install — extract the folder +anywhere and run `WinLens.exe` inside (keep the files together; the `.exe` needs the DLLs +next to it). The executable isn't code-signed yet, so on first launch Windows SmartScreen may show "Windows protected your PC". Click **More info > Run anyway**. If you'd rather verify the diff --git a/README.zh-CN.md b/README.zh-CN.md index e9986fb..6b69755 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -79,9 +79,10 @@ WinLens 翻译屏幕上的文字,并将译文直接覆盖在原文之上,自 | 下载 | 大小 | 需要运行时? | | --- | --- | --- | | `WinLens-win-x64.exe` | 约 25 MB | 需要 [.NET 10 桌面运行时](https://dotnet.microsoft.com/download/dotnet/10.0) | -| `WinLens-win-x64-standalone.exe` | 约 75 MB | 不需要——已打包全部依赖,直接运行 | +| `WinLens-win-x64-standalone.zip` | 约 75 MB | 不需要——已打包运行时 | -已安装(或不介意安装).NET 10 桌面运行时就选小的;想要单文件、免安装就选 standalone 版。 +已安装(或不介意安装).NET 10 桌面运行时就选小的 `.exe`。想免安装就选 standalone 的 `.zip`: +解压到任意位置,运行里面的 `WinLens.exe` 即可(请保持文件夹内文件在一起,`.exe` 需要同目录的 DLL)。 > GitHub 在国内下载可能较慢,如有需要可后续提供 Gitee 镜像。