chore: bump #439
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| permissions: write-all | |
| on: | |
| push: | |
| jobs: | |
| build__socketconnectionlib: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| override: true | |
| components: rustfmt, clippy | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| tsw-controller-mod/socket-connection-lib/target | |
| key: ${{ runner.os }}_socketconnectionlib_cargo_${{ hashFiles('tsw-controller-mod/socket-connection-lib/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}_socketconnectionlib_cargo_ | |
| - run: | | |
| cd ./tsw-controller-mod/socket-connection-lib | |
| cargo build --release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: socketconnectionlib | |
| path: | | |
| tsw-controller-mod/socket-connection-lib/target/release/*.dll | |
| tsw-controller-mod/socket-connection-lib/target/release/*.lib | |
| tsw-controller-mod/socket-connection-lib/*.h | |
| build__tscmod: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| override: true | |
| components: rustfmt, clippy | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| tsc-controller-mod/tscmod/target | |
| key: ${{ runner.os }}_tscmod_cargo_${{ hashFiles('tsc-controller-mod/tscmod/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}_tscmod_cargo_ | |
| - run: | | |
| cd ./tsc-controller-mod/tscmod | |
| cargo build --release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tscmod | |
| path: | | |
| tsc-controller-mod/tscmod/target/release/tscmod.dll | |
| build__ue4ssmod: | |
| runs-on: windows-2022 | |
| needs: [build__socketconnectionlib] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| # Specifically use MSVC toolset v19.39.33523 | |
| - name: Install VS2022 BuildTools 17.9.7 | |
| run: choco install -y visualstudio2022buildtools --version=117.9.7.0 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --installChannelUri https://aka.ms/vs/17/release/180911598_-255012421/channel" | |
| - name: Setup xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| with: | |
| xmake-version: '2.9.3' | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| RE-UE4SS/.xmake | |
| RE-UE4SS/Binaries | |
| RE-UE4SS/Intermediates | |
| ~/AppData/Local/.xmake | |
| ~/AppData/Local/vcpkg/archives | |
| key: ${{ runner.os }}_ue4ssmod_xmake_${{ hashFiles('RE-UE4SS/**/xmake.lua') }} | |
| - uses: actions/download-artifact@v7 | |
| name: Download socket connection lib | |
| with: | |
| name: socketconnectionlib | |
| path: socketconnectionlib | |
| - name: Copy proxy generator stub | |
| run: | | |
| Copy-Item -Path RE-UE4SS_stub/* -Destination RE-UE4SS -Recurse -Force | |
| Get-ChildItem -File -Recurse -Path RE-UE4SS | |
| - name: Copy custom mod | |
| run: | | |
| Copy-Item -Path "tsw-controller-mod/ue4ss-mod" -Destination "RE-UE4SS/cppmods/TSWControllerMod" -Recurse -Force | |
| Copy-Item -Path "socketconnectionlib/tsw_controller_mod_socket_connection.h" -Destination "RE-UE4SS/cppmods/TSWControllerMod/include/tsw_controller_mod_socket_connection.h" -Force | |
| Copy-Item -Path "socketconnectionlib/target/release/tsw_controller_mod_socket_connection.dll" -Destination "RE-UE4SS/cppmods/TSWControllerMod/lib/tsw_controller_mod_socket_connection.dll" -Force | |
| Copy-Item -Path "socketconnectionlib/target/release/tsw_controller_mod_socket_connection.dll.lib" -Destination "RE-UE4SS/cppmods/TSWControllerMod/lib/tsw_controller_mod_socket_connection.lib" -Force | |
| @" | |
| includes("KismetDebuggerMod") | |
| includes("TSWControllerMod") | |
| "@ | Out-File -FilePath "RE-UE4SS/cppmods/xmake.lua" -Encoding utf8 | |
| - name: Build | |
| run: | | |
| cd ./RE-UE4SS | |
| xmake f -m "Game__Shipping__Win64" -y --ue4ssProxyPath=C:/Windows/System32/dwmapi.dll | |
| xmake build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ue4ssdll | |
| path: RE-UE4SS/Binaries/Game__Shipping__Win64/UE4SS/UE4SS.dll | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ue4ssproxy | |
| path: RE-UE4SS/Binaries/Game__Shipping__Win64/proxy/dwmapi.dll | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tswcontrollermod | |
| path: RE-UE4SS/Binaries/Game__Shipping__Win64/TSWControllerMod/*.dll | |
| build__mod_assets: | |
| runs-on: ubuntu-22.04 | |
| needs: [build__socketconnectionlib, build__ue4ssmod] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v7 | |
| name: Download previously built artifacts | |
| - run: | | |
| mkdir mod_assets | |
| install -D ue4ssproxy/dwmapi.dll mod_assets/dwmapi.dll | |
| install -D ue4ssdll/UE4SS.dll mod_assets/ue4ss_tsw_controller_mod/UE4SS.dll | |
| install -D socketconnectionlib/target/release/tsw_controller_mod_socket_connection.dll mod_assets/ue4ss_tsw_controller_mod/Mods/TSWControllerMod/dlls/tsw_controller_mod_socket_connection.dll | |
| install -D tswcontrollermod/TSWControllerMod.dll mod_assets/ue4ss_tsw_controller_mod/Mods/TSWControllerMod/dlls/main.dll | |
| install -D go-app/embed/mod_assets/ue4ss_tsw_controller_mod/UE4SS-settings.ini mod_assets/ue4ss_tsw_controller_mod/UE4SS-settings.ini | |
| touch mod_assets/ue4ss_tsw_controller_mod/Mods/TSWControllerMod/enabled.txt | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mod_assets | |
| path: mod_assets | |
| build__tscmod_assets: | |
| runs-on: ubuntu-22.04 | |
| needs: [build__tscmod] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v7 | |
| name: Download previously built artifacts | |
| with: | |
| name: tscmod | |
| path: tscmod | |
| - run: find . | |
| - run: | | |
| mkdir tsc_mod_assets | |
| install -D tscmod/tscmod.dll tsc_mod_assets/plugins/tscmod.dll | |
| install -D tsc-controller-mod/proxy/d3d9.dll tsc_mod_assets/d3d9.dll | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tsc_mod_assets | |
| path: tsc_mod_assets | |
| build__goapp__windows: | |
| runs-on: windows-2022 | |
| needs: [build__mod_assets, build__tscmod_assets] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git | |
| .\vcpkg\bootstrap-vcpkg.bat | |
| shell: pwsh | |
| - name: Download SDL2 DLL | |
| shell: pwsh | |
| run: | | |
| $url = "https://github.com/libsdl-org/SDL/releases/download/release-2.32.6/SDL2-2.32.6-win32-x64.zip" | |
| $zipPath = "$PWD/go-app/SDL2.zip" | |
| $extractPath = "$PWD/go-app" | |
| Invoke-WebRequest -Uri $url -OutFile $zipPath | |
| Expand-Archive -Path $zipPath -DestinationPath $extractPath -Force | |
| - name: Install vcpkg dependencies | |
| run: | | |
| cd go-app | |
| ..\vcpkg\vcpkg install | |
| shell: pwsh | |
| - name: Setup Go 1.24.5 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.5 | |
| - name: Install wails | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.10 | |
| - uses: actions/download-artifact@v7 | |
| name: Download mod_assets artifact | |
| with: | |
| name: mod_assets | |
| path: mod_assets | |
| - uses: actions/download-artifact@v7 | |
| name: Download tsc_mod_assets artifact | |
| with: | |
| name: tsc_mod_assets | |
| path: tsc_mod_assets | |
| - run: Copy-Item -Path mod_assets -Destination go-app/embed -Recurse -Force | |
| - run: Copy-Item -Path tsc_mod_assets -Destination go-app/embed -Recurse -Force | |
| - run: Get-ChildItem -File -Recurse -Path "go-app/embed/mod_assets" | |
| - run: | | |
| $env:VERSION=(Get-Content -Path RELEASE_VERSION -First 1) | |
| cd go-app | |
| ./windows_build.ps1 | |
| - run: | | |
| New-Item -ItemType Directory -Path "tswcontrollerapp_windows" | |
| Copy-Item -Path "go-app/build/bin/tsw-controller-app.exe" -Destination "tswcontrollerapp_windows/tsw-controller-app.exe" | |
| Copy-Item -Path "go-app/SDL2.dll" -Destination "tswcontrollerapp_windows/SDL2.dll" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tswcontrollerapp_windows | |
| path: | | |
| tswcontrollerapp_windows/* | |
| - name: Install Inno Setup | |
| run: | | |
| choco install innosetup --no-progress --yes | |
| - name: Compile installer | |
| run: | | |
| $env:VERSION=(Get-Content RELEASE_VERSION)[0] | |
| cd go-app | |
| iscc windows_inno_setup.iss | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tswcontrollerapp_windows_installer | |
| path: | | |
| go-app/Output/tswcontrollerapp-setup.exe | |
| build__goapp__linux: | |
| runs-on: ubuntu-22.04 | |
| needs: [build__mod_assets, build__tscmod_assets] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install SDL2 libraries | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libsdl2-dev libsdl2-2.0-0 | |
| - name: Install RobotGo dependencies | |
| run: | | |
| sudo apt-get install -y libx11-dev xorg-dev libxtst-dev xsel xclip libpng++-dev xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev libgtk-3-dev libwebkit2gtk-4.1-dev | |
| - name: Setup Go 1.24.5 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.5 | |
| - name: Install wails | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.10 | |
| - uses: actions/download-artifact@v7 | |
| name: Download mod_assets artifact | |
| with: | |
| name: mod_assets | |
| path: mod_assets | |
| - uses: actions/download-artifact@v7 | |
| name: Download tsc_mod_assets artifact | |
| with: | |
| name: tsc_mod_assets | |
| path: tsc_mod_assets | |
| - run: cp -r mod_assets go-app/embed; cp -r tsc_mod_assets go-app/embed; | |
| - run: | | |
| VERSION=$(head -n 1 RELEASE_VERSION) | |
| cd go-app | |
| wails build -tags webkit2_41 -ldflags="-X 'main.VERSION=$VERSION'" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tswcontrollerapp_linux | |
| path: | | |
| go-app/build/bin/tsw-controller-app | |
| - run: | | |
| VERSION=$(head -n 1 RELEASE_VERSION) | |
| mkdir tswcontrollerapp_debian_amd64 | |
| mkdir -p tswcontrollerapp_debian_amd64/DEBIAN | |
| mkdir -p tswcontrollerapp_debian_amd64/usr/local/bin | |
| cp go-app/build/bin/tsw-controller-app tswcontrollerapp_debian_amd64/usr/local/bin/ | |
| cat <<EOF > tswcontrollerapp_debian_amd64/DEBIAN/control | |
| Package: tswcontrollerapp | |
| Version: ${VERSION} | |
| Section: utils | |
| Priority: optional | |
| Architecture: amd64 | |
| Depends: libwebkit2gtk-4.1-0, libgtk-3-0, libsdl2-2.0-0 | |
| Maintainer: L Martens <hi@liammartens.com> | |
| Description: TSW Controller App | |
| EOF | |
| dpkg-deb --build tswcontrollerapp_debian_amd64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tswcontrollerapp_linux_debian | |
| path: | | |
| tswcontrollerapp_debian_amd64.deb | |
| build__goapp__macos: | |
| runs-on: macos-latest | |
| needs: [build__mod_assets, build__tscmod_assets] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install SDL2 using Homebrew | |
| run: | | |
| brew update | |
| brew install sdl2 | |
| - name: Setup Go 1.24.5 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.5 | |
| - name: Install wails | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.10 | |
| - uses: actions/download-artifact@v7 | |
| name: Download mod_assets artifact | |
| with: | |
| name: mod_assets | |
| path: mod_assets | |
| - uses: actions/download-artifact@v7 | |
| name: Download tsc_mod_assets artifact | |
| with: | |
| name: tsc_mod_assets | |
| path: tsc_mod_assets | |
| - run: cp -r mod_assets go-app/embed; cp -r tsc_mod_assets go-app/embed | |
| - run: | | |
| VERSION=$(head -n 1 RELEASE_VERSION) | |
| cd go-app | |
| wails build -ldflags="-X 'main.VERSION=$VERSION'" | |
| - run: | | |
| cd go-app | |
| chmod +x build/bin/tsw-controller-app.app/Contents/MacOS/tsw-controller-app | |
| otool -L build/bin/tsw-controller-app.app/Contents/MacOS/tsw-controller-app | |
| mkdir -p build/bin/tsw-controller-app.app/Contents/Frameworks | |
| cp /opt/homebrew/lib/libSDL2-2.0.0.dylib build/bin/tsw-controller-app.app/Contents/Frameworks/libSDL2-2.0.0.dylib | |
| install_name_tool -change /opt/homebrew/opt/sdl2/lib/libSDL2-2.0.0.dylib @executable_path/../Frameworks/libSDL2-2.0.0.dylib build/bin/tsw-controller-app.app/Contents/MacOS/tsw-controller-app | |
| install_name_tool -add_rpath @executable_path/../Frameworks build/bin/tsw-controller-app.app/Contents/MacOS/tsw-controller-app | |
| codesign --force --deep --sign - build/bin/tsw-controller-app.app | |
| otool -L build/bin/tsw-controller-app.app/Contents/MacOS/tsw-controller-app | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tswcontrollerapp_macos | |
| path: | | |
| go-app/build/bin | |
| build__virtual_controller_app: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - working-directory: virtual-controller | |
| run: | | |
| node ./bin/apply-release-version.mjs | |
| - working-directory: virtual-controller | |
| run: | | |
| npm ci | |
| npm run build | |
| npm run cap:sync | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - id: versioning | |
| name: Get version code and name | |
| run: | | |
| export RELEASE_VERSION=$(cat ./RELEASE_VERSION) | |
| export RELEASE_VERSION_MAJOR=$(echo $RELEASE_VERSION | cut -d. -f1) | |
| export RELEASE_VERSION_MINOR=$(echo $RELEASE_VERSION | cut -d. -f2) | |
| export RELEASE_VERSION_PATCH=$(echo $RELEASE_VERSION | cut -d. -f3) | |
| echo VERSION_NAME=$RELEASE_VERSION >> "$GITHUB_OUTPUT" | |
| echo VERSION_CODE=$((RELEASE_VERSION_MAJOR*1000000 + RELEASE_VERSION_MINOR*1000 + RELEASE_VERSION_PATCH)) >> "$GITHUB_OUTPUT" | |
| - name: Build and Sign APK | |
| run: | | |
| cd virtual-controller/android | |
| echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > app/release.keystore | |
| ./gradlew assembleRelease | |
| find app/build/outputs/apk/release | |
| env: | |
| ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| ANDROID_RELEASE_VERSION_CODE: ${{ steps.versioning.outputs.VERSION_CODE }} | |
| ANDROID_RELEASE_VERSION_NAME: ${{ steps.versioning.outputs.VERSION_NAME }} | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tswvirtualcontrollerapp_android | |
| path: virtual-controller/android/app/build/outputs/apk/release/app-release.apk | |
| prerelease: | |
| runs-on: ubuntu-latest | |
| needs: [build__goapp__linux, build__goapp__windows, build__goapp__macos, build__virtual_controller_app] | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| name: Download all artifacts | |
| - name: debug | |
| run: | | |
| find . | |
| - name: Collect all release assets | |
| run: | | |
| mkdir release_assets | |
| cp -r tswcontrollerapp_windows release_assets/tswcontrollerapp_win64_binary | |
| cp tswcontrollerapp_windows_installer/tswcontrollerapp-setup.exe release_assets/tswcontrollerapp_win64_setup.exe | |
| cp tswcontrollerapp_linux/tsw-controller-app release_assets/tswcontrollerapp_linux_amd64_binary | |
| cp tswcontrollerapp_linux_debian/tswcontrollerapp_debian_amd64.deb release_assets/tswcontrollerapp_debian_amd64.deb | |
| mkdir -p release_assets/tswcontrollerapp_macos | |
| cp -r tswcontrollerapp_macos/tsw-controller-app.app release_assets/tswcontrollerapp_macos/tsw-controller-app.app | |
| mkdir -p release_assets/tswvirtualcontrollerapp_android | |
| cp tswvirtualcontrollerapp_android/app-release.apk release_assets/tswvirtualcontrollerapp_android/tswvirtualcontrollerapp_android.apk | |
| cp -r mod_assets release_assets/manual_ue4ss_mod_installation | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: release_assets | |
| path: release_assets |