Contact The Jeff
Member
UPDATE: 4/17/21
In other words, GMS2 doesn't support long pathing now but will sometime this year.
UPDATE: 4/12/21
Now currently waiting to hear back from YYG support....Ticket # is: 181847
Hello everyone!
I am having some trouble with GMS2 to use windows explorer and I need some assistance please.
The goal:
To open the [working directory] folder that files are stored after building a game (before converting to .exe).
The problem:
Working directory will provide a file path that will not let windows' explorer open the folder the game is built upon.
[Some Visual Materials:]
The attempt(s):
Since GMS2 comes lacking with file handing department, I have used the extensions named "Execute Shell" by Samuel and "Unboxed FileSystem" by kagmma.
While using Win10, by using these extensions, I was able to:
--Copy a file from one place to another.
--Open folders that are outside of the appfolder sections.
--Executed files (outside of appfolder)
[SEE IMAGE]
However, I've noticed that "working_directory" was giving me issues in the sense that I cannot access its folder path with windows explorer when building from ide.
It gives me a directory of "Y:\" and I cannot access this folder through GML, which it holds 'included files' The other appdata folder contains other content, say generated images.
As one can see from this image, I'm having troubles with Game_Save_Id, & Working_Id, which gives me issues with opening folders w/ win explorer.
On the right side I have the game compiled into the .exe and gives me no issues.
Now, where I want to open the "Y:" directory, gamesave-id & working directory fail to work as I think it would except when compiled to .exe
Since my project is located in the desktop, I went ahead and changed the ide's settings path where it recognizes and uses a folder in desktop to store some items, but working id still generates a file path for working directory folder, while letting the appdata forlder do nothing of its work at this moment....
I feel like the placing of items at different locations would make me mistrust in where things go if compiled to exe...
Has anyone tried working around this?
[Like stopping GMS2 from aliasing the file path for working directory?
Thanks for the update @rytan451]
Thanks in advance!
EDIT: Added more clarification and update to main post.
@FrostyCatYoYo QA Dept (YoYo Games Ltd.)
Apr 15, 2021, 11:54 GMT+1
Hello Jeff,
You should not need to enable anything in Windows, as GMS2's in-built use of the Windows subst command will usually deal with this issue for you. However, yes, if you have disabled the use of subst drives in GMS2's Preferences (or your Windows user account is not allowed to run subst), then you would fall foul of this. We would suggest that you do shorten your paths regardless, as we cannot guarantee what third-party SDKs will require (Android, for example, is definitely one which will currently always use subst to handle long paths).
To answer your question directly: GMS2 currently targets a version of .NET which does not have that same long path support in recent-ish WIn 10 releases. We aim to move up to the new .NET being released later this year, but until then your enabling long paths support externally would have no effect.
Thanks,
Dan
YoYo QA Department
In other words, GMS2 doesn't support long pathing now but will sometime this year.
UPDATE: 4/12/21
Now GMS2 throws long path name errors (being > 260 chars, even if it's less than said # of chars) during development. Win10 officially supports long path and I'm unsure if GMS2 accepts & uses this long path support during development.I see. I may have misunderstood the question and focused on something entirely unrelated. My apologies for that, and thank you for the clarification!
If I understand it correctly now, you are trying to use the paths returned by working_directory/etc. in a GML function of an extension to access a file. This function, however, is unable to access the file when running from within the IDE because it doesn't resolve the aliased path correctly.
For example, this path works as expected:
C:\Users\Tsuka\AppData\Local\GMS2TEMP\TunaGame_4AC6CF85_VM\
... and this one doesn't:
Y:\TunaGame_4AC6CF85_VM\
Is that correct?
If so, you can disable the aliasing of file paths to X/Y/Z drives under File -> Preferences -> General Settings -> Compiling -> Use subst for drive paths (or via my preferred method, Ctrl+T -> subst). This will result in working_directory returning paths in the style of C:\Users\Tsuka\AppData\Local\GMS2TEMP\TunaGame_4AC6CF85_VM\, without any aliasing shenanigans.
This setting is mainly important for specific target platforms that tend to result in long file names during compilation (e.g. Android). Turning it off is safe, in the sense that you'll quickly notice if turning it off is a bad idea because your game would refuse to compile in that scenario.
Now currently waiting to hear back from YYG support....Ticket # is: 181847
Hello everyone!
I am having some trouble with GMS2 to use windows explorer and I need some assistance please.
The goal:
To open the [working directory] folder that files are stored after building a game (before converting to .exe).
The problem:
Working directory will provide a file path that will not let windows' explorer open the folder the game is built upon.
[Some Visual Materials:]
The attempt(s):
Since GMS2 comes lacking with file handing department, I have used the extensions named "Execute Shell" by Samuel and "Unboxed FileSystem" by kagmma.
While using Win10, by using these extensions, I was able to:
--Copy a file from one place to another.
--Open folders that are outside of the appfolder sections.
--Executed files (outside of appfolder)
[SEE IMAGE]
However, I've noticed that "working_directory" was giving me issues in the sense that I cannot access its folder path with windows explorer when building from ide.
It gives me a directory of "Y:\" and I cannot access this folder through GML, which it holds 'included files' The other appdata folder contains other content, say generated images.
As one can see from this image, I'm having troubles with Game_Save_Id, & Working_Id, which gives me issues with opening folders w/ win explorer.
On the right side I have the game compiled into the .exe and gives me no issues.
Now, where I want to open the "Y:" directory, gamesave-id & working directory fail to work as I think it would except when compiled to .exe
Since my project is located in the desktop, I went ahead and changed the ide's settings path where it recognizes and uses a folder in desktop to store some items, but working id still generates a file path for working directory folder, while letting the appdata forlder do nothing of its work at this moment....
I feel like the placing of items at different locations would make me mistrust in where things go if compiled to exe...
Has anyone tried working around this?
[Like stopping GMS2 from aliasing the file path for working directory?
Thanks for the update @rytan451]
Thanks in advance!
EDIT: Added more clarification and update to main post.
Last edited: