From d79ec9ffc53008d939518469a950646b8c82ce62 Mon Sep 17 00:00:00 2001 From: WSH032 <614337162@qq.com> Date: Sat, 13 Sep 2025 04:21:26 +0800 Subject: [PATCH 1/2] fix: fix Linux and macOS build scripts --- copier.yaml | 2 +- .../{{ project_name }}/scripts/linux/build.sh.jinja | 3 ++- .../{{ project_name }}/scripts/macos/build.sh.jinja | 2 +- .../{{ project_name }}/src-tauri/tauri.bundle.json | 9 ++++++++- .../{{ project_name }}/src-tauri/tauri.conf.json.jinja | 3 +-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/copier.yaml b/copier.yaml index 896d144..9f05df6 100644 --- a/copier.yaml +++ b/copier.yaml @@ -13,7 +13,7 @@ package_name: identifier: type: str help: Identifier - default: "com.{{ project_name }}.app" + default: "com.username.{{ project_name }}" template: type: str diff --git a/templates/{{ '.' }}/{{ project_name }}/scripts/linux/build.sh.jinja b/templates/{{ '.' }}/{{ project_name }}/scripts/linux/build.sh.jinja index 9562feb..666e399 100644 --- a/templates/{{ '.' }}/{{ project_name }}/scripts/linux/build.sh.jinja +++ b/templates/{{ '.' }}/{{ project_name }}/scripts/linux/build.sh.jinja @@ -5,12 +5,13 @@ set -e cd "$(dirname "$0")/../.." PROJECT_NAME="{{ project_name }}" +PYLIB_DIR="$(realpath src-tauri/pyembed/python/lib)" export PYTAURI_STANDALONE="1" export PYO3_PYTHON="$(realpath src-tauri/pyembed/python/bin/python3)" export RUSTFLAGS=" \ -C link-arg=-Wl,-rpath,\$ORIGIN/../lib/$PROJECT_NAME/lib \ - -L \"$PYO3_PYTHON\"" + -L $PYLIB_DIR" uv pip install \ --exact \ diff --git a/templates/{{ '.' }}/{{ project_name }}/scripts/macos/build.sh.jinja b/templates/{{ '.' }}/{{ project_name }}/scripts/macos/build.sh.jinja index c75d698..47b9970 100644 --- a/templates/{{ '.' }}/{{ project_name }}/scripts/macos/build.sh.jinja +++ b/templates/{{ '.' }}/{{ project_name }}/scripts/macos/build.sh.jinja @@ -11,7 +11,7 @@ export PYTAURI_STANDALONE="1" export PYO3_PYTHON="$(realpath src-tauri/pyembed/python/bin/python3)" export RUSTFLAGS=" \ -C link-arg=-Wl,-rpath,@executable_path/../Resources/lib \ - -L \"$PYLIB_DIR\"" + -L $PYLIB_DIR" uv pip install \ --exact \ diff --git a/templates/{{ '.' }}/{{ project_name }}/src-tauri/tauri.bundle.json b/templates/{{ '.' }}/{{ project_name }}/src-tauri/tauri.bundle.json index 532c964..7911059 100644 --- a/templates/{{ '.' }}/{{ project_name }}/src-tauri/tauri.bundle.json +++ b/templates/{{ '.' }}/{{ project_name }}/src-tauri/tauri.bundle.json @@ -1,7 +1,14 @@ { "bundle": { "active": true, - "targets": "all", + "targets": [ + "deb", + "rpm", + "msi", + "nsis", + "app", + "dmg" + ], "resources": { "pyembed/python": "./" } diff --git a/templates/{{ '.' }}/{{ project_name }}/src-tauri/tauri.conf.json.jinja b/templates/{{ '.' }}/{{ project_name }}/src-tauri/tauri.conf.json.jinja index 0cfd296..df73dfe 100644 --- a/templates/{{ '.' }}/{{ project_name }}/src-tauri/tauri.conf.json.jinja +++ b/templates/{{ '.' }}/{{ project_name }}/src-tauri/tauri.conf.json.jinja @@ -23,8 +23,7 @@ } }, "bundle": { - "active": true, - "targets": "all", + "active": false, "icon": [ "icons/32x32.png", "icons/128x128.png", From 547037b6b79de8133a52862f80ba4eaa60a2f3ad Mon Sep 17 00:00:00 2001 From: WSH032 <614337162@qq.com> Date: Sat, 13 Sep 2025 04:35:35 +0800 Subject: [PATCH 2/2] docs: changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 240778a..aaae43b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- [#20](https://github.com/pytauri/create-pytauri-app/pull/20) - fix: fix Linux and macOS build scripts. + + - Pass the `libpython` path correctly on Linux and macOS as `-L` arguments to `RUSTFLAGS`. + - Temporarily disable `appimage` bundle target + + Currently unable to build `appimage`, see . + + - Change the default `identifier` to `com.username.{{ project_name }}` + + Tauri no longer recommends identifiers ending with `.app`, see . + ### Security - [#19](https://github.com/pytauri/create-pytauri-app/pull/19) - chore(deps-dev): bump vite from 6.3.5 to 6.3.6 in the npm_and_yarn group across 1 directory.