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

Correct launch-game.cmd join of quoted paths #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbfil
Copy link

@jbfil jbfil commented Sep 24, 2023

Unquote strings in launch-game.cmd and quote on use. Now correctly finds directory when there are quotes in the mod.config files.

fixes #175

Unquote strings in launch-game.cmd and quote on use. Now correctly finds
directory when there are quotes in the mod.config files.
Copy link
Member

@abcdefg30 abcdefg30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this gives me

>.\launch-game.cmd
File not found - RELEASE-20230225
Required engine files not found.
Run `make all` in the mod directory to fetch and build the required files, then try again.
Press any key to continue . . .

@jbfil
Copy link
Author

jbfil commented Sep 24, 2023

The default make all invocation seems to create only the 'engine' directory and not a release tagged version as expected here. Not sure that it would be correct to change this as well.

git diff mod.config
diff --git a/mod.config b/mod.config
index 7c0ab03..f5a0aab 100644
--- a/mod.config
+++ b/mod.config
@@ -9,7 +9,7 @@
 MOD_ID="example"

 # The OpenRA engine version to use for this project.
-ENGINE_VERSION="release-20230225"
+ENGINE_VERSION="engine"

 ##############################################################################
 # Packaging

@abcdefg30
Copy link
Member

It does create it and write the string into the VERSION file for me.

>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\VERSION || goto noengine
cd %ENGINE_DIRECTORY%
if not exist "%ENGINE_DIRECTORY%\bin\OpenRA.exe" goto noengine
>nul find %ENGINE_VERSION% "%ENGINE_DIRECTORY%\VERSION" || goto noengine
Copy link
Member

@abcdefg30 abcdefg30 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>nul find %ENGINE_VERSION% "%ENGINE_DIRECTORY%\VERSION" || goto noengine
>nul find "%ENGINE_VERSION%" "%ENGINE_DIRECTORY%\VERSION" || goto noengine

Fixes the issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it will treat the version string as a file name without the quotations, which lead to the error I had yesterday.

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

Successfully merging this pull request may close these issues.

Error when launching example mod, make gives no errors
2 participants