-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding portable build alongside with installers #302
Comments
As long as it's obvious that this would be basically some kind of unstable/dangerous option, i think this would be a cool small addition 👍 |
unstable is understandable, but why would it be dangerous? any security implications? |
couldn't think of a better word - we just need to make it obvious that the exe is not actually redistributable (or 100% "portable") |
That's fair. I was looking into the source, if I am right is this the right place to add the files into release? https://github.com/tauri-apps/tauri-action/blob/dev/packages/action/src/create-release.ts#L61 if tauri team is interested in this feature I can just go ahead and implement it. note I have no experience in github actions I am assuming it will Just Work |
The most relevant part for adding the file itself would be here iirc https://github.com/tauri-apps/tauri-action/blob/dev/packages/core/index.ts#L424 Adding the flag to include it is a little more involved, but i guess most of the stuff for |
unstable/dangerous? But the msi installer of the app is just ship the same single executable |
@liudonghua123 As i said in another comment, i just couldn't think of a better word. It's just that it must be obvious that the majority of devs don't actually want the .exe because it's not portable in a traditional sense, primarily because it will just crash if WebView2 is not installed (WV2 is only pre-installed on Windows 11, and even there you can't really count on it). |
Thanks, I see now. 😄 I remember that I run Other features like you said are not available when running a |
This is not the case unless the developer of the exe you downloaded implemented this in Rust themselves. In general Tauri apps will just panic/crash if WebView2 is not installed. |
If the webview2 is not installed on some old windows like windows 7 or 10, whether the |
The msi will install it automatically without any user interaction required. |
Need help! I tried to add some customization to my version of The detail logs are on https://github.com/liudonghua123/CyberChef-desktop/actions/runs/3243902709/jobs/5319292830. The following screenshot is from https://github.com/liudonghua123/CyberChef-desktop/releases/tag/app-v9.46.5. Now I got errors when run But it's strange because I can build successfully almost use the same commands, see also https://github.com/liudonghua123/cyberchef-app/blob/main/.github/workflows/build_and_deploy.yml.
|
Now I fixed the linux 32-bit build problems, I modified export function execCommand(
command: string,
args: string[],
{ cwd }: { cwd?: string } = {}
): Promise<void> {
console.log(`running ${command}`, args)
console.log(process.env)
return execa(command, args, {
cwd,
stdio: 'inherit',
env: { ...process.env, FORCE_COLOR: '0' },
}).then()
} - name: Patch for Linux 32-bit env
if: matrix.os == 'ubuntu-22.04' && matrix.target == 'i686-unknown-linux-gnu'
run: |
echo "PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "PKG_CONFIG_SYSROOT_DIR=/" >> $GITHUB_ENV
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:$PKG_CONFIG_PATH
export PKG_CONFIG_SYSROOT_DIR=/
ls -l $GITHUB_ENV
cat $GITHUB_ENV
ls -l /usr/lib/pkgconfig /usr/share/pkgconfig /usr/lib/i386-linux-gnu/pkgconfig /usr/lib/x86_64-linux-gnu/pkgconfig
shell: bash |
Hello ! Any update of this feature ? |
This is my current workaround, my project doesn't even use a GUI, I'm just using Tauri for the simple bundler and actions, so a portable exe would both still work on Windows 7, and I wouldn't care if it didn't on:
release:
types: [ created ]
jobs:
release:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux-x86_64
target: x86_64-unknown-linux-gnu
runner: ubuntu-latest
- name: macOS-Apple
target: aarch64-apple-darwin
runner: macos-latest
- name: macOS-Intel
target: x86_64-apple-darwin
runner: macos-latest
- name: Windows-x86_64
target: x86_64-pc-windows-msvc
runner: windows-latest
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
steps:
- name: Fetch Repository
uses: actions/checkout@v3
- name: Update and Install Dependencies (Linux)
if: ${{ matrix.runner == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev
- name: Update Rust Toolchain
run: rustup update stable
- name: Add Rust Target
run: rustup target add ${{ matrix.target }}
- name: Build Tauri Installers/Bundles/Images
uses: tauri-apps/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --target ${{ matrix.target }}
releaseId: ${{ github.event.release.id }}
tagName: ${{ github.ref_name }}
- name: Build Portable Binaries (Windows)
if: ${{ matrix.runner == 'windows-latest' }}
run: |
cargo build --target ${{ matrix.target }}
cargo build --release --target ${{ matrix.target }}
mv ./target/${{ matrix.target }}/debug/wooting-profile-switcher.exe ./target/${{ matrix.target }}/debug/WootingProfileSwitcher_${{ github.ref_name }}_x64-portable.exe
mv ./target/${{ matrix.target }}/release/wooting-profile-switcher.exe ./target/${{ matrix.target }}/release/WootingProfileSwitcher_${{ github.ref_name }}_x64-portable.exe
- name: Upload Portable Binaries (Windows)
if: ${{ matrix.runner == 'windows-latest' }}
run: bash -c 'gh release upload ${{ github.ref_name }} ./target/${{ matrix.target }}/{debug/WootingProfileSwitcher_${{ github.ref_name }}_x64-portable.exe,release/WootingProfileSwitcher_${{ github.ref_name }}_x64-portable.exe} --clobber' You may have to do some tweaking |
I'm interested in contributing to embedding the portable build for windows x86_64 inside tauri-action |
When tauri builds an app, it also generates a portable build executable that you can just double click open (src-tauri/release/appname).
It would be easier if tauri actions can release these builds as well so that devs can test the application before installing.
it's fine if they don't check if webview is installed/available or even autoupdater doesn't work, as these will be mostly quick testing purpose.
The text was updated successfully, but these errors were encountered: