singe/INSTALL

117 lines
4.5 KiB
Text

SINGE 3.00
==========
(For the latest version of this document, visit https://kangaroopunch.com!
The full manual is extracted to Singe/Manual.pdf on first run.)
Welcome to Singe! SINGE Is Not a Game Emulator!
INSTALLATION & UPGRADE
======================
For the initial installation, create an empty directory and place the Singe
binary inside it. Run the binary with no command line options to cause it
to generate all the files needed to make Singe work properly. For example:
C:\Singe2\
C:\Singe2\Singe.exe
Once you run Singe.exe you'll see additional files and directories:
C:\Singe2\Singe\ (Several files created in this folder.)
C:\Singe2\Menu.bat (Or .sh on UNIX-ish OSs.)
To install games, simply unpack them and place their directory inside the
directory you created. For example, ActionMax.7z contains a folder named
"ActionMax". Place it here:
C:\Singe2\ActionMax\
For all Singe 2 and later games, it will automatically appear in the menu.
To upgrade, back up any changes you may have made to files inside the Singe
subdirectory that was generated during installation. (You really shouldn't
be changing things in there!) Delete the Singe subdirectory, Menu.bat (or
.sh) and run the new Singe binary with no command line arguments to generate
the new files.
COMMAND LINE
============
Run the binary with -h (or --help) for the option summary. Every option is
described in the "Command Line Options" chapter of Singe/Manual.pdf, which
is extracted on first run.
BUILDING FROM SOURCE
====================
On a Debian based system a checkout builds with one command:
./build-all.sh linux x86_64
It installs the host packages it needs with apt (asks for your sudo
password once), then runs the CMake superbuild, which builds every vendored
library (zlib, zstd, SDL3 and its satellites, OpenSSL, FFmpeg) into
.builddir/<os>/<arch> and then Singe against them. The finished binary is
copied to .builddir/Singe-v<version>-<Os>-<arch>.
Host packages (what build-all.sh installs): build-essential cmake
pkg-config perl nasm llvm imagemagick lua5.4 ffmpeg asciidoctor
ruby-asciidoctor-pdf autoconf automake libtool libasound-dev libxi-dev
libvdpau-dev libva-dev libdrm-dev libgl-dev libx11-dev.
The Linux release build and the Windows build use zig as the compiler:
the build fetches a pinned zig release (version and SHA-256 in
cmake/zig/zig.cmake) into .builddir/toolchains on first use. For Linux it
targets glibc 2.28, so the binary runs on distributions back to Debian 10
and Ubuntu 18.04 while linking the host's platform libraries (X11, ALSA,
VA-API, VDPAU, DRM); for Windows zig carries the headers and import
libraries itself, so nothing else is installed:
./build-all.sh windows x86_64
A developer build with the host's own gcc, glibc and symbols is the
linux-x86_64-gcc preset (binary Singe-v3.00-Linux-x86_64-gcc).
macOS (Apple silicon, macOS 13 or newer) builds with zig too, but needs
an Apple SDK for the frameworks.
Apple only ships it inside Xcode, so by default the build fetches the
MacOSX15.5 SDK tarball from the community mirror osxcross users share
(github.com/joseluisq/macosx-sdks), checks its SHA-256, and unpacks it to
.builddir/toolchains/MacOSX.sdk on first use. To avoid the download,
put a tarball holding a single MacOSX*.sdk directory at
.builddir/toolchains/MacOSX.sdk.tar.xz
(on a Mac with Xcode, osxcross's tools/gen_sdk_package.sh makes exactly
that), or point SINGE_MACOS_SDK at an unpacked SDK. SINGE_MACOS_SDK_URL
and SINGE_MACOS_SDK_SHA256 pick a different mirror. Then:
./build-all.sh macos universal
builds the Apple silicon and Intel presets (macos-aarch64, macos-x86_64)
and joins them with llvm-lipo into Singe-v3.00-Macos-universal. Either
architecture alone is ./build-all.sh macos aarch64 or x86_64.
The Raspberry Pi build (64-bit Raspberry Pi OS, glibc 2.31 or newer)
also uses zig. The platform headers and libraries it links against are
Debian bookworm arm64 packages listed in cmake/zig/piPackages.cmake,
fetched from snapshot.debian.org and unpacked with dpkg-deb into
.builddir/toolchains/sysroot-aarch64-linux-gnu on first use:
./build-all.sh pi aarch64
Useful forms (anything after the platform goes to cmake --build):
./build-all.sh linux x86_64 --target singe Singe alone
./build-all.sh linux x86_64 --target rebuild-ffmpeg redo one library
Without the wrapper:
cmake --preset linux-x86_64 && cmake --build --preset linux-x86_64
Presets: linux-x86_64, linux-x86_64-gcc, windows-x86_64, pi-aarch64,
macos-aarch64 (CMakePresets.json).