Tauri v2 패키징 가이드
작성일: 2026-04-06 Last Updated: 2026-04-06 대상: Tauri v2 데스크탑 앱 패키징 (Windows / macOS / Linux) 공통 참조:
../common/ci-cd.md(빌드 파이프라인, 아티팩트 관리) 관련 문서:./code-signing.md(코드 서명),./auto-update.md(자동 업데이트)
목차
- 패키징 포맷 개요
- Windows 패키징
- macOS 패키징
- Linux 패키징
- 아이콘 / 메타데이터
- 파일 연결 (File Association)
- Deep Link / Custom Protocol
- 설치 경로 / 데이터 경로
- 언인스톨러
1. 패키징 포맷 개요
포맷별 비교
| 포맷 | OS | 자동 업데이트 | 설치 방식 | 크기 | 추천 |
|---|---|---|---|---|---|
| NSIS | Windows | O | 인스톨러 (.exe) | 작음 | 기본 |
| MSI (WiX) | Windows | O | Windows Installer | 중간 | IT 관리자 |
| DMG | macOS | X (배포용) | 드래그 앤 드롭 | 중간 | 기본 |
| .app | macOS | O (업데이트) | 직접 실행 | 작음 | 업데이트용 |
| AppImage | Linux | O | 독립 실행 (설치 불필요) | 큼 | 기본 |
| deb | Linux (Debian) | X | dpkg -i / apt | 작음 | Debian/Ubuntu |
| rpm | Linux (RHEL) | X | rpm -i / dnf | 작음 | Fedora/RHEL |
| Flatpak | Linux | O (Flathub) | 샌드박스 | 큼 | 범용 |
| Snap | Linux | O (자동) | 샌드박스 | 큼 | Ubuntu |
tauri.conf.json 번들 설정
{
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "com.example.myapp",
"publisher": "My Company",
"copyright": "Copyright (c) 2026 My Company",
"category": "Productivity",
"shortDescription": "A desktop application",
"longDescription": "A cross-platform desktop application built with Tauri.",
"resources": [],
"externalBin": [],
"windows": { },
"macOS": { },
"linux": { }
}
}
특정 포맷만 빌드
# 특정 타겟만 빌드
npx tauri build --bundles nsis # Windows NSIS만
npx tauri build --bundles msi # Windows MSI만
npx tauri build --bundles dmg # macOS DMG만
npx tauri build --bundles app # macOS .app만
npx tauri build --bundles appimage # Linux AppImage만
npx tauri build --bundles deb # Linux deb만
npx tauri build --bundles rpm # Linux rpm만
2. Windows 패키징
2.1 NSIS 인스톨러 (기본 추천)
NSIS(Nullsoft Scriptable Install System)는 가볍고 커스터마이징이 용이한 인스톨러이다.
// tauri.conf.json > bundle > windows > nsis
{
"bundle": {
"windows": {
"nsis": {
"displayLanguageSelector": true,
"languages": ["Korean", "English", "Japanese"],
"installerIcon": "icons/installer.ico",
"headerImage": "icons/nsis-header.bmp",
"sidebarImage": "icons/nsis-sidebar.bmp",
"installMode": "both",
"startMenuFolder": "My Company"
}
}
}
}
| 필드 | 설명 |
|---|---|
displayLanguageSelector | 언어 선택 대화상자 표시 |
languages | 지원 언어 목록 |
installerIcon | 설치 프로그램 아이콘 (.ico) |
headerImage | NSIS 헤더 이미지 (150x57 BMP) |
sidebarImage | NSIS 사이드바 이미지 (164x314 BMP) |
installMode | currentUser / perMachine / both (사용자 선택) |
startMenuFolder | 시작 메뉴 폴더명 |
installMode 비교
| 모드 | 설치 경로 | UAC 프롬프트 | 사용 사례 |
|---|---|---|---|
currentUser | %LOCALAPPDATA%\{app} | 불필요 | 개인 사용자 |
perMachine | C:\Program Files\{app} | 필요 | 기업 환경, IT 관리 |
both | 사용자 선택 | 선택에 따라 | 기본 추천 |
2.2 MSI (WiX 기반)
기업 IT 환경에서 Group Policy 배포가 필요할 때 MSI를 사용한다.
// tauri.conf.json > bundle > windows > wix
{
"bundle": {
"windows": {
"wix": {
"language": ["ko-KR", "en-US"],
"bannerPath": "icons/wix-banner.bmp",
"dialogImagePath": "icons/wix-dialog.bmp"
}
}
}
}
NSIS vs MSI 비교
| 항목 | NSIS | MSI (WiX) |
|---|---|---|
| 설치 UI | 커스텀 가능 | Windows 표준 |
| Group Policy 배포 | X | O |
| 무음 설치 | --silent | msiexec /i /qn |
| 파일 크기 | 작음 | 중간 |
| 자동 업데이트 | O (Tauri Updater) | O (Tauri Updater) |
| 권장 대상 | 일반 사용자 | 기업 IT 관리자 |
2.3 Portable (설치 불필요)
Tauri는 공식적으로 Portable 빌드를 제공하지 않지만, Rust 바이너리 자체를 배포할 수 있다.
# Release 빌드 바이너리를 직접 배포
target/release/myapp.exe
# WebView2가 시스템에 설치되어 있어야 함
# Windows 10 1803+ / Windows 11은 기본 포함
3. macOS 패키징
3.1 DMG (배포용)
DMG는 macOS에서 가장 일반적인 배포 형식이다.
// tauri.conf.json > bundle > macOS
{
"bundle": {
"macOS": {
"dmg": {
"appPosition": { "x": 180, "y": 170 },
"applicationFolderPosition": { "x": 480, "y": 170 },
"windowSize": { "width": 660, "height": 400 },
"background": "icons/dmg-background.png"
},
"minimumSystemVersion": "10.15",
"hardenedRuntime": true,
"entitlements": "./entitlements.plist",
"frameworks": []
}
}
}
DMG 레이아웃 설명
+-----------------------------------------------+
| DMG Window (660x400) |
| |
| [MyApp.app] [Applications/] |
| (180, 170) (480, 170) |
| |
| "MyApp을 Applications 폴더로 |
| 드래그하세요" |
| |
+-----------------------------------------------+
3.2 .app 번들 구조
Tauri가 생성하는 macOS .app 번들:
MyApp.app/
+-- Contents/
+-- Info.plist # 앱 메타데이터
+-- MacOS/
| +-- MyApp # 메인 바이너리
+-- Resources/
| +-- icon.icns # 앱 아이콘
| +-- *.lproj/ # 지역화 리소스
+-- Frameworks/ # 의존 프레임워크
+-- _CodeSignature/ # 코드 서명
3.3 Universal Binary (Intel + Apple Silicon)
# 두 아키텍처 모두 빌드
npx tauri build --target aarch64-apple-darwin # Apple Silicon
npx tauri build --target x86_64-apple-darwin # Intel
# Universal Binary 생성 (선택사항)
lipo -create \
target/aarch64-apple-darwin/release/myapp \
target/x86_64-apple-darwin/release/myapp \
-output target/universal/myapp
일반적으로 Universal Binary 대신 플랫폼별 개별 빌드를 배포하는 것이 권장된다 (파일 크기 절반).
4. Linux 패키징
4.1 AppImage ( 기본 추천)
AppImage는 설치 없이 실행 가능한 단일 파일 형식이다.
# AppImage 실행
chmod +x MyApp_2.4.0_amd64.AppImage
./MyApp_2.4.0_amd64.AppImage
# 데스크탑 통합 (선택)
# AppImage를 ~/.local/bin/ 에 복사 후 데스크탑 파일 생성
| 장점 | 단점 |
|---|---|
| 설치 불필요 | 파일 크기 큼 (의존성 포함) |
| 모든 배포판에서 실행 | 시스템 통합 (메뉴, 연결) 수동 |
| 자동 업데이트 지원 (Tauri Updater) | 일부 배포판에서 sandbox 제한 |
| 이전 버전 병렬 보관 가능 | FUSE 필요 (대부분 기본 설치) |
4.2 deb 패키지 (Debian/Ubuntu)
// tauri.conf.json > bundle > linux > deb
{
"bundle": {
"linux": {
"deb": {
"depends": [
"libwebkit2gtk-4.1-0",
"libgtk-3-0"
],
"section": "utils",
"priority": "optional",
"desktopTemplate": "assets/myapp.desktop"
}
}
}
}
# deb 설치
sudo dpkg -i myapp_2.4.0_amd64.deb
sudo apt-get install -f # 의존성 자동 해결
# 또는 apt로 직접 설치
sudo apt install ./myapp_2.4.0_amd64.deb
4.3 rpm 패키지 (Fedora/RHEL)
// tauri.conf.json > bundle > linux > rpm
{
"bundle": {
"linux": {
"rpm": {
"depends": [
"webkit2gtk4.1",
"gtk3"
],
"release": "1",
"epoch": 0
}
}
}
}
# rpm 설치
sudo rpm -i myapp-2.4.0-1.x86_64.rpm
# 또는
sudo dnf install ./myapp-2.4.0-1.x86_64.rpm
4.4 Flatpak (범용)
Tauri는 Flatpak을 직접 빌드하지 않지만, 별도 manifest로 빌드할 수 있다.
# com.example.myapp.yml (Flatpak manifest)
app-id: com.example.myapp
runtime: org.gnome.Platform
runtime-version: '45'
sdk: org.gnome.Sdk
command: myapp
finish-args:
- --share=network
- --share=ipc
- --socket=wayland
- --socket=fallback-x11
- --device=dri
- --filesystem=xdg-documents:ro
modules:
- name: myapp
buildsystem: simple
build-commands:
- install -Dm755 myapp /app/bin/myapp
sources:
- type: file
path: target/release/myapp
# Flatpak 빌드 + 설치
flatpak-builder build-dir com.example.myapp.yml --install --user --force-clean
4.5 Snap
# snap/snapcraft.yaml
name: myapp
version: '2.4.0'
summary: My Desktop App
description: |
A cross-platform desktop application.
grade: stable
confinement: strict
base: core22
apps:
myapp:
command: myapp
plugs:
- network
- home
- desktop
- desktop-legacy
- wayland
- x11
- opengl
parts:
myapp:
plugin: dump
source: target/release/
source-type: local
organize:
myapp: bin/myapp
4.6 Linux 패키지 포맷 비교
| 포맷 | 배포판 호환 | 자동 업데이트 | 샌드박스 | 의존성 관리 | 배포 용이성 |
|---|---|---|---|---|---|
| AppImage | 전체 | O (Tauri) | X | 자체 포함 | 매우 쉬움 |
| deb | Debian 계열 | X | X | apt | 쉬움 |
| rpm | RHEL 계열 | X | X | dnf/yum | 쉬움 |
| Flatpak | 전체 | O (Flathub) | O | Flatpak 런타임 | 중간 |
| Snap | 전체 (Ubuntu 주력) | O (자동) | O | Snap 런타임 | 중간 |
추천 전략: AppImage를 기본으로, deb/rpm을 추가 제공.
4.7 빌드 의존성 (CI)
# Ubuntu 22.04에서 Tauri 빌드에 필요한 패키지
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libgtk-3-dev
5. 아이콘 / 메타데이터
5.1 아이콘 준비
src-tauri/icons/
+-- 32x32.png # 32x32 (Linux 트레이, Windows 작은 아이콘)
+-- 128x128.png # 128x128 (Linux 앱 아이콘)
+-- 128x128@2x.png # 256x256 (HiDPI)
+-- icon.icns # macOS 아이콘 (여러 크기 포함)
+-- icon.ico # Windows 아이콘 (여러 크기 포함)
+-- icon.png # 512x512 또는 1024x1024 (원본)
+-- StoreLogo.png # 50x50 (Microsoft Store)
+-- Square30x30Logo.png # 30x30 (Windows 타일)
+-- Square44x44Logo.png # 44x44 (Windows 타일)
+-- Square71x71Logo.png # 71x71 (Windows 타일)
+-- Square89x89Logo.png # 89x89 (Windows 타일)
+-- Square107x107Logo.png # 107x107 (Windows 타일)
+-- Square142x142Logo.png # 142x142 (Windows 타일)
+-- Square150x150Logo.png # 150x150 (Windows 타일)
+-- Square284x284Logo.png # 284x284 (Windows 타일)
+-- Square310x310Logo.png # 310x310 (Windows 타일)
Tauri CLI로 아이콘 자동 생성
# 1024x1024 원본 PNG에서 모든 크기 자동 생성
npx tauri icon src-tauri/icons/icon.png
5.2 메타데이터 (tauri.conf.json)
{
"productName": "My App",
"version": "2.4.0",
"identifier": "com.example.myapp",
"bundle": {
"publisher": "My Company Inc.",
"copyright": "Copyright (c) 2026 My Company Inc.",
"category": "Productivity",
"shortDescription": "데스크탑 앱",
"longDescription": "생산성을 높이는 크로스 플랫폼 데스크탑 앱입니다.",
"licenseFile": "./LICENSE"
}
}
macOS 카테고리 값
| 값 | 설명 |
|---|---|
Business | 비즈니스 |
DeveloperTools | 개발 도구 |
Education | 교육 |
Entertainment | 엔터테인먼트 |
Finance | 금융 |
GraphicsDesign | 그래픽/디자인 |
Productivity | 생산성 |
SocialNetworking | 소셜 |
Utilities | 유틸리티 |
6. 파일 연결 (File Association)
tauri.conf.json 설정
{
"bundle": {
"fileAssociations": [
{
"ext": ["myf"],
"name": "MyApp File",
"mimeType": "application/x-myapp",
"role": "Editor"
},
{
"ext": ["json", "jsonl"],
"name": "JSON File",
"mimeType": "application/json",
"role": "Viewer"
}
]
}
}