diff --git a/v3/internal/commands/init.go b/v3/internal/commands/init.go index 71ca311ac..fd9b32f89 100644 --- a/v3/internal/commands/init.go +++ b/v3/internal/commands/init.go @@ -2,9 +2,10 @@ package commands import ( "fmt" + "path/filepath" + "github.com/wailsapp/wails/v3/internal/flags" "github.com/wailsapp/wails/v3/internal/templates" - "path/filepath" "github.com/pterm/pterm" ) diff --git a/v3/internal/templates/_common/Taskfile.tmpl.yml b/v3/internal/templates/_common/Taskfile.tmpl.yml new file mode 100644 index 000000000..591c9f769 --- /dev/null +++ b/v3/internal/templates/_common/Taskfile.tmpl.yml @@ -0,0 +1,136 @@ +version: '3' + +vars: + APP_NAME: "{{.ProjectName}}" + +tasks: + + pre-build: + summary: Pre-build hooks + + post-build: + summary: Post-build hooks + + install-frontend-deps: + summary: Install frontend dependencies + dir: frontend + sources: + - package.json + - package-lock.json + generates: + - node_modules/* + preconditions: + - sh: npm version + msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" + cmds: + - npm install + + build-frontend: + summary: Build the frontend project + dir: frontend + deps: + - install-frontend-deps + cmds: + - npm run build + + build:darwin: + summary: Builds the application + platforms: + - darwin + cmds: + - task: pre-build + - task: build-frontend + - go build -gcflags=all="-N -l" -o bin/{{.ProjectName}} + - task: post-build + env: + CGO_CFLAGS: "-mmacosx-version-min=10.13" + CGO_LDFLAGS: "-mmacosx-version-min=10.13" + MACOSX_DEPLOYMENT_TARGET: "10.13" + + build:linux: + summary: Builds the application for Linux + platforms: + - linux + cmds: + - task: pre-build + - task: build-frontend + - go build -gcflags=all="-N -l" -o bin/{{.ProjectName}} + - task: post-build + + build:windows: + summary: Builds the application for Windows + platforms: + - windows + cmds: + - task: pre-build + - task: build-frontend + - go build -gcflags=all="-N -l" -o bin/{{.ProjectName}}.exe + - task: post-build + + build: + summary: Builds the application + cmds: + - task: build:darwin + - task: build:linux + - task: build:windows + + generate-icons: + summary: Generates Windows `.ico` and Mac `.icns` files from an image + dir: build + cmds: + # Generates both .ico and .icns files + - wails generate icons -input appicon.png + + build-app-prod-darwin: + summary: Creates a production build of the application + cmds: + - task: pre-build + - task: build-frontend + - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} + - task: post-build + env: + CGO_CFLAGS: "-mmacosx-version-min=10.13" + CGO_LDFLAGS: "-mmacosx-version-min=10.13" + MACOSX_DEPLOYMENT_TARGET: "10.13" + vars: + ARCH: $GOARCH + + + create-app-bundle: + summary: Builds a `.app` bundle + cmds: + - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} + - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources + - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS + - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents + + package-darwin-arm64: + summary: Packages a production build of the application into a `.app` bundle + platform: darwin + deps: + - task: build-app-prod-darwin + vars: + ARCH: arm64 + - generate-icons + cmds: + - task: create-app-bundle + + generate:syso: + dir: build + platform: windows + cmds: + - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso + vars: + ARCH: $GOARCH + + package:windows: + summary: Packages a production build of the application into a `.exe` bundle + platform: windows + deps: + - generate-icons + cmds: + - task: generate:syso + vars: + ARCH: amd64 + - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe + - powershell Remove-item wails.syso diff --git a/v3/internal/templates/lit-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/_common/build/Info.dev.plist.tmpl similarity index 100% rename from v3/internal/templates/lit-ts/build/Info.dev.plist.tmpl rename to v3/internal/templates/_common/build/Info.dev.plist.tmpl diff --git a/v3/internal/templates/lit-ts/build/Info.plist.tmpl b/v3/internal/templates/_common/build/Info.plist.tmpl similarity index 100% rename from v3/internal/templates/lit-ts/build/Info.plist.tmpl rename to v3/internal/templates/_common/build/Info.plist.tmpl diff --git a/v3/internal/templates/lit-ts/build/appicon.png b/v3/internal/templates/_common/build/appicon.png similarity index 100% rename from v3/internal/templates/lit-ts/build/appicon.png rename to v3/internal/templates/_common/build/appicon.png diff --git a/v3/internal/templates/lit-ts/build/icons.icns b/v3/internal/templates/_common/build/icons.icns similarity index 100% rename from v3/internal/templates/lit-ts/build/icons.icns rename to v3/internal/templates/_common/build/icons.icns diff --git a/v3/internal/templates/lit-ts/go.mod.tmpl b/v3/internal/templates/_common/go.mod.tmpl similarity index 100% rename from v3/internal/templates/lit-ts/go.mod.tmpl rename to v3/internal/templates/_common/go.mod.tmpl diff --git a/v3/internal/templates/lit-ts/go.sum.tmpl b/v3/internal/templates/_common/go.sum.tmpl similarity index 100% rename from v3/internal/templates/lit-ts/go.sum.tmpl rename to v3/internal/templates/_common/go.sum.tmpl diff --git a/v3/internal/templates/lit-ts/main.go.tmpl b/v3/internal/templates/_common/main.go.tmpl similarity index 100% rename from v3/internal/templates/lit-ts/main.go.tmpl rename to v3/internal/templates/_common/main.go.tmpl diff --git a/v3/internal/templates/lit-ts/Taskfile.tmpl.yml b/v3/internal/templates/lit-ts/Taskfile.tmpl.yml deleted file mode 100644 index 975af7335..000000000 --- a/v3/internal/templates/lit-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/lit/Taskfile.tmpl.yml b/v3/internal/templates/lit/Taskfile.tmpl.yml deleted file mode 100644 index 0be9948e1..000000000 --- a/v3/internal/templates/lit/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/lit/build/Info.dev.plist.tmpl b/v3/internal/templates/lit/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/lit/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/lit/build/Info.plist.tmpl b/v3/internal/templates/lit/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/lit/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/lit/build/appicon.png b/v3/internal/templates/lit/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/lit/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/lit/build/icons.icns b/v3/internal/templates/lit/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/lit/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/lit/go.mod.tmpl b/v3/internal/templates/lit/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/lit/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/lit/go.sum.tmpl b/v3/internal/templates/lit/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/lit/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/lit/main.go.tmpl b/v3/internal/templates/lit/main.go.tmpl deleted file mode 100644 index c30a939dc..000000000 --- a/v3/internal/templates/lit/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/preact-ts/Taskfile.tmpl.yml b/v3/internal/templates/preact-ts/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/preact-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/preact-ts/build/Info.plist.tmpl b/v3/internal/templates/preact-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/preact-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/preact-ts/build/appicon.png b/v3/internal/templates/preact-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/preact-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/preact-ts/build/icons.icns b/v3/internal/templates/preact-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/preact-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/preact-ts/go.mod.tmpl b/v3/internal/templates/preact-ts/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/preact-ts/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/preact-ts/go.sum.tmpl b/v3/internal/templates/preact-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/preact-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/preact-ts/main.go.tmpl b/v3/internal/templates/preact-ts/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/preact-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/preact/Taskfile.tmpl.yml b/v3/internal/templates/preact/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/preact/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/preact/build/Info.dev.plist.tmpl b/v3/internal/templates/preact/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/preact/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/preact/build/Info.plist.tmpl b/v3/internal/templates/preact/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/preact/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/preact/build/appicon.png b/v3/internal/templates/preact/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/preact/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/preact/build/icons.icns b/v3/internal/templates/preact/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/preact/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/preact/go.mod.tmpl b/v3/internal/templates/preact/go.mod.tmpl deleted file mode 100644 index 5a7721646..000000000 --- a/v3/internal/templates/preact/go.mod.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/imdario/mergo v0.3.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/preact/go.sum.tmpl b/v3/internal/templates/preact/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/preact/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/preact/main.go.tmpl b/v3/internal/templates/preact/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/preact/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml b/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml deleted file mode 100644 index 975af7335..000000000 --- a/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl b/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/react-swc-ts/build/appicon.png b/v3/internal/templates/react-swc-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/react-swc-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/react-swc-ts/build/icons.icns b/v3/internal/templates/react-swc-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/react-swc-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/react-swc-ts/go.mod.tmpl b/v3/internal/templates/react-swc-ts/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/react-swc-ts/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/react-swc-ts/go.sum.tmpl b/v3/internal/templates/react-swc-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/react-swc-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/react-swc-ts/main.go.tmpl b/v3/internal/templates/react-swc-ts/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/react-swc-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/react-swc/Taskfile.tmpl.yml b/v3/internal/templates/react-swc/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/react-swc/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl b/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/react-swc/build/Info.plist.tmpl b/v3/internal/templates/react-swc/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/react-swc/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/react-swc/build/appicon.png b/v3/internal/templates/react-swc/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/react-swc/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/react-swc/build/icons.icns b/v3/internal/templates/react-swc/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/react-swc/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/react-swc/go.mod.tmpl b/v3/internal/templates/react-swc/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/react-swc/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/react-swc/go.sum.tmpl b/v3/internal/templates/react-swc/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/react-swc/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/react-swc/main.go.tmpl b/v3/internal/templates/react-swc/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/react-swc/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/react-ts/Taskfile.tmpl.yml b/v3/internal/templates/react-ts/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/react-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/react-ts/build/Info.plist.tmpl b/v3/internal/templates/react-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/react-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/react-ts/build/appicon.png b/v3/internal/templates/react-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/react-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/react-ts/build/icons.icns b/v3/internal/templates/react-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/react-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/react-ts/go.mod.tmpl b/v3/internal/templates/react-ts/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/react-ts/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/react-ts/go.sum.tmpl b/v3/internal/templates/react-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/react-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/react-ts/main.go.tmpl b/v3/internal/templates/react-ts/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/react-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/react/Taskfile.tmpl.yml b/v3/internal/templates/react/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/react/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/react/build/Info.dev.plist.tmpl b/v3/internal/templates/react/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/react/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/react/build/Info.plist.tmpl b/v3/internal/templates/react/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/react/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/react/build/appicon.png b/v3/internal/templates/react/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/react/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/react/build/icons.icns b/v3/internal/templates/react/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/react/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/react/go.mod.tmpl b/v3/internal/templates/react/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/react/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/react/go.sum.tmpl b/v3/internal/templates/react/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/react/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/react/main.go.tmpl b/v3/internal/templates/react/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/react/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml b/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/svelte-ts/build/Info.plist.tmpl b/v3/internal/templates/svelte-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/svelte-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/svelte-ts/build/appicon.png b/v3/internal/templates/svelte-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/svelte-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/svelte-ts/build/icons.icns b/v3/internal/templates/svelte-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/svelte-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/svelte-ts/go.mod.tmpl b/v3/internal/templates/svelte-ts/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/svelte-ts/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/svelte-ts/go.sum.tmpl b/v3/internal/templates/svelte-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/svelte-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/svelte-ts/main.go.tmpl b/v3/internal/templates/svelte-ts/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/svelte-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/svelte/Taskfile.tmpl.yml b/v3/internal/templates/svelte/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/svelte/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/svelte/build/Info.dev.plist.tmpl b/v3/internal/templates/svelte/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/svelte/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/svelte/build/Info.plist.tmpl b/v3/internal/templates/svelte/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/svelte/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/svelte/build/appicon.png b/v3/internal/templates/svelte/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/svelte/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/svelte/build/icons.icns b/v3/internal/templates/svelte/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/svelte/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/svelte/go.mod.tmpl b/v3/internal/templates/svelte/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/svelte/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/svelte/go.sum.tmpl b/v3/internal/templates/svelte/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/svelte/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/svelte/main.go.tmpl b/v3/internal/templates/svelte/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/svelte/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/templates.go b/v3/internal/templates/templates.go index 2d35d97db..a44b02541 100644 --- a/v3/internal/templates/templates.go +++ b/v3/internal/templates/templates.go @@ -4,17 +4,18 @@ import ( "embed" "encoding/json" "fmt" - "github.com/go-git/go-git/v5" - "github.com/go-git/go-git/v5/plumbing" - "github.com/pkg/errors" - "github.com/pterm/pterm" - "github.com/wailsapp/wails/v3/internal/debug" "io/fs" "os" "os/exec" "path/filepath" "strings" + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/plumbing" + "github.com/pkg/errors" + "github.com/pterm/pterm" + "github.com/wailsapp/wails/v3/internal/debug" + "github.com/wailsapp/wails/v3/internal/flags" "github.com/leaanthony/gosod" @@ -22,125 +23,39 @@ import ( "github.com/samber/lo" ) -//go:embed lit -var lit embed.FS - -//go:embed lit-ts -var litTS embed.FS - -//go:embed vue -var vue embed.FS - -//go:embed vue-ts -var vueTS embed.FS - -//go:embed react -var react embed.FS - -//go:embed react-ts -var reactTS embed.FS - -//go:embed react-swc -var reactSWC embed.FS - -//go:embed react-swc-ts -var reactSWCTS embed.FS - -//go:embed svelte -var svelte embed.FS - -//go:embed svelte-ts -var svelteTS embed.FS - -//go:embed preact -var preact embed.FS - -//go:embed preact-ts -var preactTS embed.FS - -//go:embed vanilla -var vanilla embed.FS - -//go:embed vanilla-ts -var vanillaTS embed.FS +//go:embed * +var templates embed.FS type TemplateData struct { Name string Description string - FS embed.FS + FS fs.FS } -var defaultTemplates = []TemplateData{ - { - Name: "lit", - Description: "Template using Lit Web Components: https://lit.dev", - FS: lit, - }, - { - Name: "lit-ts", - Description: "Template using Lit Web Components (TypeScript) : https://lit.dev", - FS: litTS, - }, - { - Name: "vue", - Description: "Template using Vue: https://vuejs.org", - FS: vue, - }, - { - Name: "vue-ts", - Description: "Template using Vue (TypeScript): https://vuejs.org", - FS: vueTS, - }, - { - Name: "react", - Description: "Template using React: https://reactjs.org", - FS: react, - }, - { - Name: "react-ts", - Description: "Template using React (TypeScript): https://reactjs.org", - FS: reactTS, - }, - { - Name: "react-swc", - Description: "Template using React with SWC: https://reactjs.org & https://swc.rs", - FS: reactSWC, - }, - { - Name: "react-swc-ts", - Description: "Template using React with SWC (TypeScript): https://reactjs.org & https://swc.rs", - FS: reactSWCTS, - }, - { - Name: "svelte", - Description: "Template using Svelte: https://svelte.dev", - FS: svelte, - }, - { - Name: "svelte-ts", - Description: "Template using Svelte (TypeScript): https://svelte.dev", - FS: svelteTS, - }, - { - Name: "preact", - Description: "Template using Preact: https://preactjs.com", - FS: preact, - }, - { - Name: "preact-ts", - Description: "Template using Preact (TypeScript): https://preactjs.com", - FS: preactTS, - }, - { - Name: "vanilla", - Description: "Template using Vanilla JS", - FS: vanilla, - }, - { - Name: "vanilla-ts", - Description: "Template using Vanilla JS (TypeScript)", - FS: vanillaTS, - }, +var defaultTemplates = []TemplateData{} + +func init() { + dirs, err := templates.ReadDir(".") + if err != nil { + return + } + for _, dir := range dirs { + if strings.HasPrefix(dir.Name(), "_") { + continue + } + if dir.IsDir() { + template, err := parseTemplate(templates, dir.Name()) + if err != nil { + continue + } + defaultTemplates = append(defaultTemplates, + TemplateData{ + Name: dir.Name(), + Description: template.Description, + FS: templates, + }) + } + } } func ValidTemplateName(name string) bool { @@ -349,7 +264,14 @@ func Install(options *flags.Init) error { if err != nil { return err } - + common, err := fs.Sub(templates, "_common") + if err != nil { + return err + } + err = gosod.New(common).Extract(options.ProjectDir, templateData) + if err != nil { + return err + } err = gosod.New(tfs).Extract(options.ProjectDir, templateData) if err != nil { return err diff --git a/v3/internal/templates/templates_test.go b/v3/internal/templates/templates_test.go index 25263106e..4e68036e6 100644 --- a/v3/internal/templates/templates_test.go +++ b/v3/internal/templates/templates_test.go @@ -2,6 +2,7 @@ package templates import ( "os" + "path/filepath" "testing" "github.com/wailsapp/wails/v3/internal/flags" @@ -34,5 +35,10 @@ func TestInstall(t *testing.T) { t.Errorf("Install() error = %v, wantErr %v", err, tt.wantErr) } }) + t.Cleanup(func() { + path, _ := os.Getwd() + _ = os.RemoveAll(filepath.Join(path, "..", tt.options.ProjectName)) + }) } + } diff --git a/v3/internal/templates/test/Taskfile.yml b/v3/internal/templates/test/Taskfile.yml deleted file mode 100644 index 00e883d95..000000000 --- a/v3/internal/templates/test/Taskfile.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "test" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{.ARCH}} go build -tags production -ldflags="-w -s" -o build/bin/{{.APP_NAME}} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{.APP_NAME}}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{.APP_NAME}}.app/Contents/Resources - - cp build/bin/{{.APP_NAME}} {{.APP_NAME}}.app/Contents/MacOS - - cp build/Info.plist {{.APP_NAME}}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{.ARCH}} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{.APP_NAME}}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/test/build/Info.dev.plist b/v3/internal/templates/test/build/Info.dev.plist deleted file mode 100644 index 30ad25883..000000000 --- a/v3/internal/templates/test/build/Info.dev.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - test - CFBundleIdentifier - com.wails.test - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/test/build/Info.plist b/v3/internal/templates/test/build/Info.plist deleted file mode 100644 index c1333dc42..000000000 --- a/v3/internal/templates/test/build/Info.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - test - CFBundleIdentifier - com.wails.test - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/test/build/appicon.png b/v3/internal/templates/test/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/test/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/test/build/icons.icns b/v3/internal/templates/test/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/test/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/test/frontend/README.md b/v3/internal/templates/test/frontend/README.md deleted file mode 100644 index fd6a7082f..000000000 --- a/v3/internal/templates/test/frontend/README.md +++ /dev/null @@ -1 +0,0 @@ -# Wails + Svelte \ No newline at end of file diff --git a/v3/internal/templates/test/frontend/index.html b/v3/internal/templates/test/frontend/index.html deleted file mode 100644 index 1ea50f904..000000000 --- a/v3/internal/templates/test/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Svelte - - -
- - - diff --git a/v3/internal/templates/test/frontend/jsconfig.json b/v3/internal/templates/test/frontend/jsconfig.json deleted file mode 100644 index e596c5823..000000000 --- a/v3/internal/templates/test/frontend/jsconfig.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "Node", - "target": "ESNext", - "module": "ESNext", - /** - * svelte-preprocess cannot figure out whether you have - * a value or a type, so tell TypeScript to enforce using - * `import type` instead of `import` for Types. - */ - "importsNotUsedAsValues": "error", - "isolatedModules": true, - "resolveJsonModule": true, - /** - * To have warnings / errors of the Svelte compiler at the - * correct position, enable source maps by default. - */ - "sourceMap": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - /** - * Typecheck JS in `.svelte` and `.js` files by default. - * Disable this if you'd like to use dynamic types. - */ - "checkJs": true - }, - /** - * Use global.d.ts instead of compilerOptions.types - * to avoid limiting type declarations. - */ - "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"] -} diff --git a/v3/internal/templates/test/frontend/package.json b/v3/internal/templates/test/frontend/package.json deleted file mode 100644 index 2e166feea..000000000 --- a/v3/internal/templates/test/frontend/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^2.0.0", - "svelte": "^3.54.0", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/test/frontend/public/wails.png b/v3/internal/templates/test/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/test/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/test/frontend/src/App.svelte b/v3/internal/templates/test/frontend/src/App.svelte deleted file mode 100644 index 539c395dd..000000000 --- a/v3/internal/templates/test/frontend/src/App.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - -
-
- - - - - - -
-

Wails + Svelte

- -
- -
- -

- Check out SvelteKit, the official Svelte app framework powered by Vite! -

- -

- Click on the Wails and Svelte logos to learn more -

-
- - diff --git a/v3/internal/templates/test/frontend/src/app.css b/v3/internal/templates/test/frontend/src/app.css deleted file mode 100644 index bcc7233dd..000000000 --- a/v3/internal/templates/test/frontend/src/app.css +++ /dev/null @@ -1,81 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -.card { - padding: 2em; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/test/frontend/src/assets/svelte.svg b/v3/internal/templates/test/frontend/src/assets/svelte.svg deleted file mode 100644 index c5e08481f..000000000 --- a/v3/internal/templates/test/frontend/src/assets/svelte.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/test/frontend/src/lib/Counter.svelte b/v3/internal/templates/test/frontend/src/lib/Counter.svelte deleted file mode 100644 index e45f90310..000000000 --- a/v3/internal/templates/test/frontend/src/lib/Counter.svelte +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/v3/internal/templates/test/frontend/src/main.js b/v3/internal/templates/test/frontend/src/main.js deleted file mode 100644 index 8a909a15a..000000000 --- a/v3/internal/templates/test/frontend/src/main.js +++ /dev/null @@ -1,8 +0,0 @@ -import './app.css' -import App from './App.svelte' - -const app = new App({ - target: document.getElementById('app'), -}) - -export default app diff --git a/v3/internal/templates/test/frontend/src/vite-env.d.ts b/v3/internal/templates/test/frontend/src/vite-env.d.ts deleted file mode 100644 index 4078e7476..000000000 --- a/v3/internal/templates/test/frontend/src/vite-env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -/// diff --git a/v3/internal/templates/test/frontend/vite.config.js b/v3/internal/templates/test/frontend/vite.config.js deleted file mode 100644 index d70196943..000000000 --- a/v3/internal/templates/test/frontend/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import { svelte } from '@sveltejs/vite-plugin-svelte' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [svelte()], -}) diff --git a/v3/internal/templates/test/go.mod b/v3/internal/templates/test/go.mod deleted file mode 100644 index 66aecd36b..000000000 --- a/v3/internal/templates/test/go.mod +++ /dev/null @@ -1,45 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/Microsoft/go-winio v0.4.16 // indirect - github.com/bep/debounce v1.2.1 // indirect - github.com/ebitengine/purego v0.4.0-alpha.4 // indirect - github.com/emirpasic/gods v1.12.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.2.0 // indirect - github.com/go-git/go-git/v5 v5.3.0 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect - github.com/leaanthony/go-ansi-parser v1.6.1 // indirect - github.com/leaanthony/u v1.1.0 // indirect - github.com/lmittmann/tint v1.0.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/samber/lo v1.38.1 // indirect - github.com/sergi/go-diff v1.2.0 // indirect - github.com/wailsapp/go-webview2 v1.0.9 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/xanzy/ssh-agent v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.13.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect -) - -replace github.com/wailsapp/wails/v3 => D:\GolandProjects\wails\v3 diff --git a/v3/internal/templates/test/go.sum b/v3/internal/templates/test/go.sum deleted file mode 100644 index 169c421b9..000000000 --- a/v3/internal/templates/test/go.sum +++ /dev/null @@ -1,154 +0,0 @@ -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= -github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5770OhYUVes= -github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.2.0 h1:GcoouCP9J+5slw2uXAocL70z8ml4A8B/H8nEPt6CLPk= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= -github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc= -github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= -github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck= -github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A= -github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU= -github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI= -github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI= -github.com/lmittmann/tint v1.0.0 h1:fzEj70K1L58uyoePQxKe+ezDZJ5pybiWGdA0JeFvvyw= -github.com/lmittmann/tint v1.0.0/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= -github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/wailsapp/go-webview2 v1.0.9 h1:lrU+q0cf1wgLdR69rN+ZnRtMJNaJRrcQ4ELxoO7/xjs= -github.com/wailsapp/go-webview2 v1.0.9/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= -golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/v3/internal/templates/test/main.go b/v3/internal/templates/test/main.go deleted file mode 100644 index 320d41d4c..000000000 --- a/v3/internal/templates/test/main.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "test", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml b/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl b/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/vanilla-ts/build/appicon.png b/v3/internal/templates/vanilla-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/vanilla-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/vanilla-ts/build/icons.icns b/v3/internal/templates/vanilla-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/vanilla-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/vanilla-ts/go.mod.tmpl b/v3/internal/templates/vanilla-ts/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/vanilla-ts/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/vanilla-ts/go.sum.tmpl b/v3/internal/templates/vanilla-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/vanilla-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/vanilla-ts/main.go.tmpl b/v3/internal/templates/vanilla-ts/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/vanilla-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/vanilla/Taskfile.tmpl.yml b/v3/internal/templates/vanilla/Taskfile.tmpl.yml deleted file mode 100644 index dd6041b7c..000000000 --- a/v3/internal/templates/vanilla/Taskfile.tmpl.yml +++ /dev/null @@ -1,138 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - APP_VERSION: "0.1.0" - PRODUCT_NAME: "My Product" - PRODUCT_DESCRIPTION: "My Product Description" - PRODUCT_VERSION: "0.1.0" - PRODUCT_COMPANY: "My Company" - PRODUCT_COPYRIGHT: "(c) 2023 My Company" - PRODUCT_COMMENTS: "My Comments" - PRODUCT_IDENTIFIER: "com.mycompany.myproduct" - BUILD_DIR: "build" - -tasks: - - generate:build-assets: - summary: Generates the build assets - cmds: - - wails3 generate build-assets -dir "{{ "{{.BUILD_DIR}}" }}" -name "{{ "{{.APP_NAME}}" }}" -productname "{{ "{{.PRODUCT_NAME}}" }}" -productdescription "{{ "{{.PRODUCT_DESCRIPTION}}" }}" -productversion "{{ "{{.PRODUCT_VERSION}}" }}" -productcompany "{{ "{{.PRODUCT_COMPANY}}" }}" -productcopyright "{{ "{{.PRODUCT_COPYRIGHT}}" }}" -productcomments "{{ "{{.PRODUCT_COMMENTS}}" }}" -productidentifier "{{ "{{.PRODUCT_IDENTIFIER}}" }}" - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - cmds: - # Generates both .ico and .icns files - - wails3 generate icons -input {{ "{{.BUILD_DIR}}" }}/appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp {{ "{{.BUILD_DIR}}" }}/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp {{ "{{.BUILD_DIR}}" }}/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails3 generate syso -arch {{ "{{.ARCH}}" }} -icon {{ "{{.BUILD_DIR}}" }}/icon.ico -manifest {{ "{{.BUILD_DIR}}" }}/wails.exe.manifest -info {{ "{{.BUILD_DIR}}" }}/info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o "{{ "{{.BUILD_DIR}}" }}"/bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/vanilla/go.mod.tmpl b/v3/internal/templates/vanilla/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/vanilla/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/vanilla/go.sum.tmpl b/v3/internal/templates/vanilla/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/vanilla/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/vanilla/main.go.tmpl b/v3/internal/templates/vanilla/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/vanilla/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/vue-ts/Taskfile.tmpl.yml b/v3/internal/templates/vue-ts/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/vue-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/vue-ts/build/Info.plist.tmpl b/v3/internal/templates/vue-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/vue-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/vue-ts/build/appicon.png b/v3/internal/templates/vue-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/vue-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/vue-ts/build/icons.icns b/v3/internal/templates/vue-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/vue-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/vue-ts/go.mod.tmpl b/v3/internal/templates/vue-ts/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/vue-ts/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/vue-ts/go.sum.tmpl b/v3/internal/templates/vue-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/vue-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/vue-ts/main.go.tmpl b/v3/internal/templates/vue-ts/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/vue-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/vue/Taskfile.tmpl.yml b/v3/internal/templates/vue/Taskfile.tmpl.yml deleted file mode 100644 index f9646a735..000000000 --- a/v3/internal/templates/vue/Taskfile.tmpl.yml +++ /dev/null @@ -1,125 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build:darwin: - summary: Builds the application - platforms: - - darwin - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - - build:windows: - summary: Builds the application for Windows - platforms: - - windows - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o bin/testapp.exe - - task: post-build - - build: - summary: Builds the application - cmds: - - task: build:darwin - - task: build:windows - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - MACOSX_DEPLOYMENT_TARGET: "10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle - - generate:syso: - dir: build - platform: windows - cmds: - - wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: $GOARCH - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - platform: windows - deps: - - generate-icons - cmds: - - task: generate:syso - vars: - ARCH: amd64 - - go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe - - powershell Remove-item wails.syso diff --git a/v3/internal/templates/vue/build/Info.dev.plist.tmpl b/v3/internal/templates/vue/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/vue/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/vue/build/Info.plist.tmpl b/v3/internal/templates/vue/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/vue/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/vue/build/appicon.png b/v3/internal/templates/vue/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/vue/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/vue/build/icons.icns b/v3/internal/templates/vue/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/vue/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/vue/go.mod.tmpl b/v3/internal/templates/vue/go.mod.tmpl deleted file mode 100644 index 3dad9b6fa..000000000 --- a/v3/internal/templates/vue/go.mod.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -module changeme - -go 1.21 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}v3 -{{end}} diff --git a/v3/internal/templates/vue/go.sum.tmpl b/v3/internal/templates/vue/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/vue/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/vue/main.go.tmpl b/v3/internal/templates/vue/main.go.tmpl deleted file mode 100644 index 96c4fd5f0..000000000 --- a/v3/internal/templates/vue/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Assets: application.AssetOptions{ - FS: assets, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -}