You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developers-guide-osx.md
+90-39Lines changed: 90 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,64 +3,115 @@
3
3
NOTE: These instructions are only for packaging a built Metabase uberjar into `Metabase.app`. They are not useful if your goal is to work on Metabase itself; for development, please see
4
4
our [developers' guide](developers-guide.md).
5
5
6
-
## Prereqs
6
+
## First-Time Configuration
7
7
8
-
1. Install XCode.
8
+
### Building
9
9
10
-
1. Install XCode command-line tools. In `Xcode` > `Preferences` > `Locations` select your current Xcode version in the `Command Line Tools` drop-down.
10
+
The following steps need to be done before building the Mac App:
11
+
12
+
1. Install XCode.
11
13
12
-
1.Run `./bin/build`to build the latest version of the uberjar.
14
+
1.Add a JRE to the `OSX/Metabase/jre`
13
15
14
-
1. Next, you'll need to run the following commands before building the app:
16
+
You can download a copy of a JRE from https://adoptopenjdk.net/releases.html — make sure you download a JRE rather than JDK. Move the `Contents/Home` directory from the JRE archive into `OSX/Metabase/jre`. For example:
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.
Every time you want to build a new version of the Mac App, you can simple update the bundled uberjar the same way.
33
+
34
+
At this point, you should try opening up the Xcode project and building the Mac App in Xcode by clicking the run button. The app should build and launch at this point. If it doesn't, ask Cam for help!
26
35
27
-
`./bin/osx-setup` will copy over things like the JRE into the Mac App directory for you. You only need to do this once the first time you plan on building the Mac App.
28
-
This also runs `./bin/build` to get the latest uberjar and copies it for you;if the script fails near the end, you can just copy the uberjar to `OSX/Resources/metabase.jar`.)
36
+
### Releasing
29
37
30
-
## Releasing
38
+
The following steps are prereqs for releasing the Mac App:
31
39
32
-
A handy Perl script called `./bin/osx-release` takes care of all of the details for you. Before you run it for the first time, you'll need to set up a few additional things:
33
40
34
-
```bash
35
-
# Install aws command-line client (if needed)
36
-
brew install awscli
41
+
1. Install XCode command-line tools. In `Xcode`>`Preferences`>`Locations`selectyour current Xcode version in the `Command Line Tools` drop-down.
37
42
38
-
# Configure AWS Credentials
39
-
# You'll need credentials that give you permission to write the metabase-osx-releases S3 bucket.
40
-
# You just need the access key ID and secret key; use the defaults for locale and other options.
41
-
aws configure --profile metabase
43
+
1. Install CPAN modules
42
44
43
-
# Obtain a copy of the private key used for signing the app (ask Cam)
44
-
# and put a copy of it at ./dsa_priv.pem
45
-
cp /path/to/private/key.pem OSX/dsa_priv.pem
46
-
```
45
+
```bash
46
+
sudo cpan
47
+
install force File::Copy::Recursive Readonly String::Util Text::Caml JSON
48
+
quit
49
+
```
50
+
51
+
You can install [PerlBrew](https://perlbrew.pl/) if you want to install CPAN modules without having to use `sudo`.
47
52
48
-
You'll need the `Apple Developer ID Application Certificate` in your computer's keychain.
49
-
You'll need to generate a Certificate Signing Request from Keychain Access, and have Sameer go to [the Apple Developer Site](https://developer.apple.com/account/mac/certificate/)
50
-
and generate one for you, then load the file on your computer.
53
+
Normally you shouldn't have to use `install force` to install the modules above, but `File::Copy::Recursive` seems fussy lately and has a failing test that prevents it from installing normally.
51
54
52
-
Finally, you may need to open the project a single time in Xcode to make sure the appropriate "build schemes" are generated (these are not checked into CI).
53
-
Run `open OSX/Metabase.xcodeproj` to open the project, which will automatically generate the appropriate schemes. This only needs to be done once.
55
+
1. Install AWS command-line client (if needed)
54
56
55
-
After that, you are good to go:
56
-
```bash
57
-
# Build the latest version of the uberjar and copy it to the Mac App build directory
58
-
# (You can skip this step if you just ran ./bin/osx-setup, because it does this step for you)
1. Configure AWS Credentials for `metabase` profile (used to upload artifacts to S3)
60
62
61
-
# Bundle entire app, and upload to s3
62
-
./bin/osx-release
63
-
```
63
+
You'll need credentials that give you permission to write the metabase-osx-releases S3 bucket.
64
+
You just need the access key ID and secret key; use the defaults for locale and other options.
65
+
66
+
```bash
67
+
aws configure --profile metabase
68
+
```
69
+
70
+
1. Obtain a copy of the private key for signing app updates (ask Cam) and put a copy of it at `OSX/dsa_priv.pem`
71
+
72
+
```bash
73
+
cp /path/to/private/key.pem OSX/dsa_priv.pem
74
+
```
75
+
76
+
1. Add `Apple Developer ID Application Certificate` to your computer's keychain.
77
+
78
+
You'll need to generate a Certificate Signing Request from Keychain Access, and have Sameer go to [the Apple Developer Site](https://developer.apple.com/account/mac/certificate/) and generate one for you, then load the file on your computer.
79
+
80
+
1. Export your Apple ID forbuilding the app as `METABASE_MAC_APP_BUILD_APPLE_ID`. (This Apple ID must be part of the Metabase orgin the Apple developer site. Ask Cam or Sameer to add you if it isn't.)
0 commit comments