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

Fails to run on Win 10 if installed to path containing spaces #2907

Closed
j-richey opened this issue Apr 27, 2019 · 1 comment
Closed

Fails to run on Win 10 if installed to path containing spaces #2907

j-richey opened this issue Apr 27, 2019 · 1 comment

Comments

@j-richey
Copy link

After installing Unknown Horizons on Windows, launching the game from the desktop shortcut I get the following error:

Starting Unknown Horizons
output will be written to logfile "unknownhorizons-DATETIME.log"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .

When installing the game I changed the install path from C:\Unknown-Horizons to C:\Program Files\Unknown-Horizons. I suspect the space in the path is causing this problem.

Operating System: Windows 10 Home
Unknown Horizons version: Unknown-Horizons-2019.1.214-Setup-VC15-x86.exe obtained from http://unknown-horizons.org/downloads/

Steps to Reproduce

  1. Run the Unknown Horizons installer: Unknown-Horizons-2019.1.214-Setup-VC15-x86.exe.
  2. When prompted for an instillation location select C:\Program Files\Unknown-Horizons (or any location containing a space).
  3. Launch the game from the desktop shortcut.

Expected Behavior

The game should run if installed to C:\Program Files. This is a common place to put Windows applications.

Workaround

I was able to run the game by editing the shortcut's path from:
"C:\Program Files\Unknown-Horizons\unknown-horizons\run_uh.bat"
to:
"C:\Program Files\Unknown-Horizons\python\python.exe" run_uh.py

j-richey added a commit to j-richey/unknown-horizons that referenced this issue Apr 27, 2019
Adding quotes allows the bat file to work with paths that contain
spaces. See issue unknown-horizons#2907.
j-richey added a commit to j-richey/unknown-horizons that referenced this issue Apr 28, 2019
On Windows os.execv does not correctly escape spaces in paths (see
https://bugs.python.org/issue436259). This commit updates the
apply_settings method to use subprocess.call which properly handles
paths with spaces on Windows.

See issue unknown-horizons#2907.
@LinuxDonald
Copy link
Member

Sorry that you have problems. But we dont support this version of UH anymore. We are working on an new version. That use now godot engine instand of fife. But we dont have yet an playable version of it.
https://github.com/unknown-horizons/godot-port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants