-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathprepare_bundle_windows_x86.sh
executable file
·42 lines (33 loc) · 1.5 KB
/
prepare_bundle_windows_x86.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
#!/usr/bin/env bash
################################################################################
# PROJECT: Squeak Bundle Generation
# FILE: prepare_bundle_windows.sh
# CONTENT: Generate bundle for Windows (x86 and x86_64).
#
# AUTHORS: Fabio Niephaus, Hasso Plattner Institute, Potsdam, Germany
# Marcel Taeumel, Hasso Plattner Institute, Potsdam, Germany
################################################################################
begin_group "Creating Windows bundle for ${SMALLTALK_VERSION}..."
BUNDLE_NAME_WIN_X86="${IMAGE_NAME}-${VERSION_VM_WIN_X86}-${BUNDLE_NAME_WIN_X86_SUFFIX}"
export_variable "BUNDLE_NAME_WIN_X86" "${BUNDLE_NAME_WIN_X86}"
BUNDLE_PATH="${BUILD_PATH}/${BUNDLE_NAME_WIN_X86}"
echo "...creating directories..."
mkdir -p "${BUNDLE_PATH}"
echo "...copying Windows VM (x86-based)..."
cp -R "${TMP_PATH}/${VM_WIN_X86}/"* "${BUNDLE_PATH}"
copy_resources "${BUNDLE_PATH}"
echo "...merging template..."
cp "${WIN_TEMPLATE_PATH}/Squeak.ini" "${BUNDLE_PATH}/"
cp "${WIN_TEMPLATE_PATH}/Squeak.exe.manifest" "${BUNDLE_PATH}/"
cp "${WIN_TEMPLATE_PATH}/Squeak.exe.manifest" "${BUNDLE_PATH}/SqueakConsole.exe.manifest"
echo "...setting permissions..."
chmod +x "${BUNDLE_PATH}/Squeak.exe"
echo "...applying various patches..."
# Squeak.ini
sed -i".bak" "s/%WindowTitle%/${WINDOW_TITLE}/g" "${BUNDLE_PATH}/Squeak.ini"
rm -f "${BUNDLE_PATH}/Squeak.ini.bak"
# Remove .map files from $BUNDLE_PATH
rm -f "${BUNDLE_PATH}/"*.map
compress_into_product "${BUNDLE_NAME_WIN_X86}"
reset_build_dir
end_group