Commit Graph

20 Commits

Author SHA1 Message Date
René de Hesselle
f9b7898fb7 Move to Apple Silicon based runner
Remove cmake as we no longer need to build ninja. We can use the
official wheel now since the runner's Python is 3.9 (before: 3.8).

Use the same comment regarding '--wrap-mode' as in the other jobs.

Download and use official ccache binary.

Add myself to the 'only' section in .gitlab-ci.yml so I can have
CI in my fork.

Disable a few deprecation warnings due to the much newer SDK of
the Apple Silicon machine.
2024-09-12 23:17:23 +02:00
Arjan Molenaar
2ad61ed0ee Fix formatting issues 2024-08-10 19:42:32 +02:00
Arjan Molenaar
1053c016d9 macos: Add test case for invalid scheme
You may not always know which schemes are available.

The library should not bail out, but only show
an informal message. It's the responsibility of
the application to deal with invalid URI schemes.
2024-08-10 19:34:29 +02:00
Arjan Molenaar
edd36a907b macos: simplify urlspec setup for launch_uris_async
NB. Using toll-free bridging to cast NSURL to a CFURLRef
See https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Toll-FreeBridgin/Toll-FreeBridgin.html
2024-08-10 19:34:29 +02:00
Arjan Molenaar
9f0ff882c1 macos: Fill appUrl directly
No need to convert it to a char* first.
This also avoids threading issues with OsxAppInfo's get_filename() method.
2024-08-10 19:34:29 +02:00
Arjan Molenaar
71e87fc29c more indentation fixes 2024-08-10 19:34:29 +02:00
Arjan Molenaar
e9ee147ac9 macos: fix header indentation 2024-08-10 19:34:29 +02:00
Arjan Molenaar
c67ae98588 macos: Implement GAppInfo.launch_uris_async interface
The implementation is heavily inspired by the Windows implementation.
2024-08-10 19:34:29 +02:00
Philip Withnall
21fdb3be24
gappinfo: Move all platform-independent API docs to gappinfo.c
Previously, some of the doc comments for platform-independent APIs were
in `gdesktopappinfo.c`, which is only built on Unix systems. This meant
the introspection annotations for those APIs were not used on non-Unix
systems, which caused platform differences in `Gio-2.0.gir`.

So, move those doc comments to `gappinfo.c` and put them next to some
new platform-independent wrapper functions which provide a consistent
entry point and location for the API preconditions.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3399
2024-07-24 17:45:22 +02:00
Philip Withnall
1c2207d9fb docs: Move the GOsxAppInfo SECTION
Move it to the struct docs.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Helps: #3037
2023-10-23 14:45:51 +01:00
Philip Withnall
41691cc4c8 Merge branch 'more-spdx' into 'main'
Add more SPDX license headers

See merge request GNOME/glib!2706
2022-07-05 11:06:49 +00:00
Philip Withnall
dbdc9ca995 gosxappinfo: Correctly return an error from create_from_commandline()
Creating a `GAppInfo` from a commandline isn’t currently supported on
macOS, but the implementation was incorrectly returning `NULL` without
setting the `GError`.

This was being caught by the new tests in `gio/tests/file.c`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-24 12:27:45 +01:00
Philip Withnall
26409f19cd Add SPDX license headers for LGPL-2.1-or-later to various files
These have all been added manually, as I’ve finished all the files which
I can automatically detect.

All the license headers in this commit are for LGPL-2.1-or-later, and
all have been double-checked against the license paragraph in the file
header.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1415
2022-06-01 12:44:23 +01:00
Philip Withnall
a9fc7e5935 gosxappinfo: Add some more precondition checks
These might help catch the problem in #2119 earlier on, and provide more
information about its root cause.

They should not affect behaviour in normal application usage.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2119
2020-12-09 11:44:37 +00:00
Philip Withnall
2a629b3b4b gosxappinfo: Use strlen() instead of some magic constants
This is equivalent, but makes the code a bit more readable.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-12-09 11:44:14 +00:00
Philip Withnall
1862a900b1 gosxappinfo: Fix some const-correctness issues
This is technically an API break, as the following assignment may now
raise warnings in user code:
```
gchar *filename = g_osx_app_info_get_filename (app_info);
```

However, from code search it seems like the number of users of that
function is zero.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-12-09 11:41:38 +00:00
Philip Withnall
00bfb3ab44 tree: Fix various typos and outdated terminology
This was mostly machine generated with the following command:
```
codespell \
    --builtin clear,rare,usage \
    --skip './po/*' --skip './.git/*' --skip './NEWS*' \
    --write-changes .
```
using the latest git version of `codespell` as per [these
instructions](https://github.com/codespell-project/codespell#user-content-updating).

Then I manually checked each change using `git add -p`, made a few
manual fixups and dropped a load of incorrect changes.

There are still some outdated or loaded terms used in GLib, mostly to do
with git branch terminology. They will need to be changed later as part
of a wider migration of git terminology.

If I’ve missed anything, please file an issue!

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-06-12 15:01:08 +01:00
Xavier Claessens
ead46cdc7e Revert "Revert "Rename objective-c files from .c to .m""
This reverts commit 2e9f3a9afe.
2018-05-25 03:06:07 +00:00
Matthias Clasen
2e9f3a9afe Revert "Rename objective-c files from .c to .m"
This reverts commit e400af99d4.
2018-05-22 17:21:16 -04:00
Xavier Claessens
e400af99d4 Rename objective-c files from .c to .m
Those files got renamed to .c to work around an automake issue, but
Meson needs them to have .m extension. Better rename them at build time
in Makefile.am since that's where the workaround is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=672777
2018-05-22 11:49:24 -04:00