-
Notifications
You must be signed in to change notification settings - Fork 20
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
The file cpplize_debugger.py does not compile on linux. #141
Comments
The "create_debugger_header" function is receiving the first argument used after the scons command. This is generating errors. What the function "create_debugger_header" supose to recive? |
Line 8 will also cause issues on different platforms. The ideal would be to use: f = open(os.path.join(source_path, "core", "__generated__debugger_ui.h"), "w", encoding="utf-8") |
I think the issue is caused by a recent change I needed to make in order to use the cpplize_debugger.py with CMake. The change I did was adding these lines https://github.com/GameNetworking/NetworkSynchronizer/blob/main/debugger_ui/cpplize_debugger.py#L34-L40 With those lines, as soon as you execute that file the file is generated. The way I'm using it with CMake is this one: https://github.com/GameNetworking/NetworkSynchronizer/blob/main/cmake/CMakeLists.txt#L35-L39 The fix is to refactor the way the SCsub is implemented so that it "executes" the script instead of importing it and calling the function. If you have any other idea, I'm open to it. |
What do you think about including a method to fix the value of the "source_path" variable? Somethink like: source_path = os.path.dirname(os.path.abspath(__file__)) |
On the SCsub? I think that make sense |
Yes. but also can be done on cpplize_debugger.py. source_path = os.path.dirname(os.path.abspath(__file__))
source_path = os.path.dirname(source_path) |
What do you think about this solution? def create_debugger_header(source_path):
if not os.path.exists(source_path):
source_path = os.path.dirname(os.path.abspath(__file__))
source_path = os.path.dirname(source_path) |
I would prefer to have this logic inside the Scons config instead and prevent this section https://github.com/GameNetworking/NetworkSynchronizer/blob/main/debugger_ui/cpplize_debugger.py#L34-L40 from executing when the file is imported, somehow. |
I dont undestood exacly when the funcion "create_debugger_header" is called. |
Should the "source_path" variable be passed in the function call or discovered automatically? |
I prefer that we pass the path, because automatic discovering the directory is not going to work in all situations. |
I just updated my fork and can |
The text was updated successfully, but these errors were encountered: