Skip to content

Conversation

@oliveroxtoby
Copy link
Contributor

As far as I know, the AddOn manager doesn't have an install hook that could be used to compile resources as in the setup.py file. Therefore this pull request compiles the resources if they are not found (i.e. on first use after is has been installed).

@looooo looooo merged commit bfc429d into FreeCAD:master Apr 21, 2019
@looooo
Copy link
Collaborator

looooo commented Apr 21, 2019

I moved the compile_resources function to another file, because in the InitGui.py Pyside is imported which is not necessary available (if qt5 and pyside2 is installed). Maybe you can test this again to make sure it doesn't adds difficulties on your side.
8631829

@oliveroxtoby
Copy link
Contributor Author

oliveroxtoby commented Apr 22, 2019

I moved the compile_resources function to another file, because in the InitGui.py Pyside is imported which is not necessary available (if qt5 and pyside2 is installed). Maybe you can test this again to make sure it doesn't adds difficulties on your side.
8631829

I did just have to change this line to compile_resources.compile_resources() to make it work. Github is not letting me re-fork the repo to submit the change right now.

I see you have added the compiled Plot_rc.py file to the repo. If it is supplied then we don't actually need the my changes anyway since it will only try to compile it if it's not found. I wasn't sure if we could do that or if it had to be compiled on each new machine after being installed.

looooo added a commit that referenced this pull request Apr 22, 2019
@looooo
Copy link
Collaborator

looooo commented Apr 22, 2019

I did just have to change this line to compile_resources.compile_resources() to make it work. Github is not letting me re-fork the repo to submit the change right now.

should be fixed. You can always do such small modifications with gihub's editor tools (see attachment). This will take care of creating a new branch and a PR.

Bildschirmfoto von 2019-04-22 15-46-52

I see you have added the compiled Plot_rc.py file to the repo. If it is supplied then we don't actually need the my changes anyway since it will only try to compile it if it's not found. I wasn't sure if we could do that or if it had to be compiled on each new machine after being installed.

This was more by accident. But I guess we can keep it as qt5 should be default for the next years. So I guess we should keep the file until qt-version problems are reported.

@oliveroxtoby
Copy link
Contributor Author

Thanks, I am aware of that, but there was a problem creating the fork earlier. Seems to be back to normal now.

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.

2 participants