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
Doesn't build on Windows #231
Comments
|
AppStream/libappstream has not at all been designed to work on Windows, and I have no means to test/debug this properly (especially since I have no reason to attempt a Windows port). |
|
I can't fork on github and file a MR, since that would require me to enable non-free JS on github. If you're OK with patches-disguised-as-text-files (because github really wants me to fork and forbids attaching P.S. "Not been designed" is not entirely true. Appstream is distro-agnostic by definition, and that can be stretched to cover Windows as well. P.P.S. That said, i have absolutely no clue who or why would want to use libappstream on Windows. But it can be built, so it should be! |
|
If it helps, I think the gimp people are building appstream-glib on Windows.
You know Windows and the WIN32 API is non-free, right?
If you're willing to write the code... you can't expect @ximion to just do all that work. |
|
|
You could also clone the repository to somewhere else and have me pull from there (I wouldn't mind patches as textfiles either though, as long as I can comment on them). That said, if there is a benefit for someone and the patches to the code aren't too invasive, I don't mind merging such changes. Merging code that nobody uses though, is something I am wary about. |
@LRN You know you can do forking, pushing, and making pull requests entirely through GitHub's API? There's even a program for this called |
There are multiple problems with building appstream on Windows with MinGW-w64:
<sys/utsname.h>(missing on Windows) unconditionally.ccompiler.has_header()to detect it at configure-time, thenconf.set('HAVE_SYS_UTSNAME', result-of-the-check)<fnmatch.h>(missing on Windows) for `fnmatch().<glib/gpattern.h>andg_pattern_match_simple(), or something along these lines.as_get_current_arch()uses utsname (see above) and needs a Windows-specific implementation.GetSystemInfo()call should do the trick (though be mindful ofPROCESSOR_ARCHITECTURE_*constants, some of them are not in MinGW-w64 headers yet).directory_is_empty()usesopendir()& friends. Doesn't work with utf-8 filenames, and only works on Windows because MinGW has an implementation (so no MSVC compatibility).g_dir_open()& friends.as_utils_is_root()uses unportable means of checking for administrative privileges (checks UID).__try()& friends, as these don't work with MinGW.as-distro-extras.cusessymlink()(absent on Windows)CreateSymbolicLinkW()(Vista-or-later required -add_global_arguments ('-D_WIN32_WINNT=0x600', language : 'c')), with a bit of extra code for utf-8->utf-16 conversion (glib has that), though be sure to addSYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATEflag. Note that you also need a special flag to make a directory symlink, so this function works either on files only or on directories only, depending on the flags. Appstream seems to usesymlink()only for files, and when it won't, the caller would surely know what is being linked, so the appropriate context information can be passed down.ascli-actions-mdata.cusesuintinstead ofgint(causes a warning)appstream-cli.cusesisatty(fileno (stdout))- very problematic on Windows.g_log_writer_supports_color (fileno (stdout))instead.'gio-unix-2.0'dependencyhost_machine.system() != 'windows'. No need forgio-win32-2.0or anything in theelsebranch, AFAICS.include_directories(['/usr/include']).as_distro_details_get_str()crashes because it can callg_key_file_get_string()with NULL key and id.priv->keyf != NULL && priv->id != NULL, returnNULLif the check fails. Same goes for other places wherepriv->idorpriv->keyfare used - addNULLchecks.The text was updated successfully, but these errors were encountered: