Skip to content

Fix mac os nightly builds#379

Closed
jakenvac wants to merge 1 commit intoaurelienpierreeng:masterfrom
jakenvac:mac-fix
Closed

Fix mac os nightly builds#379
jakenvac wants to merge 1 commit intoaurelienpierreeng:masterfrom
jakenvac:mac-fix

Conversation

@jakenvac
Copy link
Copy Markdown

@jakenvac jakenvac commented Nov 8, 2024

I've managed to get mac os nightly builds working, but with a couple of caveats. (screenshots below)

I'm not really familiar with CMake or how it works so I'm sure this is very hacky. A lot of what I came up with in ci-script-mac.sh was trial and error. Any guidance is much appreciated.

Caveats:

  • Build must be done with ICU disabled due to a version mismatch (I think) between the versions available in brew and what Ansel expects. I'm not sure what the impacts of this being disabled in the build are. Generally the app seems to run and perform as normal.
  • Package signing needs configuring. For now you will have to allow the app to run from within the settings app (see screenshot)
  • Currently only built for arm
  • DMG name needs fixing, currently looks like Ansel--arm64.dmg need to use tag to insert version

Any advice of what else needs to be done to get this merged would be greatly appreciated.

You can see the github action on my fork producing a build here:
https://github.com/jakenvac/ansel/actions/runs/11742245723/job/32712579211

And you can download the release from my fork here:
https://github.com/jakenvac/ansel/releases/download/v0.0.0/Ansel--arm64.dmg

screenshots:
Screenshot 2024-11-08 at 12 03 00
Screenshot 2024-11-08 at 12 03 11

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Nov 8, 2024

@jakenvac jakenvac marked this pull request as ready for review November 8, 2024 12:49
@mmoqui
Copy link
Copy Markdown

mmoqui commented Dec 19, 2024

Hi @jakenvac,

In your PR , some shell scripts are modified for only a CI context. But those shell scripts are also used to build by hand a MacOS X package of Ansel. And by modifying only a couple of scripts used in a chain of build, this chain is then broken.

In order to fix this chain, could you please modify also the following scripts in the packaging/macosx/ directory:

  • 1_install_hb_dependencies.sh: replace the installation of ImageMagick by MagickGraphics;
  • 2_build_hb_ansel_custom.sh:
    • update the value of the installDir variable with the new installation directory as used in the 3_make_hb_ansel_package.sh and 4_make_hb_ansel_dmg.sh scripts in the PR: ${scriptDir}/../../install;
    • add the build config parameter -DUSE_ICU=OFF in the cmake statement

@sidney
Copy link
Copy Markdown

sidney commented Jan 2, 2025

I have submitted PR #391 that fixes the issue with ICU in the Mac build

@jakenvac
Copy link
Copy Markdown
Author

jakenvac commented Jan 7, 2025

@mmoqui Apologies for the delay in my response, I took some time away over xmas.

Thanks for the feedback, if I can find the time, I will address your comments.

@mmoqui
Copy link
Copy Markdown

mmoqui commented Jan 16, 2025

Hello @jakenvac,

The PR of @sidney has been merged. Now, as the icu4c library issue has been fixed, once your have some time, could you please accordingly rebase your branch with master and restore the use of the icu4c lib in your fix (id est no need to add -DUSE_ICU=OFF in the cmake statement) ?

@jakenvac
Copy link
Copy Markdown
Author

Hi Sorry - I haven't had any time to get to this and probably won't in the foreseeable future. I'm happy for someone else to take over my work if they want to.

mmoqui added a commit to mmoqui/ansel that referenced this pull request Oct 19, 2025
The MacOS X dedicated build script 2_build_hb_ansel_custom.sh is updated to take into account
the new installation directory (in $PROJECT_DIR/install).
This script, as well as the 1_install_hb_dependencies.sh script, aren't to be used by the CI.
These are for users wishing build Ansel by hand onto their Mac machine. So, the script
2_build_hb_ansel_custom.sh fetches the version of MacOS X to pass it to the cmake statement
(instead of given a hard coded value corresponding to the minimum expected version of MacOS X).
@mmoqui
Copy link
Copy Markdown

mmoqui commented Oct 19, 2025

I updated the work of @jakenvac in this PR #571. This PR can then be closed.

mmoqui added a commit to mmoqui/ansel that referenced this pull request Oct 19, 2025
The MacOS X dedicated build script 2_build_hb_ansel_custom.sh is updated to take into account
the new installation directory (in $PROJECT_DIR/install).
This script, as well as the 1_install_hb_dependencies.sh script, aren't to be used by the CI.
These are for users wishing build Ansel by hand onto their Mac machine. So, the script
2_build_hb_ansel_custom.sh fetches the version of MacOS X to pass it to the cmake statement
(instead of given a hard coded value corresponding to the minimum expected version of MacOS X).

Update also the CI script used to check pull requests so that the build of Ansel for MacOS X
is also executed.
mmoqui added a commit to mmoqui/ansel that referenced this pull request Oct 19, 2025
The MacOS X dedicated build script 2_build_hb_ansel_custom.sh is updated to take into account
the new installation directory (in $PROJECT_DIR/install).
This script, as well as the 1_install_hb_dependencies.sh script, aren't to be used by the CI.
These are for users wishing build Ansel by hand onto their Mac machine. So, the script
2_build_hb_ansel_custom.sh fetches the version of MacOS X to pass it to the cmake statement
(instead of given a hard coded value corresponding to the minimum expected version of MacOS X).

Update also the CI script used to check pull requests so that the build of Ansel for MacOS X
is also executed.
mmoqui added a commit to mmoqui/ansel that referenced this pull request Oct 19, 2025
The MacOS X dedicated build script 2_build_hb_ansel_custom.sh is updated to take into account
the new installation directory (in $PROJECT_DIR/install).
This script, as well as the 1_install_hb_dependencies.sh script, aren't to be used by the CI.
These are for users wishing build Ansel by hand onto their Mac machine. So, the script
2_build_hb_ansel_custom.sh fetches the version of MacOS X to pass it to the cmake statement
(instead of given a hard coded value corresponding to the minimum expected version of MacOS X).

Update also the CI script used to check pull requests so that the build of Ansel for MacOS X
is also executed.
mmoqui added a commit to mmoqui/ansel that referenced this pull request Oct 19, 2025
The MacOS X dedicated build script 2_build_hb_ansel_custom.sh is updated to take into account
the new installation directory (in $PROJECT_DIR/install).
This script, as well as the 1_install_hb_dependencies.sh script, aren't to be used by the CI.
These are for users wishing build Ansel by hand onto their Mac machine. So, the script
2_build_hb_ansel_custom.sh fetches the version of MacOS X to pass it to the cmake statement
(instead of given a hard coded value corresponding to the minimum expected version of MacOS X).

Update also the CI script used to check pull requests so that the build of Ansel for MacOS X
is also executed. The Debug build type is removed for MacOS X because the uint64_t type is an
unsigned long long on MacOS X whereas it is an unsigned long in other platforms and the debug
messages in the code use values of type uint64_t (hence the build for the debug build type fails).
mmoqui added a commit to mmoqui/ansel that referenced this pull request Oct 19, 2025
The MacOS X dedicated build script 2_build_hb_ansel_custom.sh is updated to take into account
the new installation directory (in $PROJECT_DIR/install).
This script, as well as the 1_install_hb_dependencies.sh script, aren't to be used by the CI.
These are for users wishing build Ansel by hand onto their Mac machine. So, the script
2_build_hb_ansel_custom.sh fetches the version of MacOS X to pass it to the cmake statement
(instead of given a hard coded value corresponding to the minimum expected version of MacOS X).

Update also the CI script used to check pull requests so that the build of Ansel for MacOS X
is also executed. The Debug build type is removed for MacOS X because the uint64_t type is an
unsigned long long on MacOS X whereas it is an unsigned long in other platforms and the debug
messages in the code use values of type uint64_t (hence the build for the debug build type fails).
Jiyone pushed a commit that referenced this pull request Oct 21, 2025
The MacOS X dedicated build script 2_build_hb_ansel_custom.sh is updated to take into account
the new installation directory (in $PROJECT_DIR/install).
This script, as well as the 1_install_hb_dependencies.sh script, aren't to be used by the CI.
These are for users wishing build Ansel by hand onto their Mac machine. So, the script
2_build_hb_ansel_custom.sh fetches the version of MacOS X to pass it to the cmake statement
(instead of given a hard coded value corresponding to the minimum expected version of MacOS X).

Update also the CI script used to check pull requests so that the build of Ansel for MacOS X
is also executed. The Debug build type is removed for MacOS X because the uint64_t type is an
unsigned long long on MacOS X whereas it is an unsigned long in other platforms and the debug
messages in the code use values of type uint64_t (hence the build for the debug build type fails).
@jakenvac
Copy link
Copy Markdown
Author

jakenvac commented Nov 6, 2025

Closing in favor of @mmoqui's work. Thanks for picking this up.

@jakenvac jakenvac closed this Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants