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

Issue: GenerateProjectFiles.bat Assumes Execution from /build Directory #169

Open
kutaycoskuner opened this issue Oct 28, 2024 · 0 comments

Comments

@kutaycoskuner
Copy link

Description
The GenerateProjectFiles.bat script currently assumes that it is executed from within the build directory, leading to errors if the script is run from the root project directory. This causes issues when following the README instructions directly, as it doesn’t specify to navigate to /build before executing the script.

Steps to Reproduce

  1. clone repository from github:
git clone https://github.com/vilbeyli/VQEngine.git
  1. navigate to the root project directory:
cd VQEngine
  1. Attempt to build project as indicated in the readme:
./build/GenerateProjectFiles.bat

Expected Behavior
The script should run successfully from the root project directory, without needing to navigate to /build.

Actual Behavior
When running GenerateProjectFiles.bat from the root directory, it results in the following errors:

fatal: not a git repository (or any of the parent directories): .git

Cause
The issue is that the script is attempting to execute commands that rely on the assumption it’s running from the /build directory. Running it from the root directory causes relative path issues.

Workaround
The issue can be temporarily resolved by navigating to the build directory before executing the script:

cd build
.\GenerateProjectFiles.bat

Suggested Solution
Modify the GenerateProjectFiles.bat script to make it independent of the current working directory. Adding a command to change to the script’s directory at the start can help resolve this:

Add the following at the beginning of GenerateProjectFiles.bat:

@echo off
cd /d "%~dp0"

This will ensure the script runs from its own directory regardless of where it is called from, allowing users to follow the README instructions without modification.

Additional Information

Operating System:    Windows 10 (Version 22H2 Os Build 19045.5011)
Git Version:        2.37.1.windows.1

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

1 participant