-
Notifications
You must be signed in to change notification settings - Fork 8
/
prepare_bundles.sh
executable file
·98 lines (84 loc) · 2.97 KB
/
prepare_bundles.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/env bash
################################################################################
# PROJECT: Squeak Bundle Generation
# FILE: prepare_bundles.sh
# CONTENT: Generate different bundles such as the All-in-One.
#
# REQUIRES:
# SMALLTALK_VERSION ... e.g., Squeak64-trunk or Etoys64-trunk
# SHOULD_CODESIGN ... i.e., true or false
# tmp/Squeak.image
# tmp/Squeak.changes
# tmp/*.sources
# SQUEAK_VERSION ... e.g., Squeak6.0alpha
# SQUEAK_UPDATE ... e.g., 20639
# IMAGE_BITS ... i.e., 64 or 32
# OPTIONAL:
# CODESIGN_KEY ... i.e., for unlocking secret files
# CODESIGN_IV ... i.e., for unlocking secret files
# CERT_IDENTITY ... i.e., for signing the bundle
# CERT_PASSWORD ... i.e., for signing the bundle
# NOTARIZATION_USER ... i.e., for distributing the bundle
# NOTARIZATION_PASSWORD i.e., for distributing the bundle
# PROVIDES:
# IMAGE_NAME ... e.g., Squeak6.0alpha-20639-64bit
# product/*.zip
# product/*.dmg
#
# AUTHORS: Fabio Niephaus, Hasso Plattner Institute, Potsdam, Germany
# Marcel Taeumel, Hasso Plattner Institute, Potsdam, Germany
################################################################################
set -o errexit
source "env_vars"
source "helpers.sh"
source "helpers_bundles.sh"
[[ -z "${SMALLTALK_VERSION}" ]] && exit 2
[[ -z "${SHOULD_CODESIGN}" ]] && exit 3
[[ -z "${SQUEAK_VERSION}" ]] && exit 4
[[ -z "${SQUEAK_UPDATE}" ]] && exit 5
[[ -z "${IMAGE_BITS}" ]] && exit 6
readonly TEMPLATE_PATH="${HOME_PATH}/templates"
readonly AIO_TEMPLATE_PATH="${TEMPLATE_PATH}/all-in-one"
readonly LIN_TEMPLATE_PATH="${TEMPLATE_PATH}/linux"
readonly MAC_TEMPLATE_PATH="${TEMPLATE_PATH}/macos"
readonly WIN_TEMPLATE_PATH="${TEMPLATE_PATH}/windows"
readonly LOCALE_PATH="${HOME_PATH}/locale"
readonly VM_VERSIONS="versions.txt"
if is_etoys; then
readonly SMALLTALK_NAME="Etoys"
else
readonly SMALLTALK_NAME="Squeak"
fi
source "prepare_image_post.sh"
if should_use_rc_vm; then
# use latest release candidate from GitHub
# https://github.com/OpenSmalltalk/opensmalltalk-vm/releases
download_and_extract_all_vms_rc
else
download_and_extract_all_vms
fi
if is_64bit; then
# There are no 32-bit VMs for macOS anymore.
begin_group "Creating unified VM for macOS..."
create_unified_vm_macOS "${TMP_PATH}/${VM_MAC}" "${TMP_PATH}/${VM_MAC_ARM}" "${TMP_PATH}/${VM_MAC_X86}"
end_group
readonly VERSION_VM_MACOS=${VERSION_VM_MACOS_ARM}
fi
if should_codesign; then
source "helpers_codesign.sh"
prepare_codesign
fi
prepare_image_bundle # Just .image and .changes in an archive
if is_64bit; then
source "prepare_bundle_macos.sh" # Unified binary arm64+x64
source "prepare_bundle_macos_x86.sh"
source "prepare_bundle_macos_arm.sh"
fi
source "prepare_bundle_aio.sh"
source "prepare_bundle_linux_x86.sh"
source "prepare_bundle_linux_arm.sh"
source "prepare_bundle_windows_x86.sh"
# source "prepare_bundle_windows_arm.sh"
if should_codesign; then
cleanup_codesign
fi