https://bugs.winehq.org/show_bug.cgi?id=44948
Bug ID: 44948 Summary: fixme:file:CreateSymbolicLinkW() is not implemented Product: Wine Version: 3.2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: phaidros@gmx.at Distribution: ---
Spine is a Mod-starter for Gothic which supports easy patching and installation of Mods. It uses CreateSymbolicLinkW() to copy files into the game directory. This function is not implemented
005e:fixme:file:CreateSymbolicLinkW (L"C:/games/Gothic-Spine/system/GothicGame.ini" L"C:/users/gottfried/Application Data/Clockwork Origins/Spine/mods/37/system/GothicGame.ini" 0): stub
hence the game cannot be started via Spine, it crashes with an access violation.
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Does it work if you create links manually?
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #2 from phaidros@gmx.at --- (In reply to Nikolay Sivov from comment #1)
Does it work if you create links manually?
I tried to copy the files, but it seems spine checks and deletes the files it attempts to copy/link if they already exist. This makes sense, it ensures a clean game directory before spine copies in additional data. Likewise, on game exit any files that were copied/linked by spine are cleaned up.
I can start the game the normal way, ie bypassing spine starting the gothic executable directly. Of course i can't use any mods provided by spine that way...
https://bugs.winehq.org/show_bug.cgi?id=44948
Igor ikk_pl@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ikk_pl@yahoo.co.uk
--- Comment #3 from Igor ikk_pl@yahoo.co.uk --- Confirming, it happens here as well, with latest Wine (wine-3.5-44-gca9d03a7ac).
https://bugs.winehq.org/show_bug.cgi?id=44948
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=44948
Screwtape thristian@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thristian@gmail.com
--- Comment #4 from Screwtape thristian@gmail.com --- Easy test case:
$ cd $(mktemp -d) $ wine cmd /C "mklink foo bar" $ stat foo
Expected result:
Information about a symlink named "foo"
Actual result:
stat: cannot stat 'foo': No such file or directory
https://bugs.winehq.org/show_bug.cgi?id=44948
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Summary|fixme:file:CreateSymbolicLi |Spine (Mod starter for |nkW() is not implemented |Gothic) needs | |CreateSymbolicLinkW | |implementation Ever confirmed|0 |1
--- Comment #5 from Gijs Vermeulen gijsvrm@gmail.com --- Confirming as per #3 and #4, also changing title to reflect problem better.
https://bugs.winehq.org/show_bug.cgi?id=44948
tt_1 herrtimson@yahoo.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |herrtimson@yahoo.de
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #6 from tt_1 herrtimson@yahoo.de --- Can you guys actually use the spine application to download a mod from the database?
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #7 from GottfriedM phaidros@gmx.at --- (In reply to tt_1 from comment #6)
Can you guys actually use the spine application to download a mod from the database?
Yes, the spine application itself works.
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #8 from Gijs Vermeulen gijsvrm@gmail.com --- Created attachment 63420 --> https://bugs.winehq.org/attachment.cgi?id=63420 WIP patch
Does this help for Spine?
https://bugs.winehq.org/show_bug.cgi?id=44948
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/kernel32-CreateS | |ymbolicLink CC| |leslie_alistair@hotmail.com Status|NEW |STAGED
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #9 from GottfriedM phaidros@gmx.at --- (In reply to Gijs Vermeulen from comment #8)
Created attachment 63420 [details] WIP patch
Does this help for Spine?
Awesome, this works great (wine-vanilla-3.0.3)
I quickly tested by activating "Gothic I Classic Texture Mix" and "Gothic I 3D + Mesh Patch" in Spine and indeed the game starts with improved graphics.
Sidenote: Out of interest I also tried to activate "D3D11 Renderer Clockwork Edition", which (as expected) did not work. I think the reason for this is more complicated and CreateSymbolicLink is not to blame in the first place, however I do see these messages:
016f:fixme:file:CreateSymbolicLinkW Directories are not supported
I don't know the internals of Spine, but if other patches/mods also rely on linking directories, it could be that they do not work as well.
https://bugs.winehq.org/show_bug.cgi?id=44948
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #63420|0 |1 is obsolete| |
--- Comment #10 from Gijs Vermeulen gijsvrm@gmail.com --- Created attachment 63462 --> https://bugs.winehq.org/attachment.cgi?id=63462 WIP patch v2
(In reply to GottfriedM from comment #9)
however I do see these messages:
016f:fixme:file:CreateSymbolicLinkW Directories are not supported
I don't know the internals of Spine, but if other patches/mods also rely on linking directories, it could be that they do not work as well.
Thank you for testing. Those messages were to be expected. Please try this version, it should work a little better.
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #11 from Screwtape thristian@gmail.com --- Shouldn't symlinking a directory fail unless the flags parameter includes SYMBOLIC_LINK_FLAG_DIRECTORY? And likewise, symlinking a file should fail if the flag is set.
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #12 from Gijs Vermeulen gijsvrm@gmail.com --- (In reply to Screwtape from comment #11)
Shouldn't symlinking a directory fail unless the flags parameter includes SYMBOLIC_LINK_FLAG_DIRECTORY? And likewise, symlinking a file should fail if the flag is set.
Probably, yes. I haven't gotten to writing tests yet, I was just trying some things. Tests are the next thing on my list.
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #13 from GottfriedM phaidros@gmx.at --- (In reply to Gijs Vermeulen from comment #10)
Thank you for testing. Those messages were to be expected. Please try this version, it should work a little better.
Tried the new patch, I don't see the "Directories are not supported" anymore.
However I only tested the D3D11 Renderer which doesn't work for other reasons. I don't know which other mods use the directory linking functionality, so I can only report that the "Directories are not supported" message is gone, but can't verify that everything works as expected.
If somebody can point me to a mod that relies on linking directories, I'm happy to try it.
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #14 from Screwtape thristian@gmail.com --- I have been playing with this patch in Wine 4.5-staging (x86_64, built by PlayOnLinux). I found a way to reproducibly crash Wine with it.
Steps to reproduce:
$ mkdir test $ cd test $ mkdir -p a/a $ mkdir -p b $ wine cmd
mklink /d b/b ../a/a
Expected result:
test/b/b is a symlink pointing to test/a/a
Actual result:
wine: Unhandled page fault on read access to 0x00000000 at address 0xf7c0437d (thread 0054), starting debugger...
https://bugs.winehq.org/show_bug.cgi?id=44948
--- Comment #15 from Screwtape thristian@gmail.com --- "mklink /d b/b ../a/a" does not work on Real Windows because it mistakes the paths for switches. "mklink /d b\b ..\a\a" works as expected.
With this implementation, "mklink /d b\b a\a" creates test\b\b which is a symlink to test\a\a, but on Windows that command creates a symlink that points to test\b\a\a. Which is to say, on both Windows and POSIX, if a symlink is created with a relative target path, the target path is relative to the symlink's own path, not the current working directory of the process that created the symlink.
https://bugs.winehq.org/show_bug.cgi?id=44948
Louis Lenders xerox.xerox2000x@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Spine (Mod starter for |Multiple apps (Spine (Mod |Gothic) needs |starter for Gothic), MS |CreateSymbolicLinkW |Office 365 installer) need |implementation |CreateSymbolicLinkW | |implementation CC| |xerox.xerox2000x@gmail.com
--- Comment #16 from Louis Lenders xerox.xerox2000x@gmail.com --- Update title of bug, there are more apps , besides Spine, that need this...
https://bugs.winehq.org/show_bug.cgi?id=44948
Erich E. Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |erich.e.hoover@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=44948
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-sta |https://github.com/wine-sta |ging/wine-staging/tree/mast |ging/wine-staging/tree/mast |er/patches/kernel32-CreateS |er/patches/ntdll-Junction_P |ymbolicLink |oints
--- Comment #17 from Gijs Vermeulen gijsvrm@gmail.com --- Changing patchset to ntdll-Junction_Points.
https://bugs.winehq.org/show_bug.cgi?id=44948
mirh mirh@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mirh@protonmail.ch
--- Comment #18 from mirh mirh@protonmail.ch --- Mhh.. not sure if this is a regression or what
But "mklink foo file" is continuously complaining it can't open "foo" here. Whereas "mklink /h foo file" doesn't bat an eye (as long as file exists of course)
https://bugs.winehq.org/show_bug.cgi?id=44948
danfredell@flywheel.io changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |danfredell@flywheel.io
https://bugs.winehq.org/show_bug.cgi?id=44948
winetaste@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetaste@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=44948
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Multiple apps (Spine (Mod |Multiple apps need |starter for Gothic), MS |CreateSymbolicLinkA/W |Office 365 installer) need |implementation (Spine (Mod |CreateSymbolicLinkW |starter for Gothic), |implementation |GenLauncher (Mod manager | |for GeneralsZH), MS Office | |365 installer)
https://bugs.winehq.org/show_bug.cgi?id=44948
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |muhammadyusuf.kurbonov2002@ | |gmail.com
--- Comment #19 from Gijs Vermeulen gijsvrm@gmail.com --- *** Bug 55056 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=44948
s s.ging@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |s.ging@web.de
--- Comment #20 from s s.ging@web.de --- Since the last comment is 4 years old I wanted to politely ask if there is any chance of this getting implemented?