Commit Graph

15 Commits

Author SHA1 Message Date
sftse
3a4e165b6f
Less statics fixup (#14833)
* fix(tauri-cli): be more conservative to preserve behavior (#14804)

* refactor(tauri-cli): move app path initialization into commands
2026-01-27 16:33:11 +08:00
sftse
7f7d9aac21
Less statics (#14668)
* refactor(tauri-cli): introduce replacement functions

* refactor(tauri-cli): apply replacement to remove.rs

* refactor(tauri-cli): apply replacement to icon.rs

* refactor(tauri-cli): apply replacement to bundle.rs

* refactor(tauri-cli): apply replacement to build.rs

* refactor(tauri-cli): apply replacement to add.rs

* refactor(tauri-cli): apply replacement to dev.rs

* refactor(tauri-cli): less controlflow

* refactor(tauri-cli): split config loading from locking static

* refactor(tauri-cli): remove duplicate checks covered by if let Some(tauri_dir) = tauri_dir

tauri_dir.is_some() must be true, otherwise the entire block is not run, so the frontend_dir check
is irrelevant

* fmt

* refactor(tauri-cli): apply replacement to inspect.rs

* refactor(tauri-cli): dont use statics for config

* refactor(tauri-cli): finish threading directory paths through functions

* fix: clippy

* fixup CI

* refactor(tauri-cli): dont need mutex

* refactor(tauri-cli): rescope mutex use to minimal necessary

* fix CI, reduce mutex use

* fixup PR #14607

* fix: clippy

* refactor(tauri-cli): remove ConfigHandle

* refactor(tauri-cli): remove more unwraps and panicing functions

* refactor(tauri-cli): less mutexes

* refactor(tauri-cli): undo mistaken change, address review comment

* Split android build to 2 functions

* Pass in dirs to migration v1 like the v2 beta

* Add change file

---------

Co-authored-by: Tony <legendmastertony@gmail.com>
2026-01-17 23:52:42 +08:00
sftse
a2abe2e6bc
refactor(cli): simplify features: Option<Vec<String>> to Vec<String> (#14607)
* refactor: use empty vector for features instead of None

* refactor: reorder

* add change file

* comment: highlight places where serialization is used

* refactor: simplify serialization

* Update .changes/empty-vec-instead-of-none.md

* Update crates/tauri-cli/src/mobile/ios/mod.rs

---------

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
2025-12-29 13:54:51 +08:00
DomanskiFilip
19fb6f7cb0
fix(cli): improve Android BuildTask.kt Windows executable detection for nvm4w Fixes #13892 (#14146)
* fix(cli): improve Android BuildTask.kt Windows executable detection

- Fix Android build error on Windows when using nvm4w
- Add robust fallback logic for Windows executable detection
- Prevent 'node.exe.cmd' and 'Cannot find module' errors
- Graceful fallback to cargo when Node.js detection fails

Fixes #13892

* strip extension from project, try exe/cmd/bat

* revert args

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-10-07 15:25:49 -03:00
Lucas Fernandes Nogueira
abf7e8850b
fix(cli): mobile init when using pnpm dlx (#14118)
i noticed this when testing #13180 (though the original issue refers to npx, which I could not reproduce yet)
2025-10-06 13:12:00 -03:00
Lucas Fernandes Nogueira
b06b3bd091
refactor(cli): improve errors (#14126)
* refactor(cli): improve errors

* update change files

* license

* add errorext with fs_context helper

* update linux

* lint

* fmt

* windows

* revert bundler breaking change

* fix ios mod

* ref

* reduce amount of enum variants

* fix macos build

* Fix windows build

* Clippy

* capitalize cargo [skip ci]

---------

Co-authored-by: Tony <legendmastertony@gmail.com>
2025-10-02 06:58:26 -03:00
Lucas Fernandes Nogueira
673867aa0e
feat(cli): detect Android env and install SDK and NDK if needed (#14094)
* feat(cli): detect Android env and install SDK and NDK if needed

changes the Android setup to be a bit more automated - looking up ANDROID_HOME and NDK_HOME from common system paths and installing the Android SDK and NDK if needed using the command line tools

* fix windows

* clippy

* lint

* add prmopts and ci check

* also check ANDROID_SDK_ROOT
2025-10-01 09:33:14 -03:00
Fabian-Lars
6b2b9d6cbf
chore: clippy 1.88 (#13720) 2025-06-27 15:33:36 +02:00
Lucas Fernandes Nogueira
d1ce9af628
feat(cli): add --config arg to the mobile init cmds, closes #13284 (#13660) 2025-06-23 12:55:07 -03:00
Matthew Richardson
0aa48fb9e4
feat: Support custom CFBundleVersion for iOS and macOS (#13030)
* feat: Add bundleVersion for iOS and macOS

* feat: Use bundleVersion for CFBundleVersion

* feat: Synchronize bundleVersion with Info.plist

* cleanup

* fix bundle version, enhance prerelease/buildnumber support and checks

* fix change file

* tauri-bundler to change file

* expand doc

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-04-12 09:28:48 -03:00
Lucas Fernandes Nogueira
d91bfa5cb9
feat(cli): allow merging multiple configuration values (#12970)
* feat(cli): allow merging multiple configuration values

Currently the dev/build/bundle commands can only merge a single Tauri configuration value (file or raw JSON string), which imposes a limitation in scenarios where you need more flexibility (like multiple app flavors and environments). This changes the config CLI option to allow multiple values, letting you merge multiple Tauri config files with the main one.

* fix ios build
2025-03-14 12:04:58 -03:00
Amr Bashir
8c6d1e8e6c
fix(runtime-wry): run cursor_position getter on main thread (#11401)
* fix(runtime-wry): run `cursor_position` getter on main thread

closes #10340

* clippy

* clippy

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-22 09:59:21 -03:00
Lucas Fernandes Nogueira
f0da0bde87
feat(core): add WebviewWindow::resolve_command_scope (#11439)
* feat(core): add WebviewWindow::resolve_command_scope

This new functionality exposes the `CommandScope` resolution as a function (currently only commands can resolve them as a dependency injection via CommandItem)

This function is useful to validate the configuration at runtime (do some asserts at setup phase to ensure capabilities are properly configured) and to resolve scopes in a separate thread or context

* adjust return type
2024-10-21 15:16:08 -03:00
Amr Bashir
b3563e3d6a
feat(cli): add deno support (#11304)
* feat(cli): add deno support

ref: https://github.com/denoland/deno/issues/20738

* Update packages_nodejs.rs

* typo

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-11 16:48:22 -03:00
Amr Bashir
36eee37220
Restructure the repository (#10796)
* Restructure the repository

* lock file

* fmt

* fix bench

* fix cli template test

* remove accidental file

* fix mv command

* clippy

* upgrade paths-filter github action

* fix cli migration tests

* lockfile

* license headers

* clippy

* scope test-core to tauri crate

* license header

* correct --manifest-path usage

* lockfile

* fix tauri-driver on macOS [skip ci]

* build target ios

* try downgrade env_logger

* downgrade 0.1.7

* try to fix bench

* bench overflow

* revert overflow fix, fix tauri_root_path

* revert env_logger downgrade

* fmt

* raise msrv to 1.71

* fmt

* delete .cargo/config.toml [skip ci]

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-27 18:42:30 -03:00