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
+20
View File
@@ -0,0 +1,20 @@
# Binari e build
shogo-demo.flatpak
shogo-demo-src.tar.gz
build-shogo/
build-url-test/
.flatpak-builder/
repo/
repo-url-test/
/tmp/
# Immagini intermedie generate
shogo_mech_icon_*.jpg
shogo_logo_*.jpg
shogo_game_icon_*.jpg
icon-mech-t.png
icon-banner-t.png
icon-kanji.png
icon-mech-alpha.png
icon-banner2.png
icon-final.png
check-*.png
+92
View File
@@ -0,0 +1,92 @@
# Shogo: Mobile Armor Division — Linux Demo (Flatpak)
Flatpak package of the **native Linux demo** of *Shogo: Mobile Armor Division*
(mecha FPS by Monolith Productions, 1998; Linux port by Hyperion Entertainment).
## Contents
- Original Linux i386 client (demo v2.1, repackaged by the LIFLG community,
published on repo.openpandora.org by ptitSeb with redistribution allowed)
- Demo data (`shogodem.rez`) and modules (`glx.ren`, `de_msg.dll`, bundled GTK 1.2)
- `sdl12-compat` built for i386 (SDL 1.2 API on SDL2 → audio via PipeWire/PulseAudio)
- gamescope (Flathub extension) for fullscreen presentation
- GTK3 EULA acceptance dialog (shown on first launch, persisted afterwards)
## Local build
```sh
flatpak install -y flathub \
org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08 \
org.freedesktop.Sdk.Compat.i386//25.08 \
org.freedesktop.Sdk.Extension.toolchain-i386//25.08 \
org.freedesktop.Platform.Compat.i386//25.08 \
org.freedesktop.Platform.VulkanLayer.gamescope//25.08
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
```
## Portable bundle (install on other machines)
```sh
flatpak build-bundle repo shogo-demo.flatpak io.github.enne2.ShogoDemo master
```
### Automatic install on a new machine
Copy **two files** to a Linux machine with flatpak installed:
```sh
./install-shogo-demo.sh # (same folder as the bundle)
# or, if the bundle lives elsewhere:
./install-shogo-demo.sh /path/to/shogo-demo.flatpak
```
The script does everything automatically:
1. adds Flathub if missing;
2. installs the Freedesktop 25.08 runtime and extensions:
- `org.freedesktop.Platform.Compat.i386` (32-bit libraries)
- `org.freedesktop.Platform.GL32.default` (32-bit OpenGL libraries)
- `org.freedesktop.Platform.VulkanLayer.gamescope` (gamescope, for fullscreen)
3. installs the game (bundle).
> Note: `flatpak install` of the bundle also fetches missing runtimes/extensions
> from Flathub automatically; the script installs them explicitly to be safe
> (an internet connection and Flathub are still required).
## Usage
- Keyboard: WASD/arrows, mouse to aim (see the game documentation)
- Save games: `~/.local/share/shogo-demo/Save/`
- Config: `~/.hyperion/Shogo/`
- EULA acceptance (persisted): `~/.config/shogo-demo/eula-accepted`
(delete it to show the EULA dialog again)
## License / EULA — IMPORTANT
The demo is **shareware/proprietary** software by Monolith Productions
(Linux port: Hyperion Entertainment). It was freely distributed at the time
and the Open Pandora repo lists it as "Redistribute: Allowed", but **no EULA
text explicitly authorizing redistribution has been found** (a requirement
for Flathub to host third-party binary payloads).
Use the bundle for personal/private use. Publishing on Flathub requires one of:
1. The EULA text of the original demo installer (`ShogoDemo.run`, Hyperion)
allowing copy/redistribution of the demo;
2. Written permission from the rights holders
(Hyperion Entertainment / Interplay / current rights owner);
3. Alternatively: publish only a launcher without game data, with
instructions on how to obtain the demo.
## Credits
- Demo: Monolith Productions / Hyperion Entertainment
- Linux demo repackaging: Team LIFLG, ptitSeb (PND for Open Pandora)
- sdl12-compat: libsdl-org (SDL 1.2 API on SDL2)
- gamescope: ValveSoftware
- Flatpak/modern-Linux adaptation: enne2
+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;
}
+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
+5
View File
@@ -0,0 +1,5 @@
{
"only-arches": [
"x86_64"
]
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 458 KiB

+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env python3
"""Icona Shogo v2: rimozione sfondo con rembg (U2Net) + composizione kanji/mech/banner.
Uso: PYTHONPATH=~/.local/pylibs-rembg python3 icon-build.py
"""
import sys
sys.path.insert(0, '/home/enne2/.local/pylibs-rembg')
from PIL import Image, ImageFilter
from rembg import remove
D = '/home/enne2/Dev/shogo-demo-flatpak'
SRC_MECH = f'{D}/shogo_game_icon_1787156055996.jpg'
SRC_BANNER = f'{D}/shogo_logo_banner_1787156448853.jpg'
# ---------- 1) mech: rimozione sfondo con rembg ----------
print('rembg: rimozione sfondo mech (può richiedere un paio di minuti su CPU)...')
with open(SRC_MECH, 'rb') as f:
inp = f.read()
out = remove(inp)
mech = Image.open(__import__('io').BytesIO(out)).convert('RGBA')
# pulizia: rimuovi eventuali pixel semitrasparenti isolati (opening della maschera alpha)
a = mech.split()[3].point(lambda v: 0 if v < 40 else 255)
mech.putalpha(a)
mech.save(f'{D}/icon-mech-alpha.png')
print('mech alpha:', mech.size)
# ---------- 2) kanji: estrazione dei pixel rosso-scuro (fondale) ----------
src = Image.open(SRC_MECH).convert('RGBA')
px = src.load()
W, H = src.size
kanji = Image.new('RGBA', (W, H), (0, 0, 0, 0))
kp = kanji.load()
for y in range(H):
for x in range(W):
r, g, b, a = px[x, y]
# rosso scuro del kanji: r dominante ma scuro, senza essere arancione acceso del mech
if r > 55 and r < 175 and r > g + 25 and r > b + 25 and a > 100:
kp[x, y] = (r, g, b, 255)
kanji.save(f'{D}/icon-kanji.png')
print('kanji estratto')
# ---------- 3) banner: estrazione e pulizia bordi ----------
bim = Image.open(SRC_BANNER).convert('RGBA')
bp = bim.load()
bw, bh = bim.size
xs, ys = [], []
for y in range(bh):
for x in range(bw):
r, g, b = bp[x, y][:3]
if (r + g + b) / 3 > 40:
xs.append(x); ys.append(y)
x0, x1, y0, y1 = max(0, min(xs)-14), min(bw-1, max(xs)+14), max(0, min(ys)-14), min(bh-1, max(ys)+14)
banner = bim.crop((x0, y0, x1+1, y1+1)).copy()
b2 = banner.load()
bw2, bh2 = banner.size
for y in range(bh2):
for x in range(bw2):
r, g, b = b2[x, y][:3]
if (r + g + b) / 3 <= 40:
b2[x, y] = (0, 0, 0, 0)
# erosione leggera dell'alpha per togliere l'alone
alpha = banner.split()[3].filter(ImageFilter.MinFilter(3))
banner.putalpha(alpha)
banner.save(f'{D}/icon-banner2.png')
print('banner:', banner.size)
# ---------- 4) composizione ----------
C = 1024
canvas = Image.new('RGBA', (C, C), (0, 0, 0, 0))
# kanji dietro, grande, opacità ~28%
k2 = kanji.resize((int(C*0.95), int(C*0.95)), Image.LANCZOS)
k2.putalpha(k2.split()[3].point(lambda v: int(v * 0.28)))
canvas.alpha_composite(k2, ((C-k2.width)//2, (C-k2.height)//2 - int(C*0.02)))
# mech sopra
m = mech.resize((C, C), Image.LANCZOS)
canvas.alpha_composite(m, (0, 0))
# banner in basso
bw3 = int(C * 0.60)
bh3 = int(banner.height * (bw3 / banner.width))
b3 = banner.resize((bw3, bh3), Image.LANCZOS)
canvas.alpha_composite(b3, ((C-bw3)//2, C - bh3 - int(C*0.035)))
canvas.save(f'{D}/icon-final2.png')
print('composta: icon-final2.png', canvas.size)
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
# Installs Shogo: Mobile Armor Division (Linux Demo) Flatpak on a new machine.
# Configures Flathub, installs runtime + extensions (32-bit libs, GL, gamescope)
# and finally the game. Usage: ./install-shogo-demo.sh [path-to-bundle.flatpak]
set -e
BUNDLE="${1:-$(dirname "$0")/shogo-demo.flatpak}"
echo "==> Checking flatpak..."
if ! command -v flatpak >/dev/null 2>&1; then
echo "flatpak not found. Install it first (e.g. Debian/Ubuntu: sudo apt install flatpak)"
exit 1
fi
echo "==> Configuring Flathub (if missing)..."
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
echo "==> Installing runtime and extensions (32-bit libs, GL, gamescope)..."
flatpak install --user -y flathub \
org.freedesktop.Platform//25.08 \
org.freedesktop.Platform.Compat.i386//25.08 \
org.freedesktop.Platform.GL32.default//25.08 \
org.freedesktop.Platform.VulkanLayer.gamescope//25.08
echo "==> Installing the game (bundle)..."
flatpak install --user -y "$BUNDLE"
echo ""
echo "==================================================="
echo "Done! Launch with: flatpak run io.github.enne2.ShogoDemo"
echo "(or from the app menu: 'Shogo: Mobile Armor Division (Demo)')"
echo "==================================================="
+8
View File
@@ -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;
+24
View File
@@ -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>
+103
View File
@@ -0,0 +1,103 @@
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
path: shogo-demo-src.tar.gz
- 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
Executable
+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