mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
Add support for Info.dev.plist (#1960)
This commit is contained in:
parent
7f733d787f
commit
7effede62b
4 changed files with 67 additions and 14 deletions
32
v2/pkg/buildassets/build/darwin/Info.dev.plist
Normal file
32
v2/pkg/buildassets/build/darwin/Info.dev.plist
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>{{.Info.ProductName}}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>{{.Name}}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.wails.{{.Name}}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>{{.Info.Comments}}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>iconfile</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.13.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>true</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>{{.Info.Copyright}}</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsLocalNetworking</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,14 +1,27 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0"><dict>
|
||||
<key>CFBundlePackageType</key><string>APPL</string>
|
||||
<key>CFBundleName</key><string>{{.Info.ProductName}}</string>
|
||||
<key>CFBundleExecutable</key><string>{{.Name}}</string>
|
||||
<key>CFBundleIdentifier</key><string>com.wails.{{.Name}}</string>
|
||||
<key>CFBundleVersion</key><string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleGetInfoString</key><string>{{.Info.Comments}}</string>
|
||||
<key>CFBundleShortVersionString</key><string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleIconFile</key><string>iconfile</string>
|
||||
<key>LSMinimumSystemVersion</key><string>10.13.0</string>
|
||||
<key>NSHighResolutionCapable</key><string>true</string>
|
||||
<key>NSHumanReadableCopyright</key><string>{{.Info.Copyright}}</string>
|
||||
</dict></plist>
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>{{.Info.ProductName}}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>{{.Name}}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.wails.{{.Name}}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>{{.Info.Comments}}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>iconfile</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.13.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>true</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>{{.Info.Copyright}}</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -114,8 +114,15 @@ func packageApplicationForDarwin(options *Options) error {
|
|||
}
|
||||
|
||||
func processPList(options *Options, contentsDirectory string) error {
|
||||
|
||||
sourcePList := "Info.plist"
|
||||
if options.Mode == Dev {
|
||||
// Use Info.dev.plist if using build mode
|
||||
sourcePList = "Info.dev.plist"
|
||||
}
|
||||
|
||||
// Read the resolved BuildAssets file and copy it to the destination
|
||||
content, err := buildassets.ReadFileWithProjectData(options.ProjectData, "darwin/Info.plist")
|
||||
content, err := buildassets.ReadFileWithProjectData(options.ProjectData, "darwin/"+sourcePList)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ Your system is ready for Wails development!
|
|||
- Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting
|
||||
- TypeScript versions of your Go structs, that can be constructed and passed to your go methods
|
||||
- A second JS module is generated that provides a wrapper + TS declaration for the runtime
|
||||
- On macOS, it will bundle the application into a `.app` file and run it. It will use a `build/darwin/Info.dev.plist` for development.
|
||||
|
||||
| Flag | Description | Default |
|
||||
| :--------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue