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

Updated Star Citizen installer and added review note. #211

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SamPurple22
Copy link

@SamPurple22 SamPurple22 commented Mar 5, 2023

Fixes #(issue)

Type of change

  • New installer
  • Manifest fix
  • Other

Whas This Tested Using a Local Repository?

  • Yes
  • No

Updated the manifest for the installer, fixed the following:

  • Use the latest RSI installer version 1.6.5.
  • Install just arial32 fonts, reduces some time to wait for the bottle installation process to finish (instead of all fonts).
  • Install wine mono for .NET, avoids issue with dotnet45 getting stuck on install and also blocking the RSI Installer setup from finishing.
  • Using /S for RSI-Setup-1.6.5.exe, means the installer will install silently and finish, with no auto launch, then it will need to be started from Bottle for first time.

Tested on Debian 12 (bookworm/testing) and Fedora 37 with flatpak Bottles 51.5.

Bugs left:

  • Folder create BUG: RSI Launcher is not able to create the required folders by itself, so the folders need to be created manually before trying to install the game (either LIVE or PTU). This is a RSI Launcher issue. LUG Lutris installation script creates the folders manually when setting up the prefix, see the note in the Review file. If there would be a simple Bottles create_folder action then it would awesome to have this step integrated in the manifest (installer).
  • EAC workaround: which is need to be able to log into the game. Not sure how Bottles should handle this just now, maybe just like LUG Helper, add the line from Review note into /etc/hosts. There are some other workarounds, still looking into this.
  • LUG helper also adds this: sysctl -w vm.max_map_count=16777216 into a /etc/sysctl.d/lug-starcitizen.conf file.

I would like you to merge this, but we first need to at least fix the Folder create BUG somehow. Currently, it's not easy to add a new action to Bottles.

Would it also be possible maybe to present a INFO dialog/window to the user with the steps needed after this installer has been created?

@mirkobrombin
Copy link
Member

Hi, thanks for your contribution. I think the creation of the folders you listed can be automated using one of the following actions:

@SamPurple22
Copy link
Author

Hi Mirko,

Thanks for the input, somehow I glanced over actions from Dependencies but not actions from Installers, while browsing Maintainers Documentation. Folders BUG is done.

  • Could you let me know if there is any way to use the Bottles logging function, to get a nice message: (INFO) something is done from script ?
    I have tried the echo "message" in script: , but I do not see this logged in my Terminal when running the installer.

@mirkobrombin
Copy link
Member

mirkobrombin commented Mar 6, 2023

Hi. It is not possible at the moment, we can implement it in the future. Is the installer ready for review?

@SamPurple22
Copy link
Author

Hi again,

With commit 0359337 I guess it's ready (I have tested it on Debian/Fedora). The installation part itself is really strait forward and works OK so far on my tests.

The run_script parts are HACK and I would personally like to have just one script that performs the required steps, however in the interest of running with Bottles and keeping things in the bottle, I chose this way.

So, the installer will create 3 scripts (because of the way the script: | blob is passed to subprocess.open) inside the !bottle_drive:

  • starcitizen_fix.sh User should run this post install, after the game is actually installed with the RSI Launcher, but not started yet.
  • starcitizen_eac.sh gets called by the fix script (this add a hosts entry inside the bottle and modifies some strings)
  • starcitizen_sysctl.sh gets called by the fix script (this needs to configure vm.max_map_count and runs pkexec for now for root permissions)

Questions/thoughts:

  1. How to let the user know about steps needed post install?
  • For now, add the notes in the installer review file.
  • When using an Installer, the first step should maybe be an information dialog with a continue button, which presents relevant information to the user. The installer review file maybe or that the user needs to perform some other steps post install etc. Maybe even with a toggle that can be activated from installer manifest when it make sense.
  1. Instead of the 3 run_script steps, maybe we could have this "helper script" in the Bottles repository and install it with a download_archive action for example?

  2. run_script needs to be improved, with passing the script Blob as a file better to popen maybe? Maybe add a separate action, write_file, not to be executed by Bottles, but have the exact content (script) so that the user can execute it after?

  3. Add Desktop Entry, creates the .desktop file in .local/share/applications/

  • why the weird name "StarCitizen--Star\ Citizen--1678226111.064794.desktop" ?

  • invalid icon file:

grep Icon .local/share/applications/StarCitizen--Star\ Citizen--1678226111.064794.desktop
Icon=/home/user1/.var/app/com.usebottles.bottles/data/bottles/bottles/StarCitizen/icons/Star Citizen.png

ls /home/user1/.var/app/com.usebottles.bottles/data/bottles/bottles/StarCitizen/icons
starcitizen.png '_Star Citizen.png.ico'

  • the Categories section should have maybe Games for Gaming Bottle category (when you create a new bottle)

Should I report these as new Issues perhaps?

  1. Add a HelperScript section, similar to Executable in the installer manifest, which would allow the user to run a script to perform required tasks on a bottle, after it's been created.
  • For example, after a new update, we need to run the HelperScript again to modify some files, workaround bugs or EAC etc. Easier to call this script from Bottles GUI or perhaps via bottles-cli.

Thanks for your time and feedback.

@mirkobrombin
Copy link
Member

Nice work!

How to let the user know about steps needed post install?
This is not supported yet but it is not complex to add a new page to the installer view.

Instead of the 3 run_script steps, maybe we could have this "helper script" in the Bottles repository and install it with a download_archive action for example?
This can be done extending the run_script to support fetching remote scripts.

Can you open dedicate issues in the main repository for those and the other points?

@SamPurple22
Copy link
Author

Hi Mirko,

Raised two issues from above. Regarding:

Instead of the 3 run_script steps, maybe we could have this "helper script" in the Bottles repository and install it with a download_archive action for example?
This can be done extending the run_script to support fetching remote scripts.

So, maybe improve run_script for installers so it's able to download the script from somewhere, instead of having the maintainer actually write it in the installer?

That means the maintainer needs to upload this script somewhere and make sure it's available and running? Could we use the bottles programs repository here?

Also, specifically to the Star Citizen installer, I am thinking maybe it would be better to improve the actual Star Citizen LUG helper script with Bottles support and use that. I think we need some Bottles support, like being able to find the Bottle name and path via bottles-cli, so that lug-helper.sh can call/use it etc.

@mirkobrombin
Copy link
Member

Hi Mirko,

Raised two issues from above. Regarding:

Instead of the 3 run_script steps, maybe we could have this "helper script" in the Bottles repository and install it with a download_archive action for example?
This can be done extending the run_script to support fetching remote scripts.

So, maybe improve run_script for installers so it's able to download the script from somewhere, instead of having the maintainer actually write it in the installer?

That means the maintainer needs to upload this script somewhere and make sure it's available and running? Could we use the bottles programs repository here?

Also, specifically to the Star Citizen installer, I am thinking maybe it would be better to improve the actual Star Citizen LUG helper script with Bottles support and use that. I think we need some Bottles support, like being able to find the Bottle name and path via bottles-cli, so that lug-helper.sh can call/use it etc.

I was thinking about Github gist plus a hash check

@EvoXCX
Copy link
Contributor

EvoXCX commented May 7, 2023

No more need to use EAC workaround it's working OOB now with latest version of proton.

It's dangerous to apply patch widely it can lead to ban when RSI will reactivate full EAC.

@mactan-sc
Copy link
Contributor

Since version 7-41 Wine GE has had a built in workaround for star citizen EAC where all that needs be done by the client is set environment variable SteamGameId=starcitizen . Would this be able to simplify the bottle installer if the initial runner can be selected?

in my initial changes before discovering this PR i also had done this script line instead based on our Lutris install that at least at a glance appears simpler

  script: |
    cd !bottle_drive
    mkdir -p Program\ Files/Roberts\ Space\ Industries/StarCitizen/{LIVE,PTU}

Unfortunately I believe the game's launcher hangs on an installer dotnetfx45_full_setup.exe, slowing my testing. The install process doesn't seem to recover after killing it. Upon reopening bottles the game's launcher is revealed to be successfully installed and runs though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants