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

tools/style_helper: Fix generating style properties and build directory files #1819

Closed
wants to merge 2 commits into from

Conversation

JJuanill
Copy link

Adjusted style_helper.py tool to generate style_properties.h

@andrei47w
Copy link
Contributor

After this modification the .qss files are being copied to build_folder/style instead of build_folder/style/qss and Scopy is not loading the style correctly.
What is the problem you are trying to fix? We didn't have issues on any platform.

@JJuanill
Copy link
Author

The issue I am facing is when trying to build the project, it does not have a reference to style::properties::<element> (e.g. style::properties::button::spinBox). Looking at what is generated at style_properties.h it just shows two namespaces style and properties and nothing follows.

// Do not modify this file! This was auto generated.
#ifndef STYLE_PROPERTIES_H
#define STYLE_PROPERTIES_H
#include <scopy-gui_export.h>

namespace style {
namespace properties {
} // namespace properties
} // namespace style


#endif // STYLE_PROPERTIES_H

Is this an intended behavior or is it supposed to have content?

@JJuanill
Copy link
Author

JJuanill commented Nov 12, 2024

Looking at what is outputted at /styles/qss/, I pushed a fix that prevents the program from loading the styles. I think this has to do with how Windows handle local file locations. The original code captures forward slash '/' but checking what was outputted was a backslash '\' so I added the appropriate handles.

@andrei47w
Copy link
Contributor

For now I don't see a reason to merge these fixes since build on all platform work as expected (including windows). You may still use them for your local builds.
We are using mingw to build on windows and if you are using something different that might be why you are having issues.

@JJuanill JJuanill closed this Nov 15, 2024
@gvanem
Copy link

gvanem commented Dec 22, 2024

I had the same issue with an empty style_properties.h. The patch from @JJuanill works fine for me.
I use clang-cl to build Scopy and it works fine. A real pity IMHO that MinGW64 is needed to built Scopy now.

The reason it's not noted in Windows-CI, is that the Python version used there is from the Msys2 project
(which do not seems to use \ for os.path.*() functions).

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.

3 participants