5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 01:13:03 +08:00
wails/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx
Lea Anthony b5e98d5780
New Crowdin updates (#1726)
* New translations minecraftupdater.mdx (Korean)
[ci skip]

* New translations links.mdx (Korean)
[ci skip]

* New translations templates.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations developing-new-features.mdx (Korean)
[ci skip]

* New translations documenting.mdx (Korean)
[ci skip]

* New translations troubleshooting.mdx (Korean)
[ci skip]

* New translations windows-installer.mdx (Korean)
[ci skip]

* New translations faq.mdx (Korean)
[ci skip]

* New translations 2021-11-08-v2-beta2-release-notes.mdx (Korean)
[ci skip]

* New translations 2022-02-22-v2-beta3-release-notes.mdx (Korean)
[ci skip]

* New translations authors.yml (Korean)
[ci skip]

* New translations credits.mdx (Korean)
[ci skip]

* New translations markdown-page.md (Korean)
[ci skip]

* New translations stats.mdx (Korean)
[ci skip]

* New translations faq.mdx (Japanese)
[ci skip]

* New translations faq.mdx (Russian)
[ci skip]

* New translations introduction.mdx (Korean)
[ci skip]

* New translations faq.mdx (Chinese Simplified)
[ci skip]

* New translations options.json (Korean)
[ci skip]

* New translations current.json (Korean)
[ci skip]

* New translations version-v2.0.0-beta.38.json (Korean)
[ci skip]

* New translations version-v2.0.0-beta.39.json (Korean)
[ci skip]

* New translations footer.json (Korean)
[ci skip]

* New translations navbar.json (Korean)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Korean)
[ci skip]

* New translations howdoesitwork.mdx (Korean)
[ci skip]

* New translations windows.mdx (Korean)
[ci skip]

* New translations log.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations linux.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations browser.mdx (Korean)
[ci skip]

* New translations dialog.mdx (Korean)
[ci skip]

* New translations events.mdx (Korean)
[ci skip]

* New translations intro.mdx (Korean)
[ci skip]

* New translations menu.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations window.mdx (Korean)
[ci skip]

* New translations cli.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations menus.mdx (Korean)
[ci skip]

* New translations options.mdx (Korean)
[ci skip]

* New translations project-config.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations helloworld.mdx (Korean)
[ci skip]

* New translations code.json (Korean)
[ci skip]

* New translations developing-new-features.mdx (Chinese Simplified)
[ci skip]

* New translations firstproject.mdx (Japanese)
[ci skip]

* New translations firstproject.mdx (Russian)
[ci skip]

* New translations firstproject.mdx (Chinese Simplified)
[ci skip]

* New translations installation.mdx (Japanese)
[ci skip]

* New translations installation.mdx (Russian)
[ci skip]

* New translations installation.mdx (Chinese Simplified)
[ci skip]

* New translations dynamic-assets.mdx (Japanese)
[ci skip]

* New translations dynamic-assets.mdx (Russian)
[ci skip]

* New translations dynamic-assets.mdx (Chinese Simplified)
[ci skip]

* New translations frameless.mdx (Japanese)
[ci skip]

* New translations frameless.mdx (Russian)
[ci skip]

* New translations frameless.mdx (Chinese Simplified)
[ci skip]

* New translations documenting.mdx (Japanese)
[ci skip]

* New translations documenting.mdx (Russian)
[ci skip]

* New translations frontend.mdx (Japanese)
[ci skip]

* New translations frontend.mdx (Russian)
[ci skip]

* New translations windows.mdx (Chinese Simplified)
[ci skip]

* New translations troubleshooting.mdx (Japanese)
[ci skip]

* New translations troubleshooting.mdx (Russian)
[ci skip]

* New translations troubleshooting.mdx (Chinese Simplified)
[ci skip]

* New translations windows-installer.mdx (Japanese)
[ci skip]

* New translations windows-installer.mdx (Russian)
[ci skip]

* New translations windows-installer.mdx (Chinese Simplified)
[ci skip]

* New translations dialog.mdx (Japanese)
[ci skip]

* New translations dialog.mdx (Russian)
[ci skip]

* New translations signing.mdx (Chinese Simplified)
[ci skip]

* New translations migrating.mdx (Russian)
[ci skip]

* New translations ides.mdx (Japanese)
[ci skip]

* New translations ides.mdx (Russian)
[ci skip]

* New translations ides.mdx (Chinese Simplified)
[ci skip]

* New translations migrating.mdx (Japanese)
[ci skip]

* New translations migrating.mdx (Chinese Simplified)
[ci skip]

* New translations signing.mdx (Russian)
[ci skip]

* New translations mouse-buttons.mdx (Japanese)
[ci skip]

* New translations mouse-buttons.mdx (Russian)
[ci skip]

* New translations mouse-buttons.mdx (Chinese Simplified)
[ci skip]

* New translations overscroll.mdx (Japanese)
[ci skip]

* New translations overscroll.mdx (Russian)
[ci skip]

* New translations routing.mdx (Japanese)
[ci skip]

* New translations routing.mdx (Russian)
[ci skip]

* New translations routing.mdx (Chinese Simplified)
[ci skip]

* New translations signing.mdx (Japanese)
[ci skip]

* New translations dialog.mdx (Chinese Simplified)
[ci skip]

* New translations project-config.mdx (Chinese Simplified)
[ci skip]

* New translations options.mdx (Chinese Simplified)
[ci skip]

* New translations howdoesitwork.mdx (Japanese)
[ci skip]

* New translations howdoesitwork.mdx (Russian)
[ci skip]

* New translations howdoesitwork.mdx (Chinese Simplified)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Japanese)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Russian)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Chinese Simplified)
[ci skip]

* New translations 2021-11-08-v2-beta2-release-notes.mdx (Japanese)
[ci skip]

* New translations options.mdx (Russian)
[ci skip]

* New translations window.mdx (Japanese)
[ci skip]

* New translations menu.mdx (Japanese)
[ci skip]

* New translations menu.mdx (Russian)
[ci skip]

* New translations menu.mdx (Chinese Simplified)
[ci skip]

* New translations window.mdx (Russian)
[ci skip]

* New translations options.mdx (Japanese)
[ci skip]

* New translations cli.mdx (Chinese Simplified)
[ci skip]

* New translations menus.mdx (Japanese)
[ci skip]

* New translations menus.mdx (Russian)
[ci skip]

* New translations menus.mdx (Chinese Simplified)
[ci skip]

* New translations 2021-11-08-v2-beta2-release-notes.mdx (Russian)
[ci skip]

* New translations 2021-11-08-v2-beta2-release-notes.mdx (Chinese Simplified)
[ci skip]

* New translations emailit.mdx (Chinese Simplified)
[ci skip]

* New translations modalfilemanager.mdx (Chinese Simplified)
[ci skip]

* New translations 2022-02-22-v2-beta3-release-notes.mdx (Japanese)
[ci skip]

* New translations 2022-02-22-v2-beta3-release-notes.mdx (Russian)
[ci skip]

* New translations 2022-02-22-v2-beta3-release-notes.mdx (Chinese Simplified)
[ci skip]

* New translations credits.mdx (Japanese)
[ci skip]

* New translations credits.mdx (Russian)
[ci skip]

* New translations credits.mdx (Chinese Simplified)
[ci skip]

* New translations code.json (Korean)
[ci skip]

* New translations developing-new-features.mdx (Japanese)
[ci skip]

* New translations developing-new-features.mdx (Russian)
[ci skip]

* New translations ways-of-contributing.mdx (Japanese)
[ci skip]

* New translations documenting.mdx (Japanese)
[ci skip]

* New translations testing.mdx (Japanese)
[ci skip]

* New translations setting-up-a-dev-environment.mdx (Japanese)
[ci skip]

* New translations fixing-bugs.mdx (Japanese)
[ci skip]

* New translations helping-others.mdx (Japanese)
[ci skip]

* New translations ways-of-contributing.mdx (Russian)
[ci skip]

* New translations fixing-bugs.mdx (Chinese Simplified)
[ci skip]

* New translations documenting.mdx (Russian)
[ci skip]

* New translations documenting.mdx (Chinese Simplified)
[ci skip]

* New translations testing.mdx (Chinese Simplified)
[ci skip]

* New translations fixing-bugs.mdx (Russian)
[ci skip]

* New translations ways-of-contributing.mdx (Chinese Simplified)
[ci skip]

* New translations testing.mdx (Russian)
[ci skip]

* New translations helping-others.mdx (Russian)
[ci skip]

* New translations helping-others.mdx (Chinese Simplified)
[ci skip]

* New translations setting-up-a-dev-environment.mdx (Chinese Simplified)
[ci skip]

* New translations setting-up-a-dev-environment.mdx (Russian)
[ci skip]

* New translations developing-new-features.mdx (Chinese Simplified)
[ci skip]

* New translations current.json (Japanese)
[ci skip]

* New translations current.json (Russian)
[ci skip]

* New translations current.json (Chinese Simplified)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Japanese)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Russian)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Chinese Simplified)
[ci skip]

* New translations version-v2.0.0-beta.43.json (Japanese)
[ci skip]

* New translations version-v2.0.0-beta.43.json (Russian)
[ci skip]

* New translations version-v2.0.0-beta.43.json (Chinese Simplified)
[ci skip]

* New translations installation.mdx (Korean)
[ci skip]

* New translations ways-of-contributing.mdx (Korean)
[ci skip]

* New translations testing.mdx (Korean)
[ci skip]

* New translations developing-new-features.mdx (Korean)
[ci skip]

* New translations documenting.mdx (Korean)
[ci skip]

* New translations fixing-bugs.mdx (Korean)
[ci skip]

* New translations helping-others.mdx (Korean)
[ci skip]

* New translations setting-up-a-dev-environment.mdx (Korean)
[ci skip]

* New translations current.json (Korean)
[ci skip]

* New translations options.json (Korean)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Korean)
[ci skip]

* New translations version-v2.0.0-beta.43.json (Korean)
[ci skip]

* New translations footer.json (Korean)
[ci skip]

* New translations navbar.json (Korean)
[ci skip]

* New translations code.json (Korean)
[ci skip]

* New translations community-guide.mdx (Japanese)
[ci skip]

* New translations community-guide.mdx (Korean)
[ci skip]

* New translations community-guide.mdx (Russian)
[ci skip]

* New translations community-guide.mdx (Chinese Simplified)
[ci skip]

* New translations current.json (Japanese)
[ci skip]

* New translations current.json (Russian)
[ci skip]

* New translations current.json (Chinese Simplified)
[ci skip]

* New translations code.json (Japanese)
[ci skip]

* New translations code.json (Russian)
[ci skip]

* New translations code.json (Chinese Simplified)
[ci skip]

* New translations introduction.mdx (Korean)
[ci skip]

* New translations current.json (Korean)
[ci skip]

* New translations code.json (Korean)
[ci skip]

* New translations community-guide.mdx (Japanese)
[ci skip]

* New translations community-guide.mdx (Korean)
[ci skip]

* New translations community-guide.mdx (Russian)
[ci skip]

* New translations community-guide.mdx (Chinese Simplified)
[ci skip]

* New translations community-guide.mdx (Chinese Simplified)
[ci skip]

* New translations vscode.mdx (Japanese)
[ci skip]

* New translations vscode.mdx (Korean)
[ci skip]

* New translations vscode.mdx (Russian)
[ci skip]

* New translations vscode.mdx (Chinese Simplified)
[ci skip]

* New translations current.json (Chinese Simplified)
[ci skip]

* New translations riftshare.mdx (Chinese Simplified)
[ci skip]

* New translations surge.mdx (Chinese Simplified)
[ci skip]

* New translations wally.mdx (Chinese Simplified)
[ci skip]

* New translations encrypteasy.mdx (Chinese Simplified)
[ci skip]

* New translations filehound.mdx (Chinese Simplified)
[ci skip]

* New translations mollywallet.mdx (Chinese Simplified)
[ci skip]

* New translations optimus.mdx (Chinese Simplified)
[ci skip]

* New translations _category_.json (Chinese Simplified)
[ci skip]

* New translations emailit.mdx (Chinese Simplified)
[ci skip]

* New translations modalfilemanager.mdx (Chinese Simplified)
[ci skip]

* New translations browser.mdx (Chinese Simplified)
[ci skip]

* New translations vscode.mdx (Russian)
[ci skip]

* New translations vscode.mdx (Chinese Simplified)
[ci skip]

* New translations browser.mdx (Japanese)
[ci skip]

* New translations browser.mdx (Korean)
[ci skip]

* New translations browser.mdx (Russian)
[ci skip]

* New translations dialog.mdx (Japanese)
[ci skip]

* New translations vscode.mdx (Japanese)
[ci skip]

* New translations dialog.mdx (Korean)
[ci skip]

* New translations dialog.mdx (Russian)
[ci skip]

* New translations dialog.mdx (Chinese Simplified)
[ci skip]

* New translations events.mdx (Japanese)
[ci skip]

* New translations events.mdx (Korean)
[ci skip]

* New translations events.mdx (Russian)
[ci skip]

* New translations events.mdx (Chinese Simplified)
[ci skip]

* New translations intro.mdx (Japanese)
[ci skip]

* New translations intro.mdx (Korean)
[ci skip]

* New translations intro.mdx (Russian)
[ci skip]

* New translations vscode.mdx (Korean)
[ci skip]

* New translations intro.mdx (Chinese Simplified)
[ci skip]

* New translations log.mdx (Japanese)
[ci skip]

* New translations options.mdx (Russian)
[ci skip]

* New translations introduction.mdx (Japanese)
[ci skip]

* New translations options.mdx (Chinese Simplified)
[ci skip]

* New translations options.mdx (Korean)
[ci skip]

* New translations log.mdx (Korean)
[ci skip]

* New translations log.mdx (Russian)
[ci skip]

* New translations log.mdx (Chinese Simplified)
[ci skip]

* New translations menu.mdx (Japanese)
[ci skip]

* New translations menu.mdx (Korean)
[ci skip]

* New translations menu.mdx (Russian)
[ci skip]

* New translations menu.mdx (Chinese Simplified)
[ci skip]

* New translations window.mdx (Japanese)
[ci skip]

* New translations window.mdx (Korean)
[ci skip]

* New translations window.mdx (Russian)
[ci skip]

* New translations window.mdx (Chinese Simplified)
[ci skip]

* New translations options.mdx (Japanese)
[ci skip]

* New translations introduction.mdx (Korean)
[ci skip]

* New translations introduction.mdx (Russian)
[ci skip]

* New translations community-guide.mdx (Chinese Simplified)
[ci skip]

* New translations stats.mdx (Chinese Simplified)
[ci skip]

* New translations faq.mdx (Chinese Simplified)
[ci skip]

* New translations markdown-page.md (Chinese Simplified)
[ci skip]

* New translations introduction.mdx (Chinese Simplified)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Chinese Simplified)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Chinese Simplified)
[ci skip]

* Empty-Commit

* Fix crowdin screwups again
2022-08-27 20:17:15 +10:00

96 lines
4.2 KiB
Plaintext

# Manual Builds
The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. This document will discuss the different operations the CLI does and how this may be achieved in different ways.
## Build Process
When either `wails build` or `wails dev` are used, the Wails CLI performs a common build process:
- Install frontend dependencies
- Build frontend project
- Generate build assets
- Compile application
- [optional] Compress application
### Install frontend dependencies
#### CLI Steps
- If the `-s` flag is given, this step is skipped
- Checks `wails.json` to see if there is an install command in the key `frontend:install`
- If there isn't, it skips this step
- If there is, it checks if `package.json` exists in the frontend directory. If it doesn't exist, it skips this step
- An MD5 sum is generated from the `package.json` file contents
- It checks for the existence of `package.json.md5` and if it exists, will compare the contents of it (an MD5 sum) with the one generated to see if the contents have changed. If they are the same, this step is skipped
- If `package.json.md5` does not exist, it creates it using the generated MD5 sum
- If a build is now required, or `node_modules` does not exist, or the `-f` flag is given, the install command is executed in the frontend directory
#### Manual Steps
This step could be done from the command line or a script with `npm install`.
### Build frontend project
#### Wails CLI
- If the `-s` flag is given, this step is skipped
- Checks `wails.json` to see if there is a build command in the key `frontend:build`
- If there isn't, it skips this step
- If there is, it is executed in the frontend directory
#### Manual Steps
This step could be done from the command line or a script with `npm run build` or whatever the frontend build script is.
### Generate assets
#### Wails CLI
- If `-nopackage` flag is set, this stage is skipped
- If the `build/appicon.png` file does not exist, a default one is created
- For Windows, see [Bundling for Windows](#windows)
- If `build/windows/icon.ico` does not exist, it will create it from the `build/appicon.png` image.
##### Windows
- If `build/windows/icon.ico` does not exist, it will create it from `build/appicon.png` using icon sizes of 256, 128, 64, 48, 32 and 16. This is done using [winicon](https://github.com/leaanthony/winicon).
- If the `build/windows/<projectname>.manifest` file does not exist, it creates it from a default version.
- Compiles the application as a production build (above)
- Uses [winres](https://github.com/tc-hib/winres) to bundle the icon and manifest into a `.syso` file ready for linking.
#### Manual Steps
- Create `icon.ico` using the [winicon](https://github.com/leaanthony/winicon) CLI tool (or any other tool).
- Create / Update a `.manifest` file for your application
- Use the [winres CLI](https://github.com/tc-hib/go-winres) to generate a `.syso` file.
### Compile application
#### Wails CLI
- If the `-clean` flag is provided, the `build` directory is deleted and recreated
- For `wails dev`, the following default Go flags are used: `-tags dev -gcflags "all=-N -l"`
- For `wails build`, the following default Go flags are used: `-tags desktop,production -ldflags "-w -s"`
- On Windows, `-ldflags "-w -h -H windowsgui"`
- Additional tags passed to the CLI using `-tags` are added to the defaults
- Additional ldflags passed to the CLI using `-ldflags` are added to the defaults
- The `-o` flag is passed through
- The Go compiler specified by `-compiler` will be used for compilation
#### Manual steps
- For dev build, the minimum command would be: `go build -tags dev -gcflags "all=-N -l"`
- For production build, the minimum command would be: `go build -tags desktop,production -ldflags "-w -s -H windowsgui"`
- Ensure that you compile in the same directory as the `.syso` file
### Compress application
#### Wails CLI
- If the `-upx` flag has been given, the `upx` program will be run to compress the application with the default settings
- If `-upxflags` is also passed, these flags are used instead of the default ones
#### Manual steps
- Run `upx [flags]` manually to compress the application.