WIP: Create GUI program #1
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
#2 Create new APKBUILD files for the Mingw-w64 toolchain
luca0N/alpine-mingw-msvcrt
Reference
luca0N/Capsule!1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev_gui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create GUI for Capsule in C++11 using libcapsule and wxWidgets.
@ -0,0 +33,4 @@<Option projectLinkerOptionsRelation="2" /><Compiler><Add option="-g" /><Add directory="../libcapsule/src" />This won't work as libcapsule is written in C, and not C++, resulting in a compilation error.
This project should link with the library instead.
Recently, I've been trying to get the GUI program to run under Windows XP. Although that OS is extremely outdated, to me it makes sense to target it, seeing as this is an utility for a 2007 video game.
Using the MinGW GCC cross-compiler (from Alpine Linux to i686 Windows) introduced an issue: MinGW uses UCRT by default, and thus attempts to dynamically load a bunch of Windows API sets (
api-ms-win-*.dll) on startup. These are supposedly available on Windows XP if the corresponding Visual C++ redistributable is installed, but I cannot confirm that at this time. I would also prefer for this program to be very lightweight and standalone.-static-libgccshouldn't be a problem as this project is GPL licensed.I've also tried using the MinGW32 toolchain with MSYS2 natively on Windows to build the GUI program, and it did work. This way, I was able to produce a statically linked, standalone program that ran on XP, so I believe it is possible to get the cross-compiler to work. There's also documentation on how to use MSVCRT (instead of UCRT) in the MinGW building documentation, but that would mean that I'd have to build MinGW manually. It would also mean that I'd have to create my own Docker image with this custom build of MinGW for CI workflows.
At this time I'm considering whether I want to continue with this wxWidgets C++ program. Creating an XP-compatible program with this codebase is possible, but I'm not sure I want to spend too much time on this very small side project. Last case scenario, I will just rewrite the GUI program in Lazarus (which I can already confirm works in XP 🙂).
29182d8b33tod02ff9fbb4Rebased with
devso that the CI workflow files use updatedlibcapsuleinstructions.There's a segmentation fault that's happening when closing the GUI program, so that needs to be sorted out before this PR gets merged.
Commit
09b2c2bf08fixed the issue (see commit message). According to a user1, wxWidgets will free the drop target, resulting in a double free.https://stackoverflow.com/a/7096992 ↩︎
@luca0N wrote in #1 (comment):
I was able to build both Mingw-w64 and wxWidgets statically under Alpine Linux. This problem will be solved with alpine-mingw-msvcrt.
5ef26062b5df7a6e1d72df7a6e1d7223646d832323646d83235baca32e69Some force-push operations were made to solve issues with the newly created CI workflow:
5ef26062b5todf7a6e1d72: fixes invalid Alpine package name during dependency installationdf7a6e1d72to23646d8323: replaces old libcapsule build instructions with the updated GNU Autotools instructions23646d8323to5baca32e69: fixes incorrect GCC build option to treat all warnings as errorsView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.