The following steps need to be done before building the Mac App:
1.Install XCode.
1. Install XCode.
1. Add a JRE to the `OSX/Metabase/jre`
1. Add a JRE to the `/path/to/metabase/repo/OSX/Metabase/jre`
You must acquire a copy of a JRE (make sure you get a JRE rather than JDK) and move it to the correct location in the Mac App source directory so it can be included as part of the Mac App. To ship Java applications as Mac Apps, you must ship them with their own JRE. In this case we want to get a JRE from somewhere (more on this below) and move the `Contents/Home` directory from the JRE archive into `OSX/Metabase/jre`. (`OSX/Metabase` already exists inside the `metabase/metabase` repo.)
<details><summary>Option 1: Download from AdoptOpenJDK (currently broken -- do not use)</summary>
You can download a copy of a JRE from https://adoptopenjdk.net/releases.html?jvmVariant=hotspot — make sure you download a JRE rather than JDK. Move the `Contents/Home` directory from the JRE archive into `OSX/Metabase/jre`. (`OSX/Metabase` already exists inside the `metabase/metabase` repo.) For example:
Make sure the JRE version you use is one that is known to work successfully with notarization. I'm pretty sure this version will work. Note to self -- update page once we verify that this version works.
Make sure the JRE version you use is one that is known to work successfully with notarization. We have found out the one linked above does not work.
I have found a nightly build that *does* work, but it's no longer available for download. Cam and Sameer both have copies of a JRE that is known to work. Refer to Option 2.
If you get notarization errors like
If you get notarization errors like
> The executable does not have the hardened runtime enabled.
> The executable does not have the hardened runtime enabled.
(Referring to files in `Metabase.app/Contents/Resources/jre/bin/`) then use a different build of the JRE.
(Referring to files in `Metabase.app/Contents/Resources/jre/bin/`) then use a different build of the JRE.
Assuming the OpenJDK folks have resolved this issue going forward, you are fine to use whatever the latest JRE version available is. I have been using the HotSpot JRE instead of the
OpenJ9 one but it ultimately shouldn't make a difference.
Assuming the OpenJDK folks have resolved this issue going forward, you are fine to use whatever the latest JRE version available is. I have been using the HotSpot JRE instead of the OpenJ9 one but it ultimately shouldn't make a difference.
</details>
<details><summary>Option 2 -- Ask Cam or Sameer for known working JRE</summary>
Have Cam or Sameer ZIP up their `/path/to/metabase/repo/OSX/Metabase/jre` folder and send it to you. Don't try Option 1 until we know the issues are fixed