Wails v2の初期設定
Page content
wailsインストール
go install github.com/wailsapp/wails/v2/cmd/wails@latest
ツールのcheck
wails doctor
初期設定
wails init -n [プロジェクトディレクトリ名] -t [テンプレート名または、url]
wails init -n tamatan -t svelte-ts
現在バグなのか、フロントエンドの初期化がうまく行かないので yarnまたは、npm installを実行する。 (yarnの方がうまく行くような気がする。)
cd tamatan/frontend
yarn
テンプレートは、 リリースのv2.0.0-beta.35に書いてあった
TEMPLATE | SHORT NAME | DESCRIPTION |
---|---|---|
Lit + Vite | lit | Lit + Vite development server |
Lit + Vite (Typescript) | lit-ts | Lit + TS + Vite development server |
Preact + Vite | preact | Preact + Vite development server |
Preact + Vite (Typescript) | preact-ts | Preact + Vite development server |
React + Vite | react | React + Vite development server |
React + Vite (Typescript) | react-ts | React + Vite development server |
Svelte + Vite | svelte | Svelte + Vite development server |
Svelte + Vite (Typescript) | svelte-ts | Svelte + TS + Vite development server |
Vanilla + Vite | vanilla | Vanilla + Vite development server |
Vanilla + Vite (Typescript) | vanilla-ts | Vanilla + Vite development server |
Vue + Vite | vue | Vue + Vite development server |
Vue + Vite (Typescript) | vue-ts | Vue + Vite development server |
Vue
SHORT NAME | TEMPLATE | DESCRIPTION |
---|---|---|
misitebao/wails-template-vue | https://github.com/misitebao/wails-template-vue | A template using Vite,Vue and Vue-Router(Support both JavaScript and TypeScript) |
wails-vite-vue-ts | https://github.com/codydbentley/wails-vite-vue-ts | Vue 3 TypeScript with Vite (and instructions to add features) |
codydbentley/wails-vite-vue-the-works | https://github.com/codydbentley/wails-vite-vue-the-works | Vue 3 TypeScript with Vite, Vuex, Vue Router, Sass, and ESLint + Prettier |
Angular
SHORT NAME | TEMPLATE | DESCRIPTION |
---|---|---|
TAINCER / wails-angular-template | https://github.com/TAINCER/wails-angular-template | Angular with TypeScript, Sass, Hot-Reload, Code-Splitting and i18n |
React
SHORT NAME | TEMPLATE | DESCRIPTION |
---|---|---|
AlienRecall / wails-react-template | https://github.com/AlienRecall/wails-react-template | A template using reactjs |
flin7 / wails-react-template | https://github.com/flin7/wails-react-template | A minimal template for React that supports live development |
LGiki / wails-template-nextjs | https://github.com/LGiki/wails-template-nextjs | A template using Next.js and TypeScript |
Svelte
SHORT NAME | TEMPLATE | DESCRIPTION |
---|---|---|
raitonoberu / wails-svelte-template | https://github.com/raitonoberu/wails-svelte-template | Svelteを使用したテンプレート |
BillBuilt / wails-vite-svelte-template | https://github.com/BillBuilt/wails-vite-svelte-template | A template using Svelte and Vite |
BillBuilt / wails-vite-svelte-tailwind-template | https://github.com/BillBuilt/wails-vite-svelte-tailwind-template | A template using Svelte and Vite with TailwindCSS v3 |
Elm
SHORT NAME | TEMPLATE | DESCRIPTION |
---|---|---|
benjamin-thomas / wails-elm-template | https://github.com/benjamin-thomas/wails-elm-template | Develop your GUI app with functional programming and a snappy hot-reload setup 🎉 🚀 |
テスト起動
うまく行かないときは、 もう一度、yarn
wails dev
ビルド
wails build
wails build -platform <各プラットフォーム>
wails build -platform darwin/universal
wails build -platform windows
Platform | Description |
---|---|
darwin | MacOS + architecture of build machine |
darwin/amd64 | MacOS 10.13+ AMD64 |
darwin/arm64 | MacOS 11.0+ ARM64 |
darwin/universal | MacOS AMD64+ARM64 universal application |
windows | Windows 10/11 + architecture of build machine |
windows/amd64 | Windows 10/11 AMD64 |
windows/arm64 | Windows 10/11 ARM64 |
linux | Linux + architecture of build machine |
linux/amd64 | Linux AMD64 |
linux/arm64 | Linux ARM64 |
こんな感じかな。