Commit graph

17 commits

Author SHA1 Message Date
Marc Durdin
473bc48ba7 chore(mac): force detach of disk image during build after 5 failures
Fixes #10200.

This is a two-part fix. First, with our normal `set -e` build
environment, the existing loop never ran more than once, so the 5
second delay pattern we used to use in the dim dark past was no longer
being applied. It is likely that in most cases, this will address the
failure to detach.

The second part is to escalate our detach with a `-force` parameter,
after 5 failed polite attempts. This is new and is addressing the
suggestion in #10200, so we'll have to see if it has any impact on
build stability.
2023-12-11 08:15:42 +07:00
Marc Durdin
6c5b27365a chore(mac): use mac cp for -R ops
Because we don't know if mac BSD cp or GNU cp will be first on the path,
where there is ambiguity (e.g. with -R flag), we will use the macOS cp
command in /bin to ensure that we have consistent results. The
alternative would be to fixup each instance of the cp parameters so that
they work consistently with either cp command, but given these scripts
can run only on macOS, that seems unnecessary.

This replaces the earlier change in 97c6331b5.
2023-04-09 07:05:44 +07:00
Marc Durdin
97c6331b5f fix(mac): fix corrupt installer
Fixes #8533 after build agent maintenance put GNU coreutils cp on path
ahead of macOS /bin/cp. This subtly changed the behaviour of the `-R`
flag such that it copied the folder into a subfolder rather than copying
the contents of the folder into the destination folder:

Original layout:

```
Install Keyman.app/Contents/MacOS/
  applet
  textinputsource
  Keyman.app/
```

Corrupted layout:

```
Install Keyman.app/Install Keyman.app/Contents/MacOS/
  applet
  textinputsource
  Keyman.app/
```

Query: should we be rolling back the path changes so that /bin is first
on the path? I am concerned about other subtle changes in behaviour in
the macOS and iOS builds. Otherwise it feels like we may need to audit
the scripts in /mac, /ios (and possibly /common, /core, /web,
/resources) for potential changes.

Annoyed that it took me so long. Also annoying that macOS fails so
subtly when a parent folder has the .app extension in its name.
2023-04-07 06:45:34 +07:00
Marc Durdin
ce864ea923 chore: update standard script prolog to use builtin instead of dirname 2023-02-22 11:04:15 +07:00
Marc Durdin
463c7ff907 chore: remove greadlink from standard script prolog 2023-02-22 10:43:06 +07:00
Marc Durdin
4d53a277f3 chore: use builder_die, remove fail 2023-02-20 09:15:38 +07:00
Marc Durdin
318b4d4478 chore: use builder_warn, remove warn 2023-02-20 08:56:31 +07:00
Marc Durdin
767927bf16 chore(common): use /usr/bin/env bash
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.

This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:

```
if [[ -v _builder_params[$e] ]]; then
```
2022-07-25 14:59:37 +10:00
Marc Durdin
5fac633fb6 fix(common): build script help param
When working on a new build script, I tripped over the `-?` question
mark help parameter here, as it needs to be escaped. Opted to fix all
the instances in our scripts, although AFAICT there would not have been
current bugs arising from this, as there were no conflicting one
character options lower in the case list.
2021-05-28 09:50:40 +10:00
Marc Durdin
255e4f4b7a chore: Merge branch 'master' into chore/beta-to-master-p9s2-1 2020-02-17 10:11:15 +11:00
Marc Durdin
06063199c0 fix(mac): attempt multiple times to detach dmg in build 2020-02-14 11:50:35 +11:00
Marc Durdin
d6dbe602c2 fix(mac): dmg background and script tweaks 2020-02-05 16:31:27 +11:00
Marc Durdin
b207185356 fix(mac): remove version param 2020-01-30 06:14:55 +11:00
Marc Durdin
ccfef64c99 chore(mac): use new version infrastructure 2020-01-29 11:15:36 +11:00
Marc Durdin
f8ea457325 feat(mac): install script
First steps towards a clean install script
for Keyman for Mac. Some steps still out-
of-order for now, particularly opening
System Preferences to allow Keyman before
Keyman has run for first time.
2020-01-29 10:12:26 +11:00
Tom Bogle
52bbc00545 [Mac] Changed to use lowercase "k" when generating DMG file. 2017-08-28 08:04:18 -04:00
Tom Bogle
87aa5057ef [Mac] Initial check-in to open-source repo 2017-08-10 13:11:52 +07:00