(🧪 WIP) Vite + Vue Starter for Tauri.
Preview: https://tauri-vite-vue.pages.dev/
Windows/macOS/Linux require different environments, but Rust and Node.JS are needed.
More info see Prerequisites | Tauri.
Create a repo from this template on GitHub
If you prefer to do it manually with the cleaner git history
npx degit YunYouJun/tauri-vite-vue my-tauri-app
cd my-tauri-app
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm
When you use this template, try follow the checklist to update your info properly
- Change
tauri.bundle.identifier
value insrc-tauri/tauri.conf.json
- Change the author name in
LICENSE
- Change the title in
App.vue
- Change the icons in
src-tauri
- Remove the
.github
folder which contains the funding info - Clean up the READMEs and remove routes
And, enjoy :)
# run it and visit http://localhost:1420
pnpm dev
# run it in tauri
# RUST_BACKTRACE=1 pnpm tauri dev
pnpm tauri dev
# https://tauri.app/start/prerequisites/#android
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
# custom
# export JAVA_HOME="/Users/yunyou/Applications/Android Studio.app/Contents/jbr/Contents/Home"
export ANDROID_HOME="$HOME/Library/Android/sdk"
export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
# dev
pnpm tauri android init
pnpm tauri android dev
# fist
pnpm tauri ios init
# run
pnpm tauri ios dev
# Build Tauri App, find it below
pnpm tauri build
# You can use `pnpm build` to build website.
- Windows
.msi
:src-tauri/target/release
(only be created on Windows) - macOS
.dmg
:src-tauri/target/release/bundle/dmg
(only be created on macOS) - Linux(Debian)
.deb
:src-tauri/target/release
(only be created on Linux)
What to build Cross-Platform installer?
Try GitHub Actions! (Todo)
需为安卓 APK 签名。
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
# /src-tauri/gen/android/keystore.properties
storePassword=<password from previous step>
keyPassword=<password from previous step>
keyAlias=upload
storeFile=<密钥存储文件的位置,例如 /Users/<user name>/upload-keystore.jks 或 C:\\Users\\<user name>\\upload-keystore.jks>
- Release by GitHub Actions tauri-apps/tauri-action
- ...