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

Linux modding tutorial (Wine, Proton, Lutris)...maybe? #19

Closed
junglized opened this issue Jun 26, 2021 · 118 comments
Closed

Linux modding tutorial (Wine, Proton, Lutris)...maybe? #19

junglized opened this issue Jun 26, 2021 · 118 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request priority/P1 likely to affect end users
Milestone

Comments

@junglized
Copy link

junglized commented Jun 26, 2021

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!

@julianxhokaxhiu
Copy link
Member

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,
Julian

@junglized
Copy link
Author

junglized commented Oct 28, 2021

Hi @julianxhokaxhiu

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!

@julianxhokaxhiu
Copy link
Member

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.

@junglized
Copy link
Author

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!

@sjenkins7
Copy link

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:

  1. Get this VolumeLabel implemented in Mono for Windows
  2. Push for this to be released in both Mono & wine-mono

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.

@barkermn01
Copy link
Member

# Load the Disc into cdemu
cdemu load 0 "${FHDIR}/Resources/FF7DISC1.ISO"
# Mount the disc itself, so WINE can auto-detect it
pause

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

@junglized
Copy link
Author

junglized commented Feb 7, 2022

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.

@barkermn01
Copy link
Member

unsuccessful attempts of running 7th Heaven with Wine or Proton I ditched it and moved to The Reunion

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?

@junglized
Copy link
Author

unsuccessful attempts of running 7th Heaven with Wine or Proton I ditched it and moved to The Reunion

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)?

@sjenkins7
Copy link

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 aSystem.Runtime.Remoting.Channels.Ipc.IpcServerChannel constructor that is missing from the Mono distribution.

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.

23:24:30|INFO|SeventhHeaven.Classes.GameLauncher|Copying EasyHook.dll to FF7 path (if not found or older version detected) ...
23:24:30|INFO|SeventhHeaven.Classes.GameLauncher|       skipped copying EasyHook.dll ...
23:24:30|INFO|SeventhHeaven.Classes.GameLauncher|       skipped copying EasyHook32.dll ...
23:24:30|INFO|SeventhHeaven.Classes.GameLauncher|Checking if Reunion mod is installed ...
23:24:30|INFO|SeventhHeaven.Classes.GameLauncher|       found: False
23:24:30|INFO|SeventhHeaven.Classes.GameLauncher|Launching additional programs to run (if any) ...
23:24:31|INFO|SeventhHeaven.Classes.GameLauncher|Writing temporary runtime profile file to C:\users\simon\Temp\tmp7e19183.tmp ...
23:24:31|INFO|SeventhHeaven.Classes.GameLauncher|Attempting to inject with EasyHook ...
23:25:24|WARN|SeventhHeaven.Classes.GameLauncher|       received errors: STATUS_INTERNAL_ERROR: Unknown error in injected assembler code. (Code: 5);  ...

image

@sjenkins7
Copy link

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

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.

@sjenkins7
Copy link

sjenkins7 commented Mar 1, 2022

After a bit more experimentation with different launchers, was able to get the base game to load under 7th Heaven without mods.

Using Bottles:

  • Create New Gaming Bottle
  • Install Steam under "Installers"
  • Install dotnet48 under "Dependencies"
  • Enable "use bottles runtime" under "Preferences"
  • Downgrade DXVK to 1.8.1 under "Preferences" ( to avoid graphical glitches that will make install difficult )
  • Install FF7 via Steam
  • Run 7H Installer via "Run Executable"
  • Mount CD as before ( if you are using the Flatpak version of Bottles, you need to make sure it has permission to access the disk )

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 EasyHook gets involved, the game crashes (albeit with a different stack trace this time):
image

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

@barkermn01
Copy link
Member

it appears that SHA isn't implemented in WINE 7.2? ( the version used at the time of this comment)

strange because it's listed in the source as being there, https://source.winehq.org/WineAPI/A_SHAFinal.html

@sjenkins7
Copy link

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

@julianxhokaxhiu julianxhokaxhiu added the priority/P3 edge case label Mar 3, 2022
@sjenkins7
Copy link

sjenkins7 commented Mar 5, 2022

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:

Arch: win64
Creation_Date: '2022-03-05 12:15:48.176125'
Custom_Path: false
DLL_Overrides: {}
DXVK: dxvk-1.9.4
Environment: Gaming
Environment_Variables: {}
Installed_Dependencies:
- dotnet40
- dotnet48
- d3dx9
- msls31
- riched20
- allfonts
- d3dcompiler_43
- d3dcompiler_47
- vcredist2019
Latest_Executables: []
NVAPI: dxvk-nvapi-v0.5.2
Name: 7th Heaven
Parameters:
    aco_compiler: false
    custom_dpi: 96
    discrete_gpu: true
    dxvk: true
    dxvk_hud: false
    dxvk_nvapi: false
    fixme_logs: false
    fsr: false
    fsr_level: 5
    fullscreen_capture: false
    gamemode: false
    gamescope: false
    gamescope_borderless: false
    gamescope_fps: 0
    gamescope_fps_no_focus: 0
    gamescope_fullscreen: true
    gamescope_game_height: 0
    gamescope_game_width: 0
    gamescope_scaling: false
    gamescope_window_height: 0
    gamescope_window_width: 0
    pulseaudio_latency: true
    sync: esync
    take_focus: false
    use_runtime: true
    virtual_desktop: false
    virtual_desktop_res: 1280x720
    vkd3d: false
Path: 7th-Heaven
Runner: vaniglia-6.23
State: 9
Uninstallers:
    allfonts: false
    d3dcompiler_43: false
    d3dcompiler_47: false
    d3dx9: false
    dotnet40: Microsoft .NET Framework 4 Extended
    dotnet48: true
    msls31: false
    riched20: false
    vcredist2019: true
Update_Date: '2022-03-05 13:18:20.710904'
VKD3D: vkd3d-proton-2.5
Versioning: true
Windows: win10
WorkingDir: ''

Save this config & import it in Bottles. Should then just be a case of:

  • Install Steam
  • Install FF7
  • Disable DXVK ( for the duration of setting up 7th Heaven )
  • Install 7th Heaven
  • Configure Mods & set DX11
  • Mount CD
  • Enable DXVK ( only when you intend to play )

and enjoy:
image

EDIT: Missing CD mount step

@julianxhokaxhiu
Copy link
Member

julianxhokaxhiu commented Mar 5, 2022

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!

@sjenkins7
Copy link

What do you think about creating a Bottle Installer recipe to make it easy for other users? https://maintainers.usebottles.com/installers/Introduction

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.

@sjenkins7
Copy link

sjenkins7 commented Mar 7, 2022

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

@julianxhokaxhiu
Copy link
Member

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!

@SeongGino
Copy link

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 dotnet48 vcrun2019) so I've gotten to the point of the mod manager running and detecting/configuring mods, and running vanilla FF7 works as well (Game Driver/FFNx Stable set to use Vulkan, and the prefix has a virtual D:\ set to a random directory and given the label FF7DISC1).
2022_04-04 01-37-54

Unfortunately, running with mods fails at EasyHook with 'Code 5'.
2022_04-04 01-37-13
But there is no visible Wine crash/debugger window appearing, and running the instance from a terminal gives the most generic and least helpful line prints I've ever seen.
2022_04-04 02-24-15

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.

@sjenkins7
Copy link

sjenkins7 commented Apr 4, 2022

Unfortunately, running with mods fails at EasyHook with 'Code 5'.

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 vaniglia variant. Anything else tripped with this same error & a crash of the FF7 process. It's odd that you aren't getting the debugger show up though

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

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

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.

@julianxhokaxhiu
Copy link
Member

You could try enabling the Code 5 Fix flag in Settings -> Game Launcher and see how it goes.

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.

@SeongGino
Copy link

SeongGino commented Apr 4, 2022

You could try enabling the Code 5 Fix flag in Settings -> Game Launcher and see how it goes.

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.

@sjenkins7
Copy link

sjenkins7 commented Apr 5, 2022

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.

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

@barkermn01
Copy link
Member

barkermn01 commented Apr 5, 2022

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:
Oh I just thought this could be because of AnyCPU configuration, Linux does not have AnyCPU it has, x86 (as i386), x64 as amd64, it could be it does not know how to translate the AnyCPU instructions which are x86 using x64 CPU calls where it can, I know with Debian i have to use
multi-arch for 32-bit apps on an x64 Distro,

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

@SeongGino
Copy link

@sjenkins7 I was using .61; I guess I just missed on those fixes from the work I'd been doing the past couple of weeks. Good to know!

@sjenkins7
Copy link

Was able to get this working on the latest canary (.86). Make sure you configure dinput correctly

# install dinput native DLL
winetricks dinput

to make sure - go into winecfg and set dinput to be native

image

@sjenkins7
Copy link

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 ( 7.0.1 is the current & doesn't work at all )

There are 2 avenues right now:

@julianxhokaxhiu julianxhokaxhiu added priority/P1 likely to affect end users and removed priority/P3 edge case labels Jan 14, 2023
@julianxhokaxhiu
Copy link
Member

I updated the priority as a reminder for a follow up. Great job there, looking forward to an easy installer.

@SeongGino
Copy link

SeongGino commented Jan 14, 2023

Please advise on how to resolve this popup when attempting to start modded FF7 on latest canary & wine-staging *with a Linux native .NET 7.0.x instance installed on the host.
2023_01-14 Error-123958
Aside from dinput through Winetricks, prefix is only using what 7H canary installer provides.

CLARIFICATION: this resolved itself after uninstalling any dotnet related native packages from my system; however, one of my (unrelated) apps has dependence on native .NET, so the environment variable that directs to the native Linux versions of the packages throws Wine off. This was a problem I have come across with Vortex Mod Manager in the past, which had the exact same issue of detecting Wine's .NET despite it being installed properly until I force-fed it the proper path in the prefix rather than my host system (though this resolved itself as the native instance turned over to .NET 7, while Vortex continues to use .NET Desktop 6.x)
Seems like 7H is unable to find the 32-bit half of .NET 7.0.1, hence the error in launching w/ mods despite being able to run the launcher.

@sjenkins7
Copy link

Seems like 7H is unable to find the 32-bit half of .NET 7.0.1, hence the error in launching w/ mods despite being able to run the launcher.

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

@ChthonVII
Copy link

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:

  • Wine staging 8.0rc4 (official build)
  • 64-bit wine prefix?
  • 7th Heaven canary .86
  • native dinput via winetricks
  • native dotnet4 and 48 via winetricks?
  • Unclear which things mentioned in the March post are still needed

@sjenkins7
Copy link

sjenkins7 commented Jan 15, 2023

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.

  • Wine-staging 7.22
  • 64-bit prefix
  • 7th Heaven Canary (.86)
  • the following installed via winetricks:
    winetricks -q d3dx9
    winetricks -q msls31
    winetricks -q riched20
    winetricks -q corefonts
    winetricks -q d3dcompiler_43
    winetricks -q d3dcompiler_47
    winetricks -q dinput
  • .NET Desktop Runtime 7.0.1+ ( both x64 & x86 versions)
  • VC Runtime ( this should be auto-installed when launching 7th Heaven ) - both x86 & x64 versions
  • Virtual CD configured ( make sure it is explicitly marked as a CD-ROM in winecfg ):
    mkdir -p "${WINEPREFIX}/drive_c/FF7DISC1"
    echo "FF7DISC1" > "${WINEPREFIX}/drive_c/FF7DISC1/.windows-label"
    echo "44000000" > "${WINEPREFIX}/drive_c/FF7DISC1/.windows-serial"
    touch "${WINEPREFIX}/drive_c/FF7DISC1/FF7DISC1.TXT"
    ln -sfv "${WINEPREFIX}/drive_c/FF7DISC1" "${WINEPREFIX}/dosdevices/x:"

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

@dotaxis
Copy link

dotaxis commented Jan 15, 2023

Running 7th Heaven Stable with Bottles:
https://www.youtube.com/watch?v=ZtZNSPygxyY

Running 7th Heaven Canary with GE-Proton:
https://www.youtube.com/watch?v=Wfh-pE_TvGw

@SeongGino
Copy link

SeongGino commented Jan 15, 2023

* the following installed via winetricks:
    winetricks -q d3dx9
    winetricks -q msls31
    winetricks -q riched20
    winetricks -q corefonts
    winetricks -q d3dcompiler_43
    winetricks -q d3dcompiler_47
    winetricks -q dinput

FWIW, I haven't needed to do any of the noted above Winetricks in the clean prefix I made, apart from dinput - the prereqs provided from/installed by the Canary installer (and having no native Linux .NET 7 install) makes it work out of the box with either Wine-GE or Wine-Staging (with just the former crashing the catalog downloader module for whatever reason, at least until it's updated?). Though this is on Lutris w/ DXVK & VKD3D installed in the prefix.

But, yeah--other than that, just use a clean prefix with dinput, install 7H using the Canary installer version, make a Wine virtual drive with the FF7DISC1 label, and it'll basically 'just werk'* at this point. Been working great with mods, and loads a hell of a lot faster than the old Stable version using the geriatric specific Wine version it required.

@ChthonVII
Copy link

@sjenkins7:

I followed you instructions with minor deviations, but I'm afraid 7H crashes with a stack overflow when I try to execute it:
0108:err:virtual:virtual_setup_exception stack overflow 1808 bytes addr 0x1d36898 stack 0x208f0 (0x20000-0x21000-0x1a0000)

Deviations:

  • Wine is latest staging, 8.0rc4
  • 7H is the new canary that dropped a few hours ago, v2.9.9.89 (I'd love to try .86, since this is likely the culprit, but it seems to have disappeared from the releases page.)
  • .NET Desktop Runtime is 7.0.2

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.)

@julianxhokaxhiu
Copy link
Member

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?

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.

@sjenkins7
Copy link

I followed you instructions with minor deviations, but I'm afraid 7H crashes with a stack overflow when I try to execute it:
0108:err:virtual:virtual_setup_exception stack overflow 1808 bytes addr 0x1d36898 stack 0x208f0 (0x20000-0x21000-0x1a0000)

I've just run .89 locally to make sure & it launches fine using:

$ wine --version
wine-7.22 (Staging)

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.

@SeongGino
Copy link

SeongGino commented Jan 18, 2023

Also checked to make sure, using versions that report as wine-7.22 (Staging) and wine-8.0rc4.r0.g89374093 ( TkG Staging Esync Fsync ) (in Arch these are wine-staging from multilib and wine-tkg-staging-fsync-git from AUR, respectively), 7H and modded FF7 are definitely working fine with either as of current Canary.

@ChthonVII
Copy link

Still getting nowhere with 7.22

export WINEPREFIX=~/.wine-ff7h
export WINEVERPATH="/home/<username>/Programs/wineforks/vanilla722/dist"
export WINELOADER="/home/<username>/Programs/wineforks/vanilla722/dist/bin/wine"
export WINESERVER="/home/<username>/Programs/wineforks/vanilla722/dist/bin/wineserver"
export WINEDLLPATH="/home/<username>/Programs/wineforks/vanilla722/dist/lib64/wine":"/home/<username>/Programs/wineforks/vanilla722/dist/lib/wine":"/home/<username>/Programs/wineforks/vanilla722/dist/lib64/wine/x86_64-windows":"/home/<username>/Programs/wineforks/vanilla722/dist/lib/wine/i386-windows"
export LD_LIBRARY_PATH="/home/<username>/Programs/wineforks/vanilla722/dist/lib64":"/home/<username>/Programs/wineforks/vanilla722/dist/lib":"/home/<username>/Programs/wineforks/vanilla722/dist/lib64/wine/x86_64-unix":"/home/<username>/Programs/wineforks/vanilla722/dist/lib/wine/i386-unix"
export PATH="/home/<username>/Programs/wineforks/vanilla722/dist/bin:$PATH"
export WINE="/home/<username>/Programs/wineforks/vanilla722/dist/bin/wine"
wine --version
<output: wine-7.22>

winecfg
<prefix is created>
cd .wine-ff7h/drive_c/
mkdir Temp
cd Temp
cp ~/Installs/WINE/FF7/7thHeaven/v2fork/windowsdesktop-runtime-7.0.2-win-x* .
cp ~/Installs/WINE/FF7/7thHeaven/v2fork/7thHeaven-v2.9.9.89_Release.exe .
wine windowsdesktop-runtime-7.0.2-win-x86.exe
<click through installer>
wine windowsdesktop-runtime-7.0.2-win-x64.exe 
<click through installer>
wine 7thHeaven-v2.9.9.89_Release.exe
<click through installer>
<leave "run 7th Heaven" checkbox checked>
<crash: 01cc:err:virtual:virtual_setup_exception stack overflow 1808 bytes addr 0x1d46898 stack 0x208f0 (0x20000-0x21000-0x1a0000)>

@sjenkins7
Copy link

You are using a non-staging release, which is likely why it doesn't work.

Need to make sure that wine --version specifically reports (Staging).

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

@ChthonVII
Copy link

ChthonVII commented Jan 20, 2023

You are using a non-staging release, which is likely why it doesn't work.

Yep. That was it. I grabbed the devel binaries by mistake. Always thought devel had the staging patches, though... Guess not.

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

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:

  1. FF7 always hangs on exit.
  2. Sometimes 7H renders its modal dialogs with black text/buttons on a black background, which is unusable. (This is using the light theme, so it's the background that's wrong.) Closing and restarting the program restores the correct behavior.
  3. The DX11 renderer does not work out of the box. The opening movies have incorrect colors (seems like the wrong pixel format) and the first menu screen is a jumbled mess. I'm guessing this is due to the lack of DVXK. OpenGL and Vulkan both appear to work fine though (at least for the first 10 minutes or so that I've tested). Is there any reason to prefer DX11?

@julianxhokaxhiu
Copy link
Member

  1. FF7 always hangs on exit.

Update FFNx to the latest canary.

@SeongGino
Copy link

  1. The DX11 renderer does not work out of the box. The opening movies have incorrect colors (seems like the wrong pixel format) and the first menu screen is a jumbled mess. I'm guessing this is due to the lack of DVXK. OpenGL and Vulkan both appear to work fine though (at least for the first 10 minutes or so that I've tested). Is there any reason to prefer DX11?

@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.

@julianxhokaxhiu
Copy link
Member

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!

@julianxhokaxhiu julianxhokaxhiu added documentation Improvements or additions to documentation enhancement New feature or request and removed help wanted Extra attention is needed question Further information is requested labels Jan 26, 2023
@julianxhokaxhiu julianxhokaxhiu added this to the 3.0.0 milestone Jan 26, 2023
@SeongGino
Copy link

I'd received a notif about someone saying the .NET8 update not working.

Just coming in to say: still works here.
2024_03-01 114744-7th Heaven v3 4 0 0 - Mod Manager for Final Fantasy 7 ( Maintained by the Tsunamods Team )  Default
2024_03-01 115134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request priority/P1 likely to affect end users
Projects
None yet
Development

No branches or pull requests