Shogo: Mobile Armor Division (Linux Demo) — Flatpak

- Manifest multiarch i386 (Compat.i386 + GL32 + gamescope)
- Wrapper launcher con EULA dialog GTK3 (persistente), audio PipeWire, saves
- sdl12-compat build i386, risoluzione 1024x768@16, 60fps
- Icona composita (mech + kanji + banner SHOGO, trasparente) 512/256
- icon-build.py (post-processing rembg)
- Cartella flathub-submission pronta per la PR
- install-shogo-demo.sh per PC nuovi
This commit is contained in:
Matteo Benedetto
2026-08-19 22:16:42 +02:00
commit 2703c28c96
22 changed files with 1147 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
# Flathub submission — Shogo: Mobile Armor Division (Linux Demo)
This folder contains everything needed to submit the app to Flathub.
## Files
- `io.github.enne2.ShogoDemo.yml` — Flatpak manifest (multiarch i386, sdl12-compat, gamescope)
- `flathub.json` — restrict builds to x86_64
- `shogo-demo` — launcher wrapper (EULA dialog, gamescope, audio, saves)
- `eula-dialog.c` — GTK3 EULA acceptance dialog (C source, compiled in the manifest)
- `io.github.enne2.ShogoDemo.desktop`
- `io.github.enne2.ShogoDemo.metainfo.xml`
- `icon-256.png`
The demo game data (`shogo-demo-src.tar.gz`, 37 MB) is NOT in this folder: it is
fetched by the build from a public URL (see `io.github.enne2.ShogoDemo.yml`,
source `archive`).
## Prerequisites
1. A **GitHub account** (the app ID `io.github.enne2.ShogoDemo` requires the
repository `github.com/enne2/shogo-demo-flatpak` to exist, or change the ID).
2. A **public URL** hosting `shogo-demo-src.tar.gz`
(SHA256 `dd6b4438c8fa72f04ca74857d11ea9d250eb497720eef5e312523eae43116b9c`),
e.g. `https://enne2.net/pub/shogo-demo-src.tar.gz`.
## Steps
1. **Host the data tarball** at a stable public URL and update
`url:` in the `archive` source of `io.github.enne2.ShogoDemo.yml`.
2. **Create the GitHub repository** `enne2/shogo-demo-flatpak` (public) and
push this folder (manifest, wrapper, sources, icons, README).
3. **Fork** `https://github.com/flathub/flathub` and create a branch from `new-pr`.
4. In the fork, create the folder `io.github.enne2.ShogoDemo/` and add:
- `io.github.enne2.ShogoDemo.yml`
- `flathub.json`
- `shogo-demo` (wrapper)
- `eula-dialog.c`
- `io.github.enne2.ShogoDemo.desktop`
- `io.github.enne2.ShogoDemo.metainfo.xml`
- `icon-256.png` (installed as `io.github.enne2.ShogoDemo.png`)
5. Open a **Pull Request** against the `new-pr` branch with title
`Add io.github.enne2.ShogoDemo`.
6. Flathub's bot will build the app. Reply to review comments and request a
test build with `bot, build` when needed.
## Important notes
- **Flathub policy: manifest, metadata, patch files and PR comments must NOT be
AI-generated.** Review/edit every file manually before submitting.
- **License**: the demo is shareware/proprietary (Monolith Productions /
Hyperion Entertainment). No explicit redistribution EULA was found; the demo
has been freely distributed historically (Open Pandora lists it as
"Redistribute: Allowed"). There is a risk that Flathub rejects or removes the
app. Use at your own discretion.
- `sdl12-compat` is fetched from the upstream Git tag `release-1.2.76` (fixed commit).
## Test locally
```sh
flatpak-builder --user --force-clean --repo=repo build io.github.enne2.ShogoDemo.yml
flatpak install --user -y repo io.github.enne2.ShogoDemo
flatpak run io.github.enne2.ShogoDemo
```
+233
View File
@@ -0,0 +1,233 @@
/* eula-dialog.c — Dialog EULA per Shogo Demo Flatpak
* Compila: gcc eula-dialog.c -o eula-dialog $(pkg-config --cflags --libs gtk+-3.0)
* Exit: 0 = accettato, 1 = rifiutato/chiuso
*/
#include <gtk/gtk.h>
static int accepted = 0;
static void on_accept(GtkWidget *w, gpointer d) { (void)w; (void)d; accepted = 1; gtk_main_quit(); }
static void on_decline(GtkWidget *w, gpointer d) { (void)w; (void)d; accepted = 0; gtk_main_quit(); }
static void on_close(GtkWidget *w, gpointer d) { (void)w; (void)d; accepted = 0; gtk_main_quit(); }
static gboolean on_delete(GtkWidget *w, GdkEvent *e, gpointer d) { (void)w; (void)e; (void)d; accepted = 0; gtk_main_quit(); return TRUE; }
static const char *EULA_TEXT =
"END USER LICENSE AGREEMENT\n"
"==========================\n"
"\n"
"Shogo: Mobile Armor Division - Linux Demo (version 2.1)\n"
"\n"
"Copyright (c) 1998 Monolith Productions, Inc.\n"
"Linux port by Hyperion Entertainment.\n"
"\n"
"This is the official SHAREWARE DEMO version of Shogo:\n"
"Mobile Armor Division. It contains limited demo content\n"
"and is provided free of charge for personal, non-commercial\n"
"evaluation use.\n"
"\n"
"The full version of the game is sold separately. All game\n"
"code, data, artwork, music and other content remain the\n"
"property of Monolith Productions, Inc. and the respective\n"
"rights holders.\n"
"\n"
"This package is provided as-is, without warranty of any\n"
"kind, express or implied, including but not limited to the\n"
"warranties of merchantability or fitness for a particular\n"
"purpose.\n"
"\n"
"By clicking \"I Accept\" you agree to use this demo only for\n"
"personal, non-commercial purposes and to respect the rights\n"
"of the copyright holders.\n";
static const char *SHOGO_CSS =
"window {"
" background-color: #050b13;"
" color: #9fc9c5;"
"}"
".shell {"
" background-color: #07121d;"
" border: 2px solid #c46b22;"
" padding: 14px;"
"}"
".hud-header {"
" background-color: #08263a;"
" border: 2px solid #20c7d5;"
" border-left: 7px solid #ef8b2c;"
" padding: 10px 14px;"
"}"
".hud-title {"
" color: #eafcff;"
" font-family: Sans;"
" font-size: 24px;"
" font-weight: 900;"
" letter-spacing: 2px;"
"}"
".hud-subtitle {"
" color: #39d5df;"
" font-family: Monospace;"
" font-size: 10px;"
" letter-spacing: 1px;"
"}"
".hud-mark {"
" color: #e9812b;"
" font-family: Monospace;"
" font-size: 16px;"
" font-weight: bold;"
"}"
".license-frame {"
" background-color: #061019;"
" border: 1px solid #197a89;"
" border-top: 3px solid #25bdca;"
" padding: 3px;"
"}"
".license-text {"
" background-color: #061019;"
" color: #aac8bd;"
" font-family: Monospace;"
" font-size: 11px;"
" padding: 14px;"
"}"
".status-line {"
" color: #278b97;"
" font-family: Monospace;"
" font-size: 10px;"
"}"
"button {"
" min-width: 112px;"
" min-height: 30px;"
" border-radius: 0;"
" font-family: Sans;"
" font-weight: bold;"
" letter-spacing: 1px;"
" text-shadow: none;"
" box-shadow: none;"
"}"
".decline-button {"
" background: #0b2634;"
" color: #79aab0;"
" border: 1px solid #287381;"
"}"
".decline-button:hover {"
" background: #103747;"
" color: #b6edf0;"
" border-color: #36b6c1;"
"}"
".accept-button {"
" background: #c86620;"
" color: #fff3dc;"
" border: 2px solid #ffad49;"
"}"
".accept-button:hover, .accept-button:focus {"
" background: #ed862a;"
" color: #ffffff;"
" border-color: #ffd073;"
"}"
".accept-button:active { background: #8f4217; }"
"scrollbar { background-color: #071722; }"
"scrollbar slider {"
" background-color: #176878;"
" border-radius: 0;"
" min-width: 8px;"
" min-height: 8px;"
"}";
static void add_class(GtkWidget *widget, const char *class_name) {
gtk_style_context_add_class(gtk_widget_get_style_context(widget), class_name);
}
int main(int argc, char **argv) {
GtkWidget *win, *vbox, *header, *header_text, *title, *subtitle, *mark;
GtkWidget *frame, *sw, *label, *status, *hbox, *b_accept, *b_decline;
GtkCssProvider *css;
gtk_init(&argc, &argv);
/* evita la selezione automatica di tutto il testo quando un label
selezionabile riceve il focus (default GTK: gtk-label-select-on-focus=TRUE) */
g_object_set(gtk_settings_get_default(), "gtk-label-select-on-focus", FALSE, NULL);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(win), "Shogo: Mobile Armor Division - License Agreement");
gtk_window_set_default_size(GTK_WINDOW(win), 560, 480);
gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER);
g_signal_connect(win, "destroy", G_CALLBACK(on_close), NULL);
g_signal_connect(win, "delete-event", G_CALLBACK(on_delete), NULL);
css = gtk_css_provider_new();
gtk_css_provider_load_from_data(css, SHOGO_CSS, -1, NULL);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
GTK_STYLE_PROVIDER(css),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref(css);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
add_class(vbox, "shell");
gtk_container_add(GTK_CONTAINER(win), vbox);
header = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
add_class(header, "hud-header");
gtk_box_pack_start(GTK_BOX(vbox), header, FALSE, FALSE, 0);
header_text = gtk_box_new(GTK_ORIENTATION_VERTICAL, 1);
gtk_box_pack_start(GTK_BOX(header), header_text, TRUE, TRUE, 0);
title = gtk_label_new("SHOGO — MOBILE ARMOR DIVISION");
gtk_label_set_xalign(GTK_LABEL(title), 0.0);
add_class(title, "hud-title");
gtk_box_pack_start(GTK_BOX(header_text), title, FALSE, FALSE, 0);
subtitle = gtk_label_new("LICENSE AGREEMENT // LITH-SYS 98");
gtk_label_set_xalign(GTK_LABEL(subtitle), 0.0);
add_class(subtitle, "hud-subtitle");
gtk_box_pack_start(GTK_BOX(header_text), subtitle, FALSE, FALSE, 0);
mark = gtk_label_new("昇剛 ▸▸▸");
add_class(mark, "hud-mark");
gtk_box_pack_end(GTK_BOX(header), mark, FALSE, FALSE, 0);
frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_NONE);
add_class(frame, "license-frame");
gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_container_add(GTK_CONTAINER(frame), sw);
label = gtk_label_new(EULA_TEXT);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
gtk_label_set_yalign(GTK_LABEL(label), 0.0);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_line_wrap(GTK_LABEL(label), FALSE);
add_class(label, "license-text");
gtk_container_add(GTK_CONTAINER(sw), label);
status = gtk_label_new("▸ SECURE TERMINAL // REVIEW LICENSE AND SELECT AUTHORIZATION STATUS");
gtk_label_set_xalign(GTK_LABEL(status), 0.0);
add_class(status, "status-line");
gtk_box_pack_start(GTK_BOX(vbox), status, FALSE, FALSE, 0);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
b_decline = gtk_button_new_with_label("I Decline");
add_class(b_decline, "decline-button");
g_signal_connect(b_decline, "clicked", G_CALLBACK(on_decline), NULL);
gtk_box_pack_end(GTK_BOX(hbox), b_decline, FALSE, FALSE, 0);
b_accept = gtk_button_new_with_label("I Accept");
add_class(b_accept, "accept-button");
gtk_widget_set_can_default(b_accept, TRUE);
g_signal_connect(b_accept, "clicked", G_CALLBACK(on_accept), NULL);
gtk_box_pack_end(GTK_BOX(hbox), b_accept, FALSE, FALSE, 0);
gtk_widget_grab_default(b_accept);
gtk_widget_show_all(win);
/* focus sul bottone Accept: evita la selezione automatica del testo all'apertura */
gtk_window_set_focus(GTK_WINDOW(win), b_accept);
gtk_main();
return accepted ? 0 : 1;
}
+5
View File
@@ -0,0 +1,5 @@
{
"only-arches": [
"x86_64"
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 KiB

@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Shogo: Mobile Armor Division (Demo)
Comment=Native Linux demo of the classic mecha FPS (Hyperion/LithTech, 1998)
Exec=shogo-demo
Icon=io.github.enne2.ShogoDemo
Terminal=false
Categories=Game;Shooter;
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>io.github.enne2.ShogoDemo</id>
<name>Shogo: Mobile Armor Division (Demo)</name>
<summary>The native Linux demo of the classic 1998 mecha FPS</summary>
<developer_name>Monolith Productions / Hyperion Entertainment</developer_name>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary</project_license>
<description>
<p>Official Linux demo of Shogo: Mobile Armor Division, the mecha first-person shooter developed by Monolith Productions (1998) and ported to Linux by Hyperion Entertainment.</p>
<p>This is the demo version: it includes limited demo levels. The full game is sold separately.</p>
<p>This package uses the SDL 1.2 compatibility layer (sdl12-compat) for audio on PipeWire, and gamescope for fullscreen presentation.</p>
</description>
<url type="homepage">https://www.mobygames.com/game/1141/shogo-mobile-armor-division/</url>
<url type="help">https://github.com/enne2/shogo-demo-flatpak/issues</url>
<launchable type="desktop-id">io.github.enne2.ShogoDemo.desktop</launchable>
<content_rating type="oars-1.1">
<content_attribute id="violence-realistic">moderate</content_attribute>
<content_attribute id="language-profanity">mild</content_attribute>
</content_rating>
<releases>
<release version="2.1.0.02" date="2026-08-19"/>
</releases>
</component>
@@ -0,0 +1,104 @@
id: io.github.enne2.ShogoDemo
runtime: org.freedesktop.Platform
runtime-version: '25.08'
sdk: org.freedesktop.Sdk
command: shogo-demo
sdk-extensions:
- org.freedesktop.Sdk.Compat.i386
- org.freedesktop.Sdk.Extension.toolchain-i386
finish-args:
- --allow=multiarch
- --share=ipc
- --socket=wayland
- --socket=fallback-x11
- --socket=pulseaudio
- --device=dri
- --filesystem=xdg-data/shogo-demo:create
- --env=PATH=/app/bin:/usr/bin:/usr/lib/extensions/vulkan/gamescope/bin
- --env=LD_LIBRARY_PATH=/app/lib32:/app/lib/i386-linux-gnu
add-extensions:
org.freedesktop.Platform.Compat.i386:
directory: lib/i386-linux-gnu
version: '25.08'
org.freedesktop.Platform.Compat.i386.Debug:
directory: lib/debug/lib/i386-linux-gnu
version: '25.08'
no-autodownload: true
org.freedesktop.Platform.GL32:
directory: lib/i386-linux-gnu/GL
version: '1.4'
versions: 25.08;1.4
subdirectories: true
no-autodownload: true
autodelete: false
add-ld-path: lib
merge-dirs: vulkan/icd.d;glvnd/egl_vendor.d;egl/egl_external_platform.d;OpenCL/vendors;lib/dri;lib/d3d;lib/gbm;vulkan/explicit_layer.d;vulkan/implicit_layer.d
download-if: active-gl-driver
enable-if: active-gl-driver
autoprune-unless: active-gl-driver
modules:
- name: eula-dialog
buildsystem: simple
build-commands:
- gcc eula-dialog.c -o eula-dialog $(pkg-config --cflags --libs gtk+-3.0)
- install -Dm755 eula-dialog /app/bin/eula-dialog
sources:
- type: file
path: eula-dialog.c
- name: sdl12-compat
buildsystem: cmake-ninja
builddir: true
build-options:
prepend-pkg-config-path: /app/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig
ldflags: -L/app/lib32
prepend-path: /usr/lib/sdk/toolchain-i386/bin
env:
CC: i686-unknown-linux-gnu-gcc
CXX: i686-unknown-linux-gnu-g++
libdir: /app/lib32
config-opts:
- -DSDL12TESTS=OFF
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_PREFIX_PATH=/usr/lib/i386-linux-gnu
sources:
- type: git
url: https://github.com/libsdl-org/sdl12-compat.git
tag: release-1.2.76
commit: 293b4cbd9eea61b18b9c9425d0c9200bff037360
- name: shogo-demo
buildsystem: simple
build-commands:
- mkdir -p /app/game
- mkdir -p /app/lib/i386-linux-gnu/GL
- mkdir -p /app/lib32
- touch /app/lib/i386-linux-gnu/GL/.keep
- touch /app/lib32/.keep
- cp -r client shogodem.rez de_msg.dll glx.ren soft.ren libfreetype.so.6 libui.so libgtk-1.2.so.0 libgdk-1.2.so.0 libglib-1.2.so.0 libgmodule-1.2.so.0 autoexec.cfg defaults.cfg defkeybd.cfg fonts.cfg DetailHi.cfg DetailLo.cfg DetailMd.cfg console.pcx consolefont.pcx AvonairLight.pfb ShogoLauncher.ini RezList /app/game/
- chmod 755 /app/game/client
- install -Dm755 shogo-demo /app/bin/shogo-demo
- install -Dm644 io.github.enne2.ShogoDemo.desktop /app/share/applications/io.github.enne2.ShogoDemo.desktop
- install -Dm644 io.github.enne2.ShogoDemo.metainfo.xml /app/share/metainfo/io.github.enne2.ShogoDemo.metainfo.xml
- install -Dm644 icon-512.png /app/share/icons/hicolor/512x512/apps/io.github.enne2.ShogoDemo.png
- install -Dm644 icon-256.png /app/share/icons/hicolor/256x256/apps/io.github.enne2.ShogoDemo.png
sources:
- type: archive
url: https://enne2.net/pub/shogo-demo-src.tar.gz
sha256: dd6b4438c8fa72f04ca74857d11ea9d250eb497720eef5e312523eae43116b9c
- type: file
path: shogo-demo
- type: file
path: io.github.enne2.ShogoDemo.desktop
- type: file
path: io.github.enne2.ShogoDemo.metainfo.xml
- type: file
path: icon-512.png
- type: file
path: icon-256.png
+55
View File
@@ -0,0 +1,55 @@
#!/bin/sh
# Shogo: Mobile Armor Division (Linux Demo) - launcher wrapper Flatpak
# Avvia il client i386 in gamescope fullscreen con sdl12-compat (audio PipeWire)
set -eu
export LD_LIBRARY_PATH="/app/lib32:/app/lib/i386-linux-gnu${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export SDL_VIDEODRIVER=x11
export SDL_AUDIODRIVER=pulseaudio
export SDL_AUDIO_DEVICE_SAMPLE_FRAMES=2048
export MESA_EXTENSION_MAX_YEAR=2002
export SHOGODIR=/app/game
export SHOGO_CDROM=/app/game
export SHOGO_MOVIEPATH=/app/game/Movies
# EULA: prima accettazione richiesta, poi persistente
EULA_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/shogo-demo/eula-accepted"
if [ ! -f "$EULA_FILE" ]; then
mkdir -p "$(dirname "$EULA_FILE")"
if /app/bin/eula-dialog; then
touch "$EULA_FILE"
else
echo "License not accepted: Shogo will not start."
exit 1
fi
fi
# User config (as in the historical port launcher script)
mkdir -p "$HOME/.hyperion/Shogo/Save"
[ -f "$HOME/.hyperion/Shogo/ShogoLauncher.ini" ] || cp /app/game/ShogoLauncher.ini "$HOME/.hyperion/Shogo/" 2>/dev/null || true
# User autoexec.cfg with forced resolution/color (the menu lists up to 1024x768 only,
# but the engine accepts higher values via autoexec.cfg / command line)
if [ ! -f "$HOME/.hyperion/Shogo/autoexec.cfg" ]; then
{
echo '"ScreenWidth" "1024"'
echo '"ScreenHeight" "768"'
echo '"MaxFPS" "30"'
echo '"MouseSensitivity" "3.000000"'
} > "$HOME/.hyperion/Shogo/autoexec.cfg"
fi
# Save games in XDG data (writable in the sandbox)
SAVEDIR="${XDG_DATA_HOME:-$HOME/.local/share}/shogo-demo"
mkdir -p "$SAVEDIR/Save"
cd /app/game
RUN="./client +savedirectory \"$SAVEDIR\" -rez shogodem.rez +renderdll glx.ren \
+screenwidth 1024 +screenheight 768 +bpp 16 +Sound16Bit 1 +NumSWVoices 16 \
+DisableSound 0 +DisableMusic 0 +DisableMovies 1 +DisableLightmap 1 \
+EnableTjuncs 1 +EnableMultiTex 1 -conskey 291 +MaxFPS 30"
if command -v gamescope >/dev/null 2>&1; then
exec gamescope -f -w 1024 -h 768 -S fit --force-grab-cursor -r 60 -- /bin/sh -c "$RUN"
else
exec /bin/sh -c "$RUN"
fi