Repository navigation
Conversation
…asestr The existing guards used the macro WIN32, which GCC for MinGW only predefines in GNU dialects, never in the strict ISO mode (-std=c11) that configure enables. On Windows the code therefore took the POSIX branch: arpa/inet.h, netdb.h, sys/socket.h were included (fatal), timegm() was used instead of _mkgmtime, and the gmtime_r() shim plus the winsock2 initialization were compiled out. Switch all platform/socket guards to _WIN32, which the compiler defines on every Windows target regardless of dialect. In gtk-rig-ctrl.c and gtk-rot-ctrl.c, replace the glibc-only strcasestr() with the existing portable helper gpredict_strcasestr() (gpredict-utils.c), which the rest of the code already uses. Warning: Code generated by qwen3.8-flash-next-iq3_s
WIN32 is not a reliable backend selector: mingw-w64's curl/curl.h itself defines WIN32 on inclusion, so in a native MSYS2 build (which links libcurl) the later '#ifdef WIN32' blocks in tle-update.c and trsp-update.c silently switched to win32_fetch() from win32/, which the autotools build neither includes nor compiles -> implicit declaration, link failure. Make the choice explicit: define HAVE_WIN32_FETCH from win32/Makefile (the only build that compiles win32-fetch.c and skips libcurl) and guard the fetch code with it. The autotools build now always uses libcurl, on every platform. Warning: Code generated by qwen3.8-flash-next-iq3_s
The rigctld/rotctld TCP clients in gtk-rig-ctrl.c/gtk-rot-ctrl.c call socket/connect/send/... On Unix these live in libc; on MinGW they are exported by ws2_32.dll, which was never linked -> undefined __imp_* references at link time. AC_SEARCH_LIBS finds them in libc on Unix and adds -lws2_32 only where needed. Warning: Code generated by qwen3.8-flash-next-iq3_s
Step-by-step prereqs/build/install for MSYS2, the Win32 quirks the build now handles, and the win32/README pointer. Warning: Code generated by qwen3.8-flash-next-iq3_s
…runners Warning: Code generated by qwen3.8-flash-next-iq3_s
…Windows hosts Double-clicking the built gpredict.exe opened a console window (PE CUI subsystem) and the file had no icon or version info. win32/Makefile has always handled both (-mwindows + windres over win32/gpredict.rc); do the same from the autotools build: on a Windows host (mingw, msys, cygwin - note that autotools inside MSYS2 reports the host as *-*-msys) link with -mwindows and compile win32/gpredict.rc (icon + VERSIONINFO with the numeric VERSION) with windres when available. The rc/ico/resource.h files themselves are pre-existing. Quirk table row added to doc/BUILDING-WINDOWS.md. Warning: Code generated by qwen3.8-flash-next-iq3_s
tools/msys2-sysroot.py assembles a Windows dependency sysroot from MSYS2 repo packages (pacman DB -> per-package .pkg.tar.zst closure, rewrites .pc prefixes). tools/cross-package.sh stages exe + DLL closure (objdump BFS) + data in the compat.c layout into a standalone tree. doc/BUILDING-WINDOWS.md section 5 documents the flow; README points at both. Warning: Code generated by qwen3.8-flash-next-iq3_s
libtoolize 2.4.7+ (Ubuntu 24.04) hard-errors during the bootstrap with 'AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=-I m4' unless the canonical plural spelling is used. No behavioural change on older toolchains. Warning: Code generated by qwen3.8-flash-next-iq3_s
Owner
|
From what I can tell, these commit were also included in #449, which has been merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes gpredict compile, link, and ship correctly on Windows, and adds
the tooling + docs to produce a standalone zip locally — no CI needed.
Build/link fixes:
WIN32macro is not a usable platform guard: GCC for MinGW onlypredefines it in GNU dialects (the build uses -std=c11), and
mingw-w64's curl/curl.h defines it mid-file even in native builds.
Result: the POSIX branch was taken on Windows (arpa/inet.h etc.),
and TLE/TRSP fetch silently selected the uncompiled win32_fetch().
-> all guards now use
_WIN32; fetch backend selection moved to anexplicit
HAVE_WIN32_FETCHdefine (only set by win32/Makefile);strcasestr()(glibc-only) replaced by the in-treegpredict_strcasestr().AC_SEARCH_LIBS([htons],[ws2_32])so rigctld/rotctldsocket calls link on MinGW.
with
-mwindows(no console window behind the GUI on double-click)and embeds the pre-existing
win32/gpredict.rcviawindres(app icon + version info in the PE,
--output-format=coff).AC_CONFIG_MACRO_DIRSplural — libtoolize >= 2.4.7(Ubuntu 24.04) hard-errors on the bootstrap otherwise.
Windows checkout.
Packaging + cross-build tooling:
src/.libs, GUI subsystem), full DLL closure walking from the exe
and from the dlopen'ed gdk-pixbuf loader DLLs (so the SVG/librsvg
chain ships), data in the compat.c layout, icons, locales, schemas.
MSYS2 repo packages (pacman DB -> .pkg.tar.zst closure, rewrites
.pc prefixes) for Linux cross-builds.
Docs (doc/BUILDING-WINDOWS.md): native MSYS2 recipe (sections 1-3),
quirks table (4), Linux cross-build flow (5), win32/Makefile history
(6), step-by-step standalone-zip packaging incl. the
cross-package.sh . / stage/...native invocation and PowerShell zipping (7).Verified locally: native MSYS2 build (gcc 15.2 / gtk3 3.24.51) ->
sh tools/cross-package.sh . / stage/...-> zipped: GUI starts withno console window, file icon shows, SVG logo loads, maps render,
runs standalone with PATH=C:\Windows\System32. Linux cross-build
(Ubuntu 24.04 mingw-w64 + sysroot script) -> same zip quality.
Warning: Code generated by qwen3.8-flash-next-iq3_s