From 551dbf8b827f5867bd70dba267013affc186d3ad Mon Sep 17 00:00:00 2001 From: The BombSquad <35253266+TheBombSquad@users.noreply.github.com> Date: Sat, 8 Apr 2023 18:30:15 -0400 Subject: [PATCH] Add automated Linux build, update README --- .github/workflows/build-for-linux.yml | 62 +++++++++++++++++++++++++++ README.md | 12 +++--- 2 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build-for-linux.yml diff --git a/.github/workflows/build-for-linux.yml b/.github/workflows/build-for-linux.yml new file mode 100644 index 0000000..767291f --- /dev/null +++ b/.github/workflows/build-for-linux.yml @@ -0,0 +1,62 @@ +name: Build for Linux + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./GxUtils + + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + fetch-depth: 0 + + - name: Build the project + run: msbuild /M /P:Configuration='Release - Mono',DebugSymbols=false,DebugType=None,OutputPath=./out + + - name: Collect artifacts + run: | + mkdir ./artifacts + mkdir ./artifacts/Presets + mkbundle -o ./artifacts/GxModelViewer --simple ./GxModelViewer/out/GxModelViewer.exe -L ./GxModelViewer/out/ --no-machine-config --no-config + mkbundle -o ./artifacts/GxExtender --simple ./GxExtender/out/GxExtender.exe -L ./GxExtender/out/ --no-machine-config --no-config + mkbundle -o ./artifacts/GxLoadSaveTestApp --simple ./GxLoadSaveTestApp/out/GxLoadSaveTestApp.exe -L ./GxLoadSaveTestApp/out/ --no-machine-config --no-config + cp ../CHANGES.txt ./artifacts + cp ../COPYING.txt ./artifacts + cp ../CREDITS.txt ./artifacts + cp ../MiscUtilLicense.txt ./artifacts + cp ../OpenTkLicense.txt ./artifacts + cp ../README.md ./artifacts + tar -czf ../GxUtils-Linux.tar.gz -C ./artifacts . + + - name: Get commit number + id: get_commit_number + run: echo "commit_number=$(git rev-list master --count)" >> $GITHUB_OUTPUT + + - name: Get version number + id: get_version_number + env: + major: "1.0" + seperator: "-" + commit: ${{ steps.get_commit_number.outputs.commit_number }} + run: echo "version_number=$major$seperator$commit" >> $GITHUB_OUTPUT + + - name: Create release + id: create_release + uses: softprops/action-gh-release@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag_name: ${{ steps.get_version_number.outputs.version_number }} + draft: false + prerelease: false + files: | + ./GxUtils-Linux.tar.gz diff --git a/README.md b/README.md index e392ad6..a43c55e 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,11 @@
A F-Zero GX and Super Monkey Ball model editor and viewer

-
-
Download Latest Release - Windows
+
+ + +
+
Download Latest Release - Windows/Linux
## Introduction @@ -48,10 +51,9 @@ Most of these new features are available through the context menus, found by rig The latest version can be downloaded [at this link](https://github.com/TheBombSquad/GxUtils/releases/latest) - or by checking the releases section on the right side of the page. -For Linux users, GX Model Viewer should work on the latest version of Wine without any special setup required. -It can also be built and run using Mono, but all references to `GetConsoleWindow()` need to be commented out first. -Releases including Linux binaries are planned for the future. +Both Windows and Linux binaries are provided. +You can also build it yourself, using Visual Studio on Windows with .NET Framework 4.8 installed, or Mono on Linux. The build process is striaghtforward: on Windows, open the `GxUtils.sln` file in Visual Studio, then build the solution. On Linux, download Mono through your package manager and run either `xbuild` or `msbuild` in the `GxUtils` folder, then check each project for the respective output files. You can also use the Rider IDE to build the project on Linux, if your version of msbuild supoprts .NET Framework 4.8. ## Documentation