Cross-platform client building implemented.
This commit is contained in:
parent
52d99ac126
commit
fb2371f187
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
*DS_Store*
|
||||
fyne-cross
|
||||
.build
|
||||
*.apk
|
||||
*.app
|
||||
dist
|
||||
|
@ -1,6 +1,7 @@
|
||||
Website = "https://bunker.pztrn.name"
|
||||
|
||||
[Details]
|
||||
Icon = "Icon.png"
|
||||
Name = "pztrn's Bunker"
|
||||
ID = "name.pztrn.bunker.client"
|
||||
Icon = "Icon.png"
|
||||
Name = "pztrn's Bunker"
|
||||
ID = "name.pztrn.bunker.client"
|
||||
Build = 1
|
||||
|
@ -41,33 +41,53 @@ tasks:
|
||||
# cmds:
|
||||
# - fyne package -os web --app-id name.pztrn.bunker.client -icon ../../Icon.png --release --name "pztrn's Bunker" --app-version "{{ .CLIENT_VERSION }}" --app-build "{{ .BUILD }}" {{ .MetadataParams }}
|
||||
|
||||
build-darwin-amd64:
|
||||
desc: "Build darwin/arm64 using fyne-cross"
|
||||
build-dist:
|
||||
desc: "Builds windows/amd64, linux/amd64, darwin/arm64, android/arm64 distribution archives."
|
||||
cmds:
|
||||
- task: ::ensure-builddir
|
||||
- task: cleanup
|
||||
- fyne-cross darwin -app-version="{{ .CLIENT_VERSION }}" -app-build="{{ .BUILD }}" -arch=amd64 -category=6007 -pull client/cmd/client
|
||||
- task: build-dist-android-arm64
|
||||
- task: build-dist-darwin
|
||||
- task: build-dist-linux-amd64
|
||||
- task: build-dist-windows-amd64
|
||||
|
||||
build-darwin-arm64:
|
||||
desc: "Build darwin/arm64 using fyne-cross"
|
||||
build-dist-android-arm64:
|
||||
desc: "Build android/arm64 APK file."
|
||||
dir: ./client/cmd/client
|
||||
cmds:
|
||||
- task: ::ensure-builddir
|
||||
- task: cleanup
|
||||
- fyne-cross darwin -app-version="{{ .CLIENT_VERSION }}" -app-build="{{ .BUILD }}" -arch=arm64 -category=6007 -pull client/cmd/client
|
||||
- task: ensure-dist-dir
|
||||
#- fyne-cross android -app-version="{{ .CLIENT_VERSION }}" -app-build="{{ .BUILD }}" -arch=arm64 -pull client/cmd/client
|
||||
- fyne package --release --target=android/arm64 --app-id name.pztrn.bunker.client -icon ../../../Icon.png --name "pztrn's Bunker" --app-version "{{ .CLIENT_VERSION }}" --app-build "{{ .BUILD }}" {{ .MetadataParams }}
|
||||
- mv pztrn_s_Bunker.apk "../../../dist/pztrn's Bunker-{{ .CLIENT_VERSION }}-{{ .BUILD }}-android-arm64.apk"
|
||||
|
||||
build-linux-amd64:
|
||||
build-dist-darwin:
|
||||
desc: "Build darwin (macOS) version."
|
||||
dir: ./client/cmd/client
|
||||
cmds:
|
||||
- task: ensure-dist-dir
|
||||
#- fyne-cross darwin -app-version="{{ .CLIENT_VERSION }}" -app-build="{{ .BUILD }}" -arch=arm64 -category=6007 -pull {{ .MetadataParams }} client/cmd/client
|
||||
- fyne package --release --target=darwin --app-id name.pztrn.bunker.client -executable name.pztrn.bunker.client -icon ../../../Icon.png --name "pztrn's Bunker" --app-version "{{ .CLIENT_VERSION }}" --app-build "{{ .BUILD }}" {{ .MetadataParams }}
|
||||
- tar -czf "pztrn's Bunker-{{ .CLIENT_VERSION }}-{{ .BUILD }}-darwin-arm64.tar.gz" *.app
|
||||
- mv *.tar.gz ../../../dist/
|
||||
|
||||
build-dist-ios:
|
||||
desc: "Build iOS version."
|
||||
dir: ./client/cmd/client
|
||||
cmds:
|
||||
- task: ensure-dist-dir
|
||||
- fyne package --release --target=ios --app-id name.pztrn.bunker.client -icon ../../../Icon.png --name "pztrn's Bunker" --app-version "{{ .CLIENT_VERSION }}" --app-build "{{ .BUILD }}" {{ .MetadataParams }}
|
||||
|
||||
build-dist-linux-amd64:
|
||||
desc: "Build linux/amd64 using fyne-cross"
|
||||
cmds:
|
||||
- task: ::ensure-builddir
|
||||
- task: cleanup
|
||||
- fyne-cross linux -app-id=name.pztrn.bunker.client -app-version="{{ .CLIENT_VERSION }}" -app-build="{{ .BUILD }}" -icon=client/Icon.png -arch=amd64 -name="pztrn's Bunker" -pull client/cmd/client
|
||||
- task: ensure-dist-dir
|
||||
- fyne-cross linux -app-version="{{ .CLIENT_VERSION }}" -app-build="{{ .BUILD }}" -arch=amd64 -pull {{ .MetadataParams }} client/cmd/client
|
||||
- mv "fyne-cross/dist/linux-amd64/pztrn's Bunker.tar.xz" "dist/pztrn's Bunker-{{ .CLIENT_VERSION }}-{{ .BUILD }}-linux-amd64.tar.xz"
|
||||
|
||||
build-windows-amd64:
|
||||
build-dist-windows-amd64:
|
||||
desc: "Build windows/amd64 using fyne-cross"
|
||||
cmds:
|
||||
- task: ::ensure-builddir
|
||||
- task: cleanup
|
||||
- fyne-cross windows -app-id=name.pztrn.bunker.client -app-version="{{ .CLIENT_VERSION }}" -app-build="{{ .BUILD }}" -icon=client/Icon.png -arch=amd64 -name="pztrn's Bunker" -pull client/cmd/client
|
||||
- task: ensure-dist-dir
|
||||
- fyne-cross windows -app-version="{{ .CLIENT_VERSION }}" -app-build="{{ .BUILD }}" -arch=amd64 -pull {{ .MetadataParams }} client/cmd/client
|
||||
- mv "fyne-cross/dist/windows-amd64/pztrn's Bunker.exe.zip" "dist/pztrn's Bunker-{{ .CLIENT_VERSION }}-{{ .BUILD }}-windows-amd64.zip"
|
||||
|
||||
cleanup:
|
||||
desc: "Cleanup build environment."
|
||||
@ -75,6 +95,12 @@ tasks:
|
||||
- rm .build/{{ .ClientBinary }}
|
||||
ignore_error: true
|
||||
|
||||
ensure-dist-dir:
|
||||
desc: "Ensures dist directory in repo root exists."
|
||||
internal: true
|
||||
cmds:
|
||||
- mkdir dist || exit 0
|
||||
|
||||
run:
|
||||
desc: "Launch client."
|
||||
cmds:
|
||||
|
Loading…
x
Reference in New Issue
Block a user