Skip to content

Commit

Permalink
Try to fix the macOS compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Sep 26, 2024
1 parent 84dbb51 commit 5c18b68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ${{matrix.platform}}
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
platform: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: cedx/setup-hashlink@main
- run: hl --version
12 changes: 10 additions & 2 deletions src/setup_hashlink/Setup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,17 @@ class Setup {

/** Compiles the HashLink sources on the macOS platform. **/
function compileMacOs(): Promise<String> {
final commands = ["brew bundle", "make", "sudo make codesign_osx", "sudo make install"];
final prefix = "/usr/local";
final commands = [
"brew bundle",
"make",
"sudo make codesign_osx",
"sudo make install",
'sudo install_name_tool -change libhl.dylib $prefix/lib/libhl.dylib $prefix/bin/hl'
];

commands.iter(command -> Sys.command(command));
return Promise.resolve("/usr/local");
return Promise.resolve(prefix);
}

/** Determines the name of the single subfolder in the specified `directory`. **/
Expand Down

0 comments on commit 5c18b68

Please sign in to comment.