Compare commits

..

8 Commits

Author SHA1 Message Date
s1d3sw1ped
9595f055dd Merge pull request 'lots of things' (#11) from develop into master
Some checks failed
build and test / artifact builds on linux and windows (push) Failing after 1m47s
Reviewed-on: #11
2024-03-10 18:33:44 +00:00
s1d3sw1ped
2b224eeee7 Merge branch 'master' into develop
Some checks failed
pull request validation / build and run tests (pull_request) Has been cancelled
build and test / artifact builds on linux and windows (push) Has been cancelled
2024-03-10 18:33:03 +00:00
875202ceb4 should be working builds
Some checks failed
build and test / artifact builds on linux and windows (push) Has been cancelled
pull request validation / build and run tests (pull_request) Has been cancelled
2024-03-10 13:32:21 -05:00
63c5871275 add version info to window title 2024-03-10 13:31:49 -05:00
4da5f46fdd add disclaimer to README 2024-03-10 13:31:22 -05:00
60e7e9e506 add FyneApp.toml 2024-03-10 13:31:11 -05:00
a9624e532a Merge branch 'develop' of ssh://git.s1d3sw1ped.com:2222/s1d3sw1ped/SwipedModSwitcher into develop
All checks were successful
build and test / build (push) Successful in 2m37s
2024-03-10 10:54:19 -05:00
f5c621f808 see if this makes windows builds work 2024-03-10 10:54:16 -05:00
6 changed files with 79 additions and 23 deletions

View File

@@ -7,6 +7,7 @@ on:
jobs: jobs:
build: build:
name: artifact builds on linux and windows
env: env:
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -23,7 +24,28 @@ jobs:
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
- name: build-linux - name: build-linux
run: GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC=gcc go build -v -ldflags="-s -w -X 'main.Version=${{github.ref_name}}'" -o bin/sw1ped-mod-switcher-${{github.ref_name}}-linux-amd64 run: |
VERSION=${{github.ref_name}}
#- name: build-windows BUILD=${{github.run_number}}
# run: GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw64-gcc go build -v -ldflags="-s -w -X 'main.Version=${{github.ref_name}}'" -o bin/sw1ped-mod-switcher-${{github.ref_name}}-windows-amd64.exe GOOS=windows
GOARCH=amd64
GOFLAGS="-ldflags=-s -ldflags=-w"
CGO_ENABLED=1
CC=gcc
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/swiped-mod-switcher-$VERSION-linux-amd64 main.go
- name: build-windows
run: |
VERSION=${{github.ref_name}}
BUILD=${{github.run_number}}
GOOS=windows
GOARCH=amd64
GOFLAGS="-ldflags=-H=windowsgui -ldflags=-s -ldflags=-w"
CGO_ENABLED=1
CC=x86_64-w64-mingw32-gcc
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/swiped-mod-switcher-$VERSION-windows-amd64.exe main.go
- uses: actions/upload-artifact@v3
with:
name: swiped-mod-switcher-${{github.ref_name}}
path: bin/

View File

@@ -7,7 +7,7 @@ on:
jobs: jobs:
build: build:
name: Build and Test Vulture name: build and run tests
env: env:
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -18,21 +18,29 @@ jobs:
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version-file: 'go.mod' go-version-file: 'go.mod'
- name: setup-dependencies - name: setup dependencies
run: | run: |
apt-get update apt-get update
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
- name: Build - name: build
run: go build -v ./... run: |
- name: Run Tests VERSION=${{github.ref_name}}
BUILD=${{github.run_number}}
GOOS=linux
GOARCH=amd64
GOFLAGS="-ldflags=-s -ldflags=-w"
CGO_ENABLED=1
CC=gcc
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/swiped-mod-switcher-${VERSION}.${BUILD}-linux-amd64 main.go
- name: run tests
run: go test -v ./... run: go test -v ./...
- name: Check Vet - name: Check Vet
run: go vet ./... run: go vet ./...
- name: Check Formatting - name: check formatting
run: |- run: |-
gofmt -s -l . gofmt -s -l .
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Check Lint - name: check lint
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v3
with: with:
version: latest version: latest

View File

@@ -1,9 +1,8 @@
name: release name: release-tag
on:
on:
push: push:
tags: tags:
- '*' - 'v*'
jobs: jobs:
release: release:
@@ -19,13 +18,30 @@ jobs:
run: | run: |
apt-get update apt-get update
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
- name: release-build-linux
run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 's1d3sw1ped/vulture/config.BuildVersion=${{github.ref_name}}'" -o bin/vulture-${{github.ref_name}}-linux-amd64 - name: build-linux
- name: release-build-windows run: |
run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X 's1d3sw1ped/vulture/config.BuildVersion=${{github.ref_name}}'" -o bin/vulture-${{github.ref_name}}-windows-amd64.exe VERSION=${{github.ref_name}}
- name: release-build-darwin BUILD=${{github.run_number}}
run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 's1d3sw1ped/vulture/config.BuildVersion=${{github.ref_name}}'" -o bin/vulture-${{github.ref_name}}-darwin-amd64 GOOS=linux
- name: update-release GOARCH=amd64
GOFLAGS="-ldflags=-s -ldflags=-w"
CGO_ENABLED=1
CC=gcc
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/sw1ped-mod-switcher-${VERSION#v}.${BUILD}-linux-amd64 main.go
- name: build-windows
run: |
VERSION=${{github.ref_name}}
BUILD=${{github.run_number}}
GOOS=windows
GOARCH=amd64
GOFLAGS="-ldflags=-H=windowsgui -ldflags=-s -ldflags=-w"
CGO_ENABLED=1
CC=x86_64-w64-mingw32-gcc
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/sw1ped-mod-switcher-${VERSION#v}.${BUILD}-windows-amd64.exe main.go
- name: add-release-binaries
uses: https://gitea.com/actions/release-action@main uses: https://gitea.com/actions/release-action@main
with: with:
files: |- files: |-

6
FyneApp.toml Normal file
View File

@@ -0,0 +1,6 @@
[Details]
Icon = "icon.png"
Name = "Swiped Mod Switcher"
ID = "com.s1d3sw1ped.swipedmodswitcher"
Version = "untracked"
Build = 1

View File

@@ -28,5 +28,8 @@ the switch is really just a symbolic link so it happens in milliseconds even on
7. Click Reload Mod Profiles and it should display your profile then simply click it to switch to that profile. 7. Click Reload Mod Profiles and it should display your profile then simply click it to switch to that profile.
8. Play your game or create more profiles the choice at this point is yours. 8. Play your game or create more profiles the choice at this point is yours.
## Disclaimer
No testing goes into ensuring the linux builds actually work.
## Virus Warning ## Virus Warning
There are alot of false positives with golang programs if you got a warning for this app it was 99% a false positive however if you believe that it may not be a false positive then either check with virustotal or delete it. there is basically nothing i can do to make your virus scanner not think its a virus and im not spending the years to call or email your virus scanner company to have them fix it. if it really bothers you then do that yourself. There are alot of false positives with golang programs if you got a warning for this app it was 99% a false positive however if you believe that it may not be a false positive then either check with virustotal or delete it. there is basically nothing i can do to make your virus scanner not think its a virus and im not spending the years to call or email your virus scanner company to have them fix it. if it really bothers you then do that yourself.

View File

@@ -6,6 +6,7 @@ import (
"path/filepath" "path/filepath"
"s1d3sw1ped/swipedmodswitcher/admin" "s1d3sw1ped/swipedmodswitcher/admin"
"slices" "slices"
"strconv"
"strings" "strings"
"fyne.io/fyne/v2" "fyne.io/fyne/v2"
@@ -69,7 +70,7 @@ func main() {
cfg = loadConfig() cfg = loadConfig()
ap := app.New() ap := app.New()
wp := ap.NewWindow("Swiped Mod Switcher") wp := ap.NewWindow(ap.Metadata().Name + " v" + ap.Metadata().Version + "." + strconv.Itoa(ap.Metadata().Build))
wp.Resize(fyne.NewSize(600, 1)) wp.Resize(fyne.NewSize(600, 1))
wp.CenterOnScreen() wp.CenterOnScreen()