-
Notifications
You must be signed in to change notification settings - Fork 27
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
Linux modding tutorial (Wine, Proton, Lutris)...maybe? #19
Comments
Hi @junglized, Making 7th working on Linux is currently a painful process. If you can manage to make it work under Wine, then you should be good to go on other layers using it. Porting it natively wouldn't make much sense as you'd need Wine to play the game anyway and hooking the Linux memory process would be too cumberstone. Consider trying steps described in here to see if you can make it work: https://appdb.winehq.org/objectManager.php?sClass=version&iId=38203 Let us know if you succeed. Cheers, |
What dependecies are needed (vcredist, dotnet, etc.) to run 7th Heaven at all? I tried launching 7th Heaven in many different ways, it always failed. I wish it was so easy as installing Moguri Mod for FF IX in Steam Proton (and running it with Lutris). Best regards! |
Hi @junglized, Thanks for the reply. I'm sorry but I am no more an active contributor on this project. Therefore I hope someone else will reply to you and be able to help. BR. |
I wish 7th Heaven was tested more thoroughly with Wine (or Steam Proton) on Linux to make it usable for those, who choose this solution over proprietary systems, such as Windows. Best regsrds! |
I stumbled across this, as I was interested in getting modded FF7 running under Linux, as it's my daily driver. Unfortunately, currently there is no way to do so, due to the disc check on launch, due to missing implementation in Mono: https://github.com/mono/mono/blob/bdd772531d379b4e78593587d15113c37edd4a64/mcs/class/corlib/System.IO/DriveInfo.cs#L109 In order to stand a chance in getting it working, you would need to:
For the record, I was able to get as far as this point using the following ( Ubuntu with the Steam FF7 installed ): #!/bin/bash
export WINEPREFIX=/home/${USER}/.local/share/wineprefixes/ff7-7th-heaven
FF7DIR="/home/${USER}/.steam/debian-installation/steamapps/common/FINAL FANTASY VII/" # Assuming a default Steam install here - feel free to change as needed
FHDIR="${WINEPREFIX}/drive_c/Program Files/7th Heaven"
# Add PPA for cdemu
sudo add-apt-repository ppa:cdemu/ppa
sudo apt-get update
sudo apt install cdemu-client -y # Swap for gcdemu if you would rather also have a GUI
# Setup prefix
wine64 wineboot
winetricks dxvk # unsure if needed yet - usually a safe bet for the game itself
winetricks corefonts
winetricks winxp # work around file menus crashing using the Vista+ version
# Install wine-mono - .NET 4.8 in wine is horribly broken
wget https://github.com/madewokherd/wine-mono/releases/download/wine-mono-7.1.1/wine-mono-7.1.1-x86.msi
wine64 msiexec /i wine-mono-7.1.1-x86.msi
rm wine-mono-7.1.1-x86.msi
# Run installer
wget https://files.tsunamods.com/7ThHeavenSetup.exe
wine64 7ThHeavenSetup.exe # The installer will crash at the end, due to being unable to create a shortcut - the core install still works
# make a few dirs that don't exist but show up in the guide
mkdir -p "${FF7DIR}/mods/Textures"
mkdir -p "${FF7DIR}/mods/7th Heaven"
# Load the Disc into cdemu
cdemu load 0 "${FHDIR}/Resources/FF7DISC1.ISO"
# Mount the disc itself, so WINE can auto-detect it
pause
# Run it
wine64 "${WINEPREFIX}/drive_c/Program Files/7th Heaven/7th Heaven.exe"
This would get you as far as launching 7th Heaven and doing basic configuration, but without being able to pass the CD Check, there is very little anyone can do. For the Tsunamods Team: If we were able to get this resolved elsewhere first, would you be open to offering this as an option? I'd be more than willing to spend the time to provide support, to make it happen. |
Okies, so for Linux, I will add a setting that is "DoNotMount" AKA 7th heaven won't attempt to automount the disk. that should get around that problem for you, we should have that as an option anyway so if someone wants they can call a Partition or something else that name and so don't have to have it mounted |
After unsuccessful attempts of running 7th Heaven with Wine or Proton I ditched it and moved to The Reunion installed with Protontricks. Works out of the box. No so many mods to choose from but the most relevant for me - SYW and Ninostyle characters - are present and function without a problem. |
Would you be willing to test the new 7th heaven when it's released it should detect reunion and handle it and launch the version without reunion, and then when the game exits undo the changes so that reunion works again? |
So, in other words, would you like me to try installing it over The Reunion with Steam + Proton version of FF VII (Linux Mint 20.3 + Steam/Proton + FF VII + The Reunion is my current environment/game setup)? |
After getting stuck in this evening & trying to get further - looks like there is more to be done under Wine. I was able to patch my own install locally to return the correct disc label, which got the game launched as a vanilla install. Once you try to add mods, things fall apart around EasyHook. First it needs a If you get past that - FF7 simply crashes. Unsure at this point if its the hooks in 7th Heaven, EasyHook itself or missing stuff in wine / mono.
|
While appreciated, not sure if it's necessary beyond just failing fast. WinCDEmu doesn't seem to work at all in Wine, but have not really had time to look into why The main problem is that the stub simply returns the path. In Wine, this means it would be the drive letter itself - nothing could ever match without fixing / hacking Mono. |
After a bit more experimentation with different launchers, was able to get the base game to load under 7th Heaven without mods. Using Bottles:
At this point, it's using the real .NET 4.8 & a proper Steam install location, so everything runs as a normal Windows install. So far I've only been able to get the game to reliably launch with DX11, so make sure this is selected in the launcher. I don't get any SFX, only the BGM - entirely possible I'm missing some config here, but haven't had time to dig into that in more detail Sadly running with mods doesn't appear to be possible still - as soon as it appears that SHA isn't implemented in WINE 7.2? ( the version used at the time of this comment) Not being familiar with the hooking system being used - is it possible to avoid this? Overall, the game was far more stable - Was able to play through as far as escaping the first reactor, without any real issues, etc. EDIT - typos |
strange because it's listed in the source as being there, https://source.winehq.org/WineAPI/A_SHAFinal.html |
Yeah it's an odd one - May just be seeing a bug in the way it is being handled / called. I'll try to take a look later on in the week, to see if I can narrow it down |
Finally got a break through - the fork of WINE being used was at fault. Switched to a different runner & got it working immediately. Tested a few minutes in with Cosmo Memory & Cosmo FMV without issue. The config I used:
Save this config & import it in Bottles. Should then just be a case of:
EDIT: Missing CD mount step |
Great progress over there! What do you think about creating a Bottle Installer recipe to make it easy for other users? https://maintainers.usebottles.com/installers/Introduction See also https://github.com/bottlesdevs/programs Would be really nice to have 7th Heaven in the list. Thank you in advance! |
Can certainly look into doing one. On the face of it, they don't appear to need to be silent installs, which should make it easier. That said - still need to get Steam to install FF7 in the first place. |
On the face of it - creating the installer might not be practical yet. Given the Steam version appears to be the golden standard for installs & there doesn't appear to be any way to chain installers, it looks like we would have to maintain our own Installer for Steam as part of this. With Bottles releasing experimental support for Steam Proton prefixes - would be interesting to reach out to the devs, to see if there are plans to support this. In our case, all we really need is FF7 + the last bits needed to get 7th heaven. EDIT: typo |
If you're up for it, feel free to approach them and follow up this topic. The easier we manage to get this up and running on Linux, the better. Keep us updated and thank you in advance for the time spent on this! |
Apologies, but I have to interject here a little; I seem to be running into a similar (albeit not identical) issue @sjenkins7 was having with EasyHook. In my case (Arch, Kernel 5.17, KDE 5.42), it's a standalone prefix created specifically for 7H with Lutris (only needs Unfortunately, running with mods fails at EasyHook with 'Code 5'. This has been tried with System (mainline) Wine 7.5, lutris' 7.2 fshack, 6.21 fshack, and GE 7-7; all of which exhibit the same symptoms. I've tried using the same Bottles-sourced fork used in the referenced comments above, but the prefix won't even launch with it using Lutris - and I've too many other Windows/GOG games setup with it to even consider switching frontends. On a related note, the Bottles idea is nice, but it does leave out what's probably a small but existing minority that uses the original 1998 4-CD release. fwiw, it's clearly much less of a hassle to get FF7 running without WineSteam on top of it. |
This was in line with what I saw when putting the notes together. The only way i managed to get it working, was with the bottle's distributed If someone was able to narrow this down, we could figure out where to ask for support, be it a patch in WINE or a fix to a bad hook. At very least we have access to the source of both 7th Heaven & EasyHook, which can help. I can go rummaging around the 7th heaven source and try stuff out, but I'm not sure how much success there would be, as I'm not a WINE or a .NET developer
While I was obviously putting these notes together under the guise of the Steam version, I believe the CD version could be substituted - you wouldn't need to mount the ISO needed for the Steam version, because you already have the original disc. Unfortunately I don't have one to hand to prove either way. |
You could try enabling the The code 5 fix is required even on Windows depending on various circumstances. Unfortunately it's a legacy thing we have from EasyHook and we can't change that, not in the near future. |
This I have tried, but it initially caused 7H to crash outright (Object Not Set to a Reference-type deal). Unfortunately, looking at 7H's source, all the Code 5 fix does is apply a regkey for HiDPI compatibility(?) - a setting that does not apply to Wine at all (it just acts like it's 100% scale). Adding the same reg key path in the prefix gets past the crash, but (ironically) causes the same Code 5 error regardless. And @sjenkins7, my rambling was not intended to frame you in an undesirable spotlight and I hope it didn't come off as such. It is just strange that Bottles' fork specifically is content with EasyHook, but not any other popular upstream/downstream Wine variant - and that it has to seemingly throw a tantrum when used elsewhere outside of its own program driiives me up a small wall. 1MIN EDIT: A small clarification, it seems like only upstream Wine and the TkGlitch Staging fork from Arch User Repository exposes a small black window labeled Wine Debugger for each (what I can only guess is) EasyHook attempt. Lutris' own fork and Wine-GE seem to hide this. Still, no traditional Wine stack trace output to be gathered in my environment. |
Don't worry - wasn't taken as that :) For what it's worth, I used to use Lutris a lot before i rebuilt my setup on Endeavour recently ( after putting the above notes together ). Always intended to swing back around for this - once I have something 100% working all of the time, I can isolate the differences in the prefixes. This might help get things working across the board. Also worth noting the installer logic for Bottles made it into a release. I will take a look at trying to automate as much of the install as I can. EDIT typo |
So from a technical operations standpoint normally if you are getting read errors at 0x0 addresses, the application using the memory addresses does not have application offset applied. Normally Applications in an OS are provided with an offset at the start and all memory addresses are Offset+internal position, Easyhook needs to know the memory offset location for the ff7 exe, and normally windows hold this against the application process (in the process manager) so 7th heaven provides the process ID to EasyHook, EasyHook can then talk to the Windows Process Manager to get it's memory offset if you're getting 0x0 addresses across the board it means this is failing and getting a NULL response as NULL = 0x0, On windows to make any calls to get machine-level information such as memory offset of another application it requires Administrator UAC, I'm not sure how that would translate in Wine. Edit: You could try using an Exclusively x86 build (give me a few min and I will compile it for you) to try Release x86 exclusive.zip - this is a VS build so it does not have version information inside it and will report as version 0.0.0.0, ignore it and update requests |
@sjenkins7 I was using |
Also able to confirm that these additional bits would be enough to get this working on the Steam Deck. In terms of packaging this up nicely ( Flatpak ), we are currently stuck waiting for a stable release of wine ( There are 2 avenues right now:
|
I updated the priority as a reminder for a follow up. Great job there, looking forward to an easy installer. |
Hopefully these kind of things will be less of an issue going forward, as wine shouldn't be able to see the native install in the proposed Flatpak |
May I ask for a recap of this very long thread? It sounds like there have been fully working configurations at a couple points, but it's not super clear what's actually needed at this point. It sounds like the following should be a working configuration. Please correct what's wrong and missing:
|
There are 2 trains ongoing, which is likely where the confusion is coming from. For simplicity sake, I'll focus just on the Canary, as this will eventually become the new stable.
If you have .NET 7.0 installed natively, it may interfere ( see #19 (comment) ) If you wish to use DXVK, bear in mind config is required ( see #19 (comment) ) Please note that generally speaking - closing FF7 will cause the app to hang. Any further talk in here is likely to be about packaging & potentially usable wine versions ( because staging is not available as a Flatpak, which is currently stalling progress ) EDIT: missed a step |
Running 7th Heaven Stable with Bottles: Running 7th Heaven Canary with GE-Proton: |
FWIW, I haven't needed to do any of the noted above Winetricks in the clean prefix I made, apart from But, yeah--other than that, just use a clean prefix with |
I followed you instructions with minor deviations, but I'm afraid 7H crashes with a stack overflow when I try to execute it: Deviations:
If anyone could toss up a .86 download somewhere, I'd appreciate it. Also, do I absolutely need 7H? Is it possible to manually unpack the iro files into FFNx's mod directories and achieve the same result? Or does 7H have some functionality above and beyond what FFNx does? (On further thought, it would probably work better to unpack them elsewhere and then symlink stuff into the FFNx directories. That way I could simulate a "load order" change without having to re-unpack stuff that had been overwritten.) |
7th has an internal way to ensure you load files based on how many mods you load, and there are some dynamic behavior done that mods do use to provide special functionalities. So dropping files manually unfortunately won't make the mods work as you might expect. Related to the 7th version, nothing critical changed between .86 and .89. I suspect the major difference here is Wine. Consider using the version suggested by @sjenkins7 and feel free to join the Discord channels for better support. |
I've just run
I would suggest making sure you use this for now. I'm not aware of any distribution that has decent staging packages beyond this yet. If I get time, it might prove useful for me to understand the staging patching process, so I can narrow down which patch(es) we require, in order to know when we can switch to a normal / stable build. On the face of it, that looks like a pretty big task though, so that will take some time. |
Also checked to make sure, using versions that report as |
Still getting nowhere with 7.22
|
You are using a non-staging release, which is likely why it doesn't work. Need to make sure that If you do not have a distribution that packages this for you, then you will have to build it yourself sadly - As far as I know, the WineHQ website doesn't have premade packages for this |
Yep. That was it. I grabbed the devel binaries by mistake. Always thought devel had the staging patches, though... Guess not.
They've got binaries for at least some distros. Here are the Debian files. (Just use dpkg-deb to extract the two i386 packages to one directory, and the two x86-64 packages to another directory, then cut/paste the x86-64 directory over the top of the i386 one, overwriting conflicts.) I'm seeing 3 bugs right now, none of them fatal:
|
Update FFNx to the latest canary. |
@ChthonVII Assuming you're not using Lutris to set up the prefix, that would be correct. I'm using the Vulkan backend, but another suggested the DX12 backend with VKD3D if you have stability problems. |
I'll close this issue as the hardest part to make it work has now been done and it has been proved to be effective. Anything else regarding Linux packaging and so on will be continued on Discord. Thanks to everyone for the effort in achieving this huge milestone! |
It's not really a bug but rather tutorial request. I'm on Pop!_OS using Lutris for gaming. Everything works just fine. Unfortunately I can't figure out how to run 7th Heaven with any version of FF7. Could anyone provide a simple tutorial on how to mod FF VII with Wine or Steam + Ptoton version?
Thanks a lot!
The text was updated successfully, but these errors were encountered: