-
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
[refactoring] Cleanup of cmake build process #947
Conversation
The exctraction of the libusb library archive on windows no longer requires an external unarchiver.
(Closes #944)
- Removed requirement for 7zip on Windows - Added note on GNUInstallDir presets (#557)
- Distinguish test binaries from binaries - Build all binaries to /bin subfolder - Added comments to explain settings - Moved header files for logging and mmap
- Moved additional header files to /src - Simplified header-paths - Added missing license title for getopt - Added comments and sections to CMakeLists - Improved file structure (partially) - Co-build st-util with st-info & st-flash - GUI: Renamed .ui file to match executable - Added install targets for executables - Added missing "uninstall" cmd to Makefile
This is about 4/5 of the planned work towards a clean and more structured build routine. |
Both I suppose it is associated with this change, though may not actually caused by the cleanup. By checking the strings in the binary file, I find |
I'll have a look at this. The problem you describe where st-link-gui could not find the ui file is indeed an old problem. I have seen that before. Against this background I considered to install to |
@chenguokai: Tested it again and I can confirm I am able to launch stlink-gui via command line from every directory. Precondition is to have |
I am afraid that this violates the MacPorts's (Maybe other package managers' as well) rule however. MacPorts expects every single file provided by a software package only resident in its ${PREFIX} which is by default If there should be one hard-coded path for stlink-gui.ui, I recommend using a relative path like WHERE_STLINK_GUI_IS/stlink-gui.ui which will prevent us from this error as long as the binary and the ui file are installed to the same directory. |
I think the problem is something else, more general here: |
Please note that ${PREFIX} is only default to MacPorts. Users may adjust this ENV and HomeBrew has its own path convention. That’s why I proposed a relative path solution. |
@chenguokai: Have a look at #557 also... |
@Vascom: Can you test this on Fedora? |
I need a commit number to test. |
Just use the latest commit of the |
@Nightwalker-87 I checked the GNU standard, where they said
That is exactly what I expected. Using GNUInstallDirs is fine in my view. What I found improper is, the hardcoded |
@chenguokai: Ah now I see what you mean! 💡 Yes, of course we need a placeholder there... This is clearly by mistake. 😞 |
Surprisingly it shouldn't be hardcoded, as I just found out: See |
/usr/share/stlink/ removed? |
@Vascom: Yes, it is not there any more as it is no longer used. Does everything else work as expected? |
@Nightwalker-87 I made one mistake in my verification. This worked as expected. No more issues.😅 |
stlink-gui.ui file in /usr/bin/ |
Yes, it needs to be in the same directory as the binary |
Now build OK. |
Refactoring for cmake build settings: