Skip to content

Commit

Permalink
Add automated Linux build, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBombSquad committed Apr 8, 2023
1 parent 8b771b4 commit 551dbf8
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 5 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build-for-linux.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
</div>
<div align="center"><strong><i>A F-Zero GX and Super Monkey Ball model editor and viewer</i></strong></div>
<br/>
<div align="center"><img src=https://github.com/TheBombsquad/GxUtils/actions/workflows/build-for-windows.yml/badge.svg></div>
<div align="center"><a href=https://github.com/TheBombSquad/GxUtils/releases/latest><b><i>Download Latest Release - Windows</i></b></a></div>
<div align="center">
<img src=https://github.com/TheBombsquad/GxUtils/actions/workflows/build-for-windows.yml/badge.svg>
<img src=https://github.com/TheBombsquad/GxUtils/actions/workflows/build-for-linux.yml/badge.svg>
</div>
<div align="center"><a href=https://github.com/TheBombSquad/GxUtils/releases/latest><b><i>Download Latest Release - Windows/Linux</i></b></a></div>

## Introduction
<img src=https://user-images.githubusercontent.com/35253266/229385265-ef70de21-29e1-46c4-b8ac-76ceeabbafa8.png width="400" align="right">
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 551dbf8

Please sign in to comment.