Jump to content

Recommended Posts

heh default location is set to have spaces in names, which messes up somewhere... as a quick fix, rename don't starve mod tools into anything that doesn't have space in the name and run mod_tools/autocompiler.exe manually, that will probably work.

 

Not that I understand why were spaces used as default in the first place.

heh default location is set to have spaces in names, which messes up somewhere... as a quick fix, rename don't starve mod tools into anything that doesn't have space in the name and run mod_tools/autocompiler.exe manually, that will probably work.

 

Not that I understand why were spaces used as default in the first place.

Do you have a good suggestion for how to tackle this? If quotes around a command/executable's path were allowed in a system() call under Windows, this issue wouldn't happen, but as we already determined this is not the case.

This issue didn't manifest itself before (in my fork) because now autocompiler.exe is being called by the Don't Starve executable, which refers to it as "..\..\Don't Starve Mod Tools\mod_tools\autocompiler.exe", but then when the autocompiler.exe refers to its own folder in order to call the other tools the issue arises due to the space. Since the Don't Starve executable is avoiding the issue somehow, there must be a way (which hopefully doesn't involve parsing the string manually to escape metacharacters such as spaces).

Do you have a good suggestion for how to tackle this? If quotes around a command/executable's path were allowed in a system() call under Windows, this issue wouldn't happen, but as we already determined this is not the case.

This issue didn't manifest itself before (in my fork) because now autocompiler.exe is being called by the Don't Starve executable, which refers to it as "..\..\Don't Starve Mod Tools\mod_tools\autocompiler.exe", but then when the autocompiler.exe refers to its own folder in order to call the other tools the issue arises due to the space. Since the Don't Starve executable is avoiding the issue somehow, there must be a way (which hopefully doesn't involve parsing the string manually to escape metacharacters such as spaces).

 

Frankly I didn't even notice that because original github repo had final files in ModToolsOut or something, yours obviously didn't come with spaces either, and the only reason I ever used standalone modtools was to copy over python installation. And I don't use steam (I'm a 'GOG Pirate'), and I'd slit my wrists if I had to watch autocompiler on every game launch..

 

But the most obvious solution is to simply rename the folder? It's completely arbitrary folder name fully under klei control....I'll never understand why people use spaces in directory structures.

 

That failing, I dunno, change the running directory before you call autocompiler.exe to the one it is really in before running it, as opposed to calling it directly as ..\..\something? Would that make it reference exes normally? I'm not exactly sure of the System() calls behavior. But that is again the way dontstarve.exe calls it, so if you're changing that, I'm back at 'rename folder' case.

Frankly I didn't even notice that because original github repo had final files in ModToolsOut or something, yours obviously didn't come with spaces either, and the only reason I ever used standalone modtools was to copy over python installation. And I don't use steam (I'm a 'GOG Pirate'), and I'd slit my wrists if I had to watch autocompiler on every game launch..

 

But the most obvious solution is to simply rename the folder? It's completely arbitrary folder name fully under klei control....I'll never understand why people use spaces in directory structures.

Well, I guess that judgement call is up to @Cheerio.

That failing, I dunno, change the running directory before you call autocompiler.exe to the one it is really in before running it, as opposed to calling it directly as ..\..\something? Would that make it reference exes normally? I'm not exactly sure of the System() calls behavior. But that is again the way dontstarve.exe calls it, so if you're changing that, I'm back at 'rename folder' case.

Changing directory would work, but that's not how Don't Starve calls it. If it were, the issue wouldn't happen (since "." would be used as the application directory, and not "..\..\Don't Starve Mod Tools").

I had the same problem when I first uploaded the mod tools. Our working directory of the tools doesn't have spaces in it but the Steam installation folder does. Should be all fixed now though.

I applied corresponding fixes for the Linux/Mac case in the 4 places you changed the sprintf/system call to account for spaces in paths over Windows.

I submitted a pull request with the fix.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...