Quick start
https://tauri.app/ko/v1/guides/getting-started/setup/vite
___________
# tauri package update
yarn upgrade @tauri-apps/cli @tauri-apps/api
# for check
yarn outdated @tauri-apps/cli
___________________
# for AUTO setup
# install yarn, powershell
npm install --global yarn
choco install yarn
# app initial - quick 설정
yarn create tauri-app
# dev 실행
yarn tauri dev
# windows app BUIlD
yarn tauri build
___________________
# for MANUAL setup
#1) Front-end 생성, vite 설정예시
yarn create vite
#2) Back-end 생성 - Rust, cargo package update
cd src-tauri
cargo update
# add rust tauri package, using CARGO
cargo install tauri-cli
cargo tauri init
# add rust tauri package, using yarn
yarn add -D @tauri-apps/cli
yarn tauri init
initial settings
https://www.rust-lang.org/tools/install
_________________
# for WIN, install RUST
winget install --id Rustlang.Rustup
# To set MSVC Toolchain as Default
rustup default stable-msvc
_________________
# for debian/UBUNTU, install URST
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libgtk-3-dev \
# for debian/ubuntu, install RUST
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
. "/workspace/.cargo/env"
# check installation
rustc --version
# Add tauri CLI
yarn add -D @tauri-apps/cli
pnpm add -D @tauri-apps/cli
cargo install tauri-cli
# Build
yarn install
yarn tauri build
pnpm install
pnpm tauri build
# Debugging
yarn tauri dev
pnpm tauri dev
ERROR
sudo apt install libwebkit2gtk-4.1-dev
cargo:warning=
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags libsoup-3.0 libsoup-3.0 >= 3.0
The system library `libsoup-3.0` required by crate `soup3-sys` was not found.
The file `libsoup-3.0.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `libsoup-3.0.pc`.
warning: build failed, waiting for other jobs to finish...
Error failed to build app: failed to build app
ELIFECYCLE Command failed with exit code 1.
Debugging
vscode debugging set
".vscode/launch.json"에서 아래 내용을 복사-붙여넣기
# .vscode/launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Tauri Development Debug",
"cargo": {
"args": [
"build",
"--manifest-path=./src-tauri/Cargo.toml",
"--no-default-features"
]
},
// task for the `beforeDevCommand` if used, must be configured in `.vscode/tasks.json`
"preLaunchTask": "ui:dev"
},
{
"type": "lldb",
"request": "launch",
"name": "Tauri Production Debug",
"cargo": {
"args": ["build", "--release", "--manifest-path=./src-tauri/Cargo.toml"]
},
// task for the `beforeBuildCommand` if used, must be configured in `.vscode/tasks.json`
"preLaunchTask": "ui:build"
}
]
}
# .vscode/tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "ui:dev",
"type": "shell",
// `dev` keeps running in the background
// ideally you should also configure a `problemMatcher`
// see https://code.visualstudio.com/docs/editor/tasks#_can-a-background-task-be-used-as-a-prelaunchtask-in-launchjson
"isBackground": true,
// change this to your `beforeDevCommand`:
"command": "yarn",
"args": ["dev"]
},
{
"label": "ui:build",
"type": "shell",
// change this to your `beforeBuildCommand`:
"command": "yarn",
"args": ["build"]
}
]
}
packaging
https://tauri.app/ko/v1/guides/building/sidecar
https://tauri.app/ko/v1/guides/building/resources
https://tauri.app/ko/v1/guides/features/command
https://tauri.app/ko/v1/guides/features/splashscreen
"category": {
"description": "The application kind.\n\n
Should be one of the following:\n
Business, DeveloperTool, Education, Entertainment,
Finance, Game, ActionGame, AdventureGame,
ArcadeGame, BoardGame, CardGame, CasinoGame,
DiceGame, EducationalGame, FamilyGame, KidsGame,
MusicGame, PuzzleGame, RacingGame, RolePlayingGame,
SimulationGame, SportsGame, StrategyGame, TriviaGame,
WordGame, GraphicsAndDesign, HealthcareAndFitness,
Lifestyle, Medical, Music, News, Photography,
Productivity, Reference, SocialNetworking, Sports,
Travel, Utility, Video, Weather.",
_
반응형