mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Initial support for binary packaging
This commit is contained in:
47
.github/workflows/build-tebako.yml
vendored
Normal file
47
.github/workflows/build-tebako.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
name: Build Launcher Binary
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-tebako:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [x64]
|
||||||
|
container:
|
||||||
|
image: ghcr.io/tamatebako/tebako-ubuntu-20.04:latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Gosu and native dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y libsdl2-dev libgl1-mesa-dev libopenal-dev libgmp-dev libfontconfig1-dev libsndfile1-dev libmpg123-dev libpango1.0-dev libtool libssl-dev libffi-dev
|
||||||
|
|
||||||
|
- name: Update Bundler and lockfile
|
||||||
|
run: |
|
||||||
|
gem install bundler -v 2.4.22
|
||||||
|
bundle _2.4.22_ lock --update --bundler
|
||||||
|
|
||||||
|
- name: Build Tebako binary
|
||||||
|
run: |
|
||||||
|
tebako press -P -R 3.4.1 -m bundle -o w3d_hub_linux_launcher -r $PWD -e w3d_hub_linux_launcher.rb
|
||||||
|
|
||||||
|
- name: Prepare artifact directory
|
||||||
|
run: |
|
||||||
|
mkdir w3d-hub-launcher-x86_64
|
||||||
|
cp w3d_hub_linux_launcher w3d-hub-launcher-x86_64/
|
||||||
|
cp -r media w3d-hub-launcher-x86_64/
|
||||||
|
cp -r locales w3d-hub-launcher-x86_64/
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: w3d-hub-launcher-x86_64
|
||||||
|
path: w3d-hub-launcher-x86_64
|
||||||
@@ -20,12 +20,19 @@ class W3DHub
|
|||||||
W3DHUB_DEBUG = ARGV.join.include?("--debug")
|
W3DHUB_DEBUG = ARGV.join.include?("--debug")
|
||||||
W3DHUB_DEVELOPER = ARGV.join.include?("--developer")
|
W3DHUB_DEVELOPER = ARGV.join.include?("--developer")
|
||||||
|
|
||||||
GAME_ROOT_PATH = File.expand_path(".", __dir__)
|
# Use the real working directory as the root for runtime data/logs
|
||||||
|
GAME_ROOT_PATH = Dir.pwd
|
||||||
|
|
||||||
CACHE_PATH = "#{GAME_ROOT_PATH}/data/cache"
|
CACHE_PATH = "#{GAME_ROOT_PATH}/data/cache"
|
||||||
|
LOGS_PATH = "#{GAME_ROOT_PATH}/data/logs"
|
||||||
SETTINGS_FILE_PATH = "#{GAME_ROOT_PATH}/data/settings.json"
|
SETTINGS_FILE_PATH = "#{GAME_ROOT_PATH}/data/settings.json"
|
||||||
APPLICATIONS_CACHE_FILE_PATH = "#{GAME_ROOT_PATH}/data/applications_cache.json"
|
APPLICATIONS_CACHE_FILE_PATH = "#{GAME_ROOT_PATH}/data/applications_cache.json"
|
||||||
|
|
||||||
LOGGER = Logger.new("#{GAME_ROOT_PATH}/data/logs/w3d_hub_linux_launcher.log", "daily")
|
# Ensure data/cache and data/logs exist
|
||||||
|
FileUtils.mkdir_p(CACHE_PATH) unless Dir.exist?(CACHE_PATH)
|
||||||
|
FileUtils.mkdir_p(LOGS_PATH) unless Dir.exist?(LOGS_PATH)
|
||||||
|
|
||||||
|
LOGGER = Logger.new("#{LOGS_PATH}/w3d_hub_linux_launcher.log", "daily")
|
||||||
LOGGER.level = Logger::Severity::DEBUG # W3DHUB_DEBUG ? Logger::Severity::DEBUG : Logger::Severity::WARN
|
LOGGER.level = Logger::Severity::DEBUG # W3DHUB_DEBUG ? Logger::Severity::DEBUG : Logger::Severity::WARN
|
||||||
|
|
||||||
LOG_TAG = "W3DHubLinuxLauncher"
|
LOG_TAG = "W3DHubLinuxLauncher"
|
||||||
|
|||||||
Reference in New Issue
Block a user