-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Corrected the premake binary search functionality #2292
base: master
Are you sure you want to change the base?
Conversation
due to commit fe71eb7 you would have to fork the xenia-project fork and rebase to premake master then build |
I totally agree, it would be much better to build from the source and use the distribution's binary as a fall back instead. I'm working on adding that functionality into the code. The original code was a mix of searching locally in the code base and looking globally in the PATH. I'm currently adding another fallback check for the global path. This PR just corrects the original intent of the checks. |
|
||
|
||
self_path = os.path.dirname(os.path.abspath(__file__)) | ||
root_path = os.path.join(self_path, '..', '..') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was doing a literal concatenation and resulting in /path_to_user/xenia/tools/build/../..
. After the change to use the parent attribute of the path instead it is now resulting in the correct path /path_to_user/xenia
instead.
@@ -54,15 +56,15 @@ setup_premake_path_override() | |||
def main(): | |||
# First try the freshly-built premake. | |||
premake5_bin = os.path.join(premake_path, 'bin', 'release', 'premake5') | |||
if not has_bin(premake5_bin): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The has_bin function searches for the binary globally in the PATH. The code here builds a path to the expected premake location xenia/third_party/premake-core/bin/release/premake5
which is not in the user's PATH. This change just checks to see if the binary is available at that location instead.
I just pushed an update that will also check for a globally installed version in the PATH. |
Currently the build premake step is failing on linux due to a dependency issue in premake. This issue propmpted me to add a prebuilt premake to my local project but I noticed that it was not being acknowledge during the xb build process. These changes fix the executable search logic in the xb and premake python scripts so that drop in prebuilt binaries can be used.