Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] AppImage builds #92

Open
dark-steveneq opened this issue Jun 17, 2024 · 7 comments
Open

[Feature] AppImage builds #92

dark-steveneq opened this issue Jun 17, 2024 · 7 comments
Labels
enhancement New feature or request feature accepted Feature has been accepted help wanted Extra attention is needed

Comments

@dark-steveneq
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The current issue with Linux builds of the launcher is that only 2 distros are currently supported (and also you can't start on Arm without doing something in the terminal but shh).
AppImages are "Linux apps that run anywhere", basically a executable itself is bundled with the dependencies and other files.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
Flatpaks also should do the job but I'd say AppImages seem easier to figure out. We can always

Additional context
There'd no need for SDL, OpenAL and Mono installers since we could bundle these with the launcher instead

@dark-steveneq dark-steveneq added the feature request This is a feature request label Jun 17, 2024
@dark-steveneq
Copy link
Contributor Author

I forgot to mention that Electron Builder has support for AppImages and probably Flatpaks so making such builds should be easy (I hope)

@ItsSim ItsSim added enhancement New feature or request help wanted Extra attention is needed feature accepted Feature has been accepted and removed feature request This is a feature request labels Jun 17, 2024
@ItsSim
Copy link
Owner

ItsSim commented Jun 17, 2024

I forgot to mention that Electron Builder has support for AppImages and probably Flatpaks so making such builds should be easy (I hope)

Currently electron-packager is used so we would need to switch to electron-builder. From a quick search I've seen that AppImages are the more ideal choice:

Feature Flatpak AppImage
Sandboxing Yes No
Portability Limited to Flatpak-supported systems Highly portable across all Linux distributions
Dependencies Includes necessary libraries, uses shared runtimes Bundles all necessary libraries, fully self-contained
Repositories Centralized (e.g., Flathub) Decentralized, distributed by developers
Installation Requires Flatpak support and installation No installation required, just download and run
Updates Delta updates, seamless integration Optional, via AppImageUpdate tool

Additional context
There'd no need for SDL, OpenAL and Mono installers since we could bundle these with the launcher instead

  • The mono .pkg that is run for macOS is north of 300MB, I'm not sure the size of what is installed on Linux, would it be better to bundle it as you suggest instead of just downloading it upon installation as it works now?
  • SDL has been bundled with the macOS extras so I don't think it ever had any use ✅
  • The OpenAL installer is only used on Windows and is hidden for the rest of platforms, how would you go about getting rid of that installer?
  • If any of these dependencies need to be updated, will it require a launcher update? Currently, they are proxied through https://beta.freeso.org/LauncherResourceCentral so they can be changed at any time without a launcher update, and the user can reinstall these dependencies. This is more relevant for dependencies on Windows/macOS, since on Linux it's mostly command-line installs.
  • Did you mean for these to be removed only for the AppImage version (so, Linux) or for all platforms?

Just as a "current situation" overview:

Current Windows installers

Dependency Description Origin
FreeSO FreeSO .zip containing the latest game files Official FreeSO GitHub
The Sims Online Original TSO installer cab files Proxied download from https://beta.freeso.org/LauncherResourceCentral
Remesh Package Zip file containing the remeshes Downloaded from latest fsolauncher GitHub release
OpenAL OpenAL .dll installer Standalone OpenAL installer bundled with the launcher
.NET Framework .NET Framework 4.5 which is what the game needs to run on Windows (I believe this is not needed anymore) Standalone .NET Framework 4.5 web installer bundled with the launcher

Current macOS installers

Dependency Description Origin
FreeSO FreeSO .zip containing the latest game files Official FreeSO GitHub
The Sims Online Original TSO installer cab files Proxied download from https://beta.freeso.org/LauncherResourceCentral
Remesh Package Zip file containing the remeshes Downloaded from latest fsolauncher GitHub release
Mono Mono runtime needed to run the game on macOS Proxied download from https://beta.freeso.org/LauncherResourceCentral
SDL2 SDL2 library (not needed since it's bundled with the macOS extras) Proxied download from https://beta.freeso.org/LauncherResourceCentral
macOS extras Extras needed for the game to work on macOS, extracted to the FreeSO directory during installation Proxied download from https://beta.freeso.org/LauncherResourceCentral

Current Linux installers

Dependency Description Origin
FreeSO FreeSO .zip containing the latest game files Official FreeSO GitHub
The Sims Online Original TSO installer cab files Proxied download from https://beta.freeso.org/LauncherResourceCentral
Remesh Package Zip file containing the remeshes Downloaded from latest fsolauncher GitHub release
Mono Mono runtime needed to run the game on Linux Command line install
SDL2 SDL2 library (not needed since it's bundled with the macOS extras) Command line install
macOS extras Extras needed for the game to work on macOS, extracted to the FreeSO directory during installation Proxied download from https://beta.freeso.org/LauncherResourceCentral

@dark-steveneq
Copy link
Contributor Author

  • SDL has been bundled with the macOS extras so I don't think it ever had any use ✅

Actually its used on Arm Linux

  • The OpenAL installer is only used on Windows and is hidden for the rest of platforms, how would you go about getting rid of that installer?

I mentioned OpenAL as an example of components that aren't necessarily required for an AppImage/portable executable. On an unrelated note, Arm Linux kinda requires an OpenAL installer unless you'd decide to make "PiExtras". My initial idea of solving that was basically rewriting the way installers work to make them "portable" in a way (1 file per installer with all supported OS/architecture combos neatly available) but I decided not to do it since I don't really know the whole codebase and revamps of such a crucial part to me sounds like a waste of time which could be spent on making a new launcher... Anyhow

  • The mono .pkg that is run for macOS is north of 300MB, I'm not sure the size of what is installed on Linux, would it be better to bundle it as you suggest instead of just downloading it upon installation as it works

What I have in mind is tailor-made Mono builds only with .Net 4.5 support since that's what FreeSO uses. I'm not sure if that would be easy or even possible but might be worth a try I guess.

  • Did you mean for these to be removed only for the AppImage version (so, Linux) or for all platforms?)

Only AppImages excluding SDL for Arm Linux.

  • Currently electron-packager is used so we would need to switch to electron-builder. From a quick search I've seen that AppImages are the more ideal choice

Since we'd need to put in the effort to migrate over to electron-builder, we might as well make Flatpak builds for (even) "lazier Steam Deck owners"

@tomgrice
Copy link
Contributor

Might be worth a thought, the way I have been playing FreeSO on Linux (across diff distros) is by installing it in a distrobox container. Works natively and avoids having to deal with different package managers and dependencies.

I think I have it running in an Alpine Linux container so wouldn't be too much overhead I don't think.

@dark-steveneq
Copy link
Contributor Author

So your idea is basically to have everything containerized?

@tomgrice
Copy link
Contributor

Not the entire launcher and game package. I run the FSO client in a distrobox container for ease and portability.

I'm not 100% clued up on the workings of AppImage packages (I did attempt once but gave up reading the docs on that occasion). My impression is that they are standalone packages including all dependencies? Including the full mono runtimes (I think I've always had to at least install the dev package to get FSO running) would be quite cumbersome?

I'm just throwing out ideas but if the launcher is distributed as a Flatpak or AppImage, perhaps the game client could run in a container and fetch the dependencies and extract the freeso client, TSO game files etc on first launch?

@dark-steveneq
Copy link
Contributor Author

dark-steveneq commented Jun 18, 2024

Having FreeSO run in a container is unnecessary since it already works on everything as long as SDL and OpenAL libraries are available (that's how the launcher makes everything work on Arm Linux by pointing MonoGame to system libraries). AppImages/Flatpaks would contain Mono and the launcher itself, though we could also ship things like SDL and other MacExtras files that are absolutely necessary with the launcher since they wouldn't need to change. Making Arm versions of these would also be pretty easy since we could just bundle Arm builds of SDL and OpenAL instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature accepted Feature has been accepted help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants