memo33 / sc4pac-tools

Package manager for SC4
https://memo33.github.io/sc4pac/
GNU General Public License v3.0
9 stars 1 forks source link

Unable to run sc4pac from folder with spaces on Windows #1

Closed sebamarynissen closed 7 months ago

sebamarynissen commented 7 months ago

I've noticed that on Windows, if you put the sc4pac.jar file in a folder with spaces - for example C:\Users\me\Documents\SimCity 4 then it's unable to run.

It can be fixed manually by adding quotes to sc4pac.bat:

@ECHO OFF
REM Invocation of sc4pac command-line interface on Windows.
REM In Windows cmd.exe, call:
REM
REM     sc4pac
REM
REM In Windows PowerShell, call:
REM
REM     .\sc4pac

SET SCRIPTDIR=%~dp0.
java -jar "%SCRIPTDIR%\sc4pac-cli.jar" %*

I wanted to file a PR to fix this, but I was unable to locate the sc4pac.bat file in the source code, so I'm assuming it's generated as part of a build process.

memo33 commented 7 months ago

Thanks for the report and the fix.