Code Monkey home page Code Monkey logo

gshade_installer's Introduction

THIS SCRIPT IS BROKEN AND WILL NOT WORK

If you've used this script to install GShade to games previously and you're looking to safely uninstall, please use the delete function of the script to remove all installations of GShade to games (ex., ./gshade_installer.sh delete 1 until there's nothing left to delete), and then delete the entire $XDG_DATA_HOME/GShade directory. (Defaults to $HOME/.local/share/GShade if $XDG_DATA_HOME is not set.)

This will remove all traces of GShade (shaders and presets as well) from your computer and leave your game in a working state.

If it's dead why isn't it archived?

Because I might make reshade_installer.sh instead but I'm not the best scripter so I'm looking for feedback to issues over here.


Original readme archived below.



gshade_installer

This is a CLI GShade installer for Linux. It both downloads and updates GShade and can be used to install / update your GShade installs for individual games that will be run through WINE.

Please note that as of 06-21-22, this installer no longer interacts with WINE directly, as it seems to no longer be necessary. The previous script can be found in the legacy branch.

Getting Started

Once you've got the script and it's executable, you can simply run it. There is a basic menu.

If you would prefer to run the commands directly, the help menu should give you the basics (./gshade_installer.sh --help):

Syntax options:
                                ./gshade_installer.sh                                           -- Guided tutorial
                                ./gshade_installer.sh update [force|presets]                    -- Install / Update to latest GShade.  Optionally force the full update or just presets.
                                ./gshade_installer.sh list                                      -- List games, numbers provided are for use with remove / delete options.
                                ./gshade_installer.sh lang <en|ja|ko|de|fr|it> [default|#]      -- Change the language of GShade's interface.  Defaults to the master copy if unspecified.
                                ./gshade_installer.sh remove <#>                                -- Remove <#> from database, leave GShade in whatever shape it's currently in.
                                ./gshade_installer.sh delete <#>                                -- Delete GShade from <#> and remove from database.
<WINEPREFIX=/path/to/prefix>    ./gshade_installer.sh ffxiv                                     -- Install to FFXIV in provided Wine Prefix or autodetect if no Wine Prefix
 WINEPREFIX=/path/to/prefix     ./gshade_installer.sh [dx(?)|opengl] /path/to/game.exe          -- Install to custom location with designated graphical API version. 'dxgi' is valid here if needed.

                                                                        Note: game.exe should be the GAME'S .exe file, NOT the game's launcher, if it has one!

You can clone the repo and run the script from within it. Instructions to do so are below the prerequisites.

Prerequisites

Universally required:

  • awk, curl, find, hash, ln, perl, sed, unzip, rsync

Additional requirements for Linux:

  • 7z1, md5sum

Additional requirements for Mac:

  • ditto, md5

1 As of 02-23-21, 7z (generally provided by the p7zip package in most distros, p7zip-full on Ubuntu) is also required. If you have a reliable source of the required 32-bit d3dcompiler that doesn't need it, I'm open to removing the requirement, but right now we're using the winetricks method.

Installation

There's multiple ways to run the installer, this is just one method.

  1. Clone the repo: git clone https://github.com/HereInPlainSight/gshade_installer.git
  2. Change directory into it: cd gshade_installer
  3. Run the script: ./gshade_installer.sh

We install to the $XDG_DATA_HOME/GShade/ directory, which defaults to $HOME/.local/share/GShade/.

Updating

When updating GShade through the script (./gshade_installer.sh update or through the guided menu's 1 option), all existing installs are updated if an update is found.

If any of the following seems complicated -- just run ./gshade_installer.sh and follow the guided prompts.

If you're installing GShade for use with FFXIV, you can try the auto-installer by running ./gshade_installer.sh ffxiv, which will search for a default-location Steam install (the default WINE prefix in Steam is $HOME/.steam/steam/steamapps/compatdata/39210/pfx, and the game itself is in $HOME/.steam/steam/steamapps/common/FINAL FANTASY XIV Online/game/), a Lutris install (by looking for a configuration file), the default XLCore location, or by checking a provided WINEPREFIX.

If you wanted to install GShade to a Steam install of FFXIV manually, you would use the following command:

WINEPREFIX="$HOME/.steam/steam/steamapps/compatdata/39210/pfx" ./gshade_installer.sh dx11 "$HOME/.steam/steam/steamapps/common/FINAL FANTASY XIV Online/game/ffxiv_dx11.exe"

If you're having any problems, you can check ./gshade_installer.sh debug, which will print something similar to this: Debug example Green is good. Red indicates an error with that component. Yellow is informational, such as a 'hard install' without symlinks. Neither good nor bad -- just something to be aware of when troubleshooting.

You can get just the games.db list by requesting it with ./gshade_installer.sh list. You can remove an item from the list with ./gshade_installer.sh remove <#>, or delete the GShade installation from the game with ./gshade_installer.sh delete <#>.

If you're having trouble and asking a friend for help, you can use ./gshade_installer.sh debug upload and give your friend the URL. They can use the URL with curl <URL> to see the exact output you would see if you ran the debug yourself.

Troubleshooting

Q: Help, I'm using the default launcher but once I install GShade, the launcher stops launching!

A: Known issue -- with the 32-bit launcher.

  • Lutris: Open XIV's Configure, in the Game Options tab change the Executable from ffxivboot.exe to ffxivboot64.exe.
  • Steam: Open XIV's properties dialog and set your Launch Options to:
    • echo "%command%" | sed 's/ffxivboot.exe/ffxivboot64.exe/' | sh

Q: I'm on a Mac --

A: Anything Mac-related has been contributed by the good people at XIV on Mac. If your question is XIV-specific, you'll almost certainly want to contact them directly.

Help

If you need further help, please check the GPoser's discord for the gshade-troubleshooting channel.

Acknowledgments

  • Thanks to Marot on the GPosers discord for -- absolutely everything they do.

Contributors

If you are a code contributor, please feel free to add yourself to the list during your commit! My memory is roughly sieve-shaped!

gshade_installer's People

Contributors

fleetadmiralbutter avatar hereinplainsight avatar kolakcc avatar maia-everett avatar marzent avatar taylor85345 avatar yaomtc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gshade_installer's Issues

What is the correct way to update GShade and Presets in an already-installed game?

Hi, thank you so much for this script. I'm using it with XLCore and it's working flawlessly! :) GitHub Star +1!

I wonder what the proper way is to update the GShade and the presets via the menu?

./gshade_installer.sh 
Welcome to GShade!  Please select an option:
	1) Check for an update to GShade
	2) Install to a custom game
	P) Update presets
	F) Attempt auto-install for FFXIV
	B) Create a backup of existing GShade game installations
	S) Show games GShade is installed to
	L) Change GShade's language
	R) Remove game from installed games list
	D) Delete GShade from game and remove from list
	0) Redownload compilers
	Q) Quit

I am currently doing these in order:

1) Check for an update to GShade
P) Update presets
F) Attempt auto-install for FFXIV

It's probably overkill, but the menu isn't clear about which ones are supposed to be used for updates. For all I know, maybe F already does a "update GShade and Presets and update the game folder". Heck, maybe Check for update and Update presets also already auto-install, so F is unnecessary.

Without reading the script in depth, I can only speculate what the proper update method is...

Perhaps the text labels in the menu can be rewritten a bit to clarify the update-process without users having to refer to external sources such as this GitHub ticket. :D

Anyway, thanks again for this beautiful installer. I love having it natively handle without needing to use Wine to run the GShade.exe. <3

My experience

Just some suggestions from my own experience with this script.

First, it didn'T work for me. I have a FFXIV install I moved from Windows ('blank' install -- no mods installed) but my install is in ~/Games/ffxiv/drive_c/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/. The install kept on trying to install itself in ~/Games/ffxiv/drive_c/Program Files (x86)/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/.

I ended up opening the script in a file editor and mass-replaced the wrong path with the right path. But figured I'd report my experience.

EDIT: I was using the auto-detect function (F).

xivlauncher no longer launching after install

Hello.
I just ran the installation script for ffxiv. it detected the wineprefix and the game location correctly. the installer said that it installed everything successfully. However since the install, the launcher starts as normal, but it no longer launches the game. the launcher window disappears as normal, but the game window never shows up. I read this is normal with the 32 bit version, but xivlauncher is using the 64 bit version.
I wish I could provide better info, like logs, but I am not sure where to find them or which logs would be relevant. I'll happily provide more information when you tell me which information you need.

Installation Trouble

I'm something of a newb with Gshade and Linux so it will probably be the case that I'm just being stupid but I'm trying to install Gshade on my Pop!_OS system for the game Kingdom Come Deliverance but when I try option 2 (install to a custom game) I input the location of the WINEPREFIX $HOME/.local/share/Steam/steamapps/compatdata/379430/pfx but a message is returned saying that the directory does not exist.

I have a reshade installation in my Kingdom Come folder which I could fall back on but it is currently being overridden by Gshade in-game but there are not settings/presets available because they haven't actually been installed.

I can't physically delete Gshade from my computer because I initially placed the installer in it's current location using root # rather than $

Could anybody give me any advice?

Thanks in advance.

Installing gshade to a steam install running xivlauncher

I'm not sure that currently when you install gshade to a proton prefix this script can deal with the fact that ffxiv might not be located at the default steam ffxiv location c://programfiles....etc etc., for example if you run xivlauncher and set your ffxiv install to somewhere outside of c://

I say this because i tried to install gshade to my prefix and while gshade is installed and works, I can't find the gshade presets

Transition to ReShade status

Since the Developer of GShade got banned and his GitHub got deleted, this script no longer works.
You can archive this now. Good job for making this script.

Game freezes up when clicking update link in About tab

I'm not sure this script can do anything about this issue, but GShade itself doesn't have an issue tracker. I posted this on their Discord too.

I am playing with Proton 5.13-5 via Steam, but I just tested with the FFXIVQuickLauncher version on Lutris and it happens there too. (Weirdly I get constant seconds-long temporary freezes with that which I never saw with Proton. Haven't bothered to troubleshoot that.)

Certainly not an important issue, since the user should already have the script downloaded and has no need to visit the homepage to download the update. But I'm wondering if there could be an easy fix/workaround for this, or is the link making some system call that's unsupported by Wine? Should I file a bug on WineHQ?

ffxiv mode failing to find the game's executable

I've cloned the repo from github and tried to run the ffxiv autodetect, but I get this output:

$ ./gshade_installer.sh ffxiv

Lutris install found!find: ‘/media/poldovico/Games/Lutris/final-fantasy-xiv-online\n''/drive_c’: File or directory does not exist

	Prefix location: /media/poldovico/Games/Lutris/final-fantasy-xiv-online
''
	Game location: 
Install? y
Installing...  ./gshade_installer.sh: riga 476: pushd: $'/media/poldovico/Games/Lutris/final-fantasy-xiv-online\n\'\'': File or directory does not exist

There seems to be a random newline getting in there from somewhere, but I can't figure out where from.

Presets fail to update

It seems like $installDir is not set, since its trys to install to /gshade-presets, which just doesnt seem right

Welcome to GShade!  Please select an option:
        1) Check for an update to GShade
        2) Install to a custom game
        P) Update presets
        F) Attempt auto-install for FFXIV
        B) Create a backup of existing GShade game installations
        S) Show games GShade is installed to
        L) Change GShade's language
        R) Remove game from installed games list
        D) Delete GShade from game and remove from list
        0) Redownload compilers
        Q) Quit
Performing backup...cp: cannot stat '/GShade.ini': No such file or directory
cp: cannot stat '/gshade-presets': No such file or directory
cp: cannot create directory '/gshade-presets': Permission denied
Updating presets...SSL_INIT
SSL_INIT
cp: cannot create directory '/gshade-presets': Permission denied
Done!

FFXIV non-standard Steam locations

I have a very crude script that looks through all Steam install locations to make some symlinks. It's ugly, but maybe you can use some of what's there to make the XIVInstall find FFXIV no matter where it lives?

https://github.com/screwylightbulb/SteamCompatLink

I guess I could submit a PR also, but I don't want to mess with your script. My bash is not great.

EDIT: I have made the change and tested on my own and my partner's systems. Below is the chunk of code that changed:

  # create array of steamdirs first
  steamdirs=("$HOME/.steam/steam")
  readarray -t steamdirs < <(cat ~/.steam/steam/steamapps/libraryfolders.vdf | grep "/" | awk '{ print $2  }' | sed s/\"//g)

  # find the one containing ffxiv
  for dir in "${steamdirs[@]}"; do
    compatdir="${dir}/steamapps/compatdata/39210/pfx"
    if [ -d "${compatdir}" ]; then
      ffxivDir="${dir}"
    fi
  done

  if [ -d "${ffxivDir}/steamapps/common/FINAL FANTASY XIV Online/game/" ] && [ -d "${ffxivDir}/steamapps/compatdata/39210/pfx" ]; then
    WINEPREFIX="${ffxivDir}/steamapps/compatdata/39210/pfx"
    gameLoc="${ffxivDir}/steamapps/common/FINAL FANTASY XIV Online/game/"
    printf "\nSteam install found!\n\tPrefix location: %s\n\tGame location: %s\n" "$WINEPREFIX" "$gameLoc"
    if (yesNo "Install? "); then
        if ( ! yesNo "Use $gapi instead of dxgi?  If you are having issues with GShade when using other overlays (Steam or Discord, for instance), you may wish to try dxgi mode instead." ); then gapi=dxgi; fi
      printf "\nInstalling...  "
      installGame
      printf "Complete!\n"
    fi
  fi

Cannot run the script due to a syntax error

When run, the script gives

user@Linux-PC:~/gshade_installer$ sh gshade_installer.sh 
gshade_installer.sh: 26: Syntax error: "(" unexpected

Script downloaded by cloning the github repo.

printf: `D': invalid format character

$ ./gshade_installer.sh update
Restoring any applicable GShade.ini settings...  ./gshade_installer.sh: line 227: printf: `D': invalid format character
Completed!
GShade-v4.0.0 installed.

$ git describe --all --long
heads/master-0-g6559b8a

It seems that line 227

  confFile=$(printf "$(<$iniFile)")

assumes that the content of $iniFile is a format-string?

Installing using script on Mac M1 Pro

Hey there,

I've been following the guide over at https://github.com/seathasky/FF14-MAC_ModSupport for running XIV over Crossover. I have the game running and am trying to get gshade working using your script per step 5.

Unfortunately I'm hung up on running the script due to:

Creating... The following necessary command(s) could not be found: wine
,%

I have Wine 5.0 installed in addition to Crossover so I'm not sure why there's a wine command missing. Advice?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.