@tokamakdev/platform-ios-simulator-x64 0.1.1-beta.98 → 0.1.1-beta.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,12 +61,14 @@ bundle=$output
|
|
|
61
61
|
if [[ "$platform" == macos ]]; then
|
|
62
62
|
contents=$bundle/Contents
|
|
63
63
|
executable_dir=$contents/MacOS
|
|
64
|
-
|
|
64
|
+
resources_dir=$contents/Resources
|
|
65
|
+
app_dir=$resources_dir/app
|
|
65
66
|
icon=${TOKAMAK_MACOS_ICON:-}
|
|
66
67
|
app_files=("${TOKAMAK_MACOS_PLIST:-}" "${TOKAMAK_MACOS_ENTITLEMENTS:-}")
|
|
67
68
|
else
|
|
68
69
|
contents=$bundle
|
|
69
70
|
executable_dir=$bundle
|
|
71
|
+
resources_dir=$bundle
|
|
70
72
|
app_dir=$bundle/app
|
|
71
73
|
icon=${TOKAMAK_IOS_ICON:-}
|
|
72
74
|
app_files=("${TOKAMAK_IOS_PLIST:-}" "${TOKAMAK_IOS_ENTITLEMENTS:-}")
|
|
@@ -137,16 +139,14 @@ cp -R "$input/app/." "$app_dir/"
|
|
|
137
139
|
|
|
138
140
|
if [[ -n "$icon" ]]; then
|
|
139
141
|
if [[ "$platform" == macos ]]; then
|
|
140
|
-
icon_output=$contents/Resources
|
|
141
142
|
icon_targets=(--target-device mac)
|
|
142
143
|
else
|
|
143
|
-
icon_output=$bundle
|
|
144
144
|
icon_targets=(--target-device iphone --target-device ipad)
|
|
145
145
|
fi
|
|
146
146
|
# actool names the app icon after its package.
|
|
147
147
|
cp -R "$icon" "$temporary/AppIcon.icon"
|
|
148
148
|
xcrun --sdk "$sdk" actool \
|
|
149
|
-
--compile "$
|
|
149
|
+
--compile "$resources_dir" \
|
|
150
150
|
--platform "$sdk" \
|
|
151
151
|
--minimum-deployment-target "$minimum" \
|
|
152
152
|
--app-icon AppIcon \
|
|
@@ -227,6 +227,19 @@ xcrun --sdk "$sdk" strip -x "$executable_dir/$app_slug"
|
|
|
227
227
|
|
|
228
228
|
write_plist
|
|
229
229
|
|
|
230
|
+
# Plugins' resources go in the bundle's resources directory, where the system
|
|
231
|
+
# finds files such as notification sounds by name.
|
|
232
|
+
for resource in "$input/plugins"/*/resources/*; do
|
|
233
|
+
[[ -f "$resource" ]] || continue
|
|
234
|
+
name=${resource##*/}
|
|
235
|
+
name=${name#*-}
|
|
236
|
+
if [[ -e "$resources_dir/$name" ]]; then
|
|
237
|
+
echo "plugin resource '$name' would replace a file in the app bundle" >&2
|
|
238
|
+
exit 1
|
|
239
|
+
fi
|
|
240
|
+
cp "$resource" "$resources_dir/$name"
|
|
241
|
+
done
|
|
242
|
+
|
|
230
243
|
sign_bundle
|
|
231
244
|
mkdir -p "$(dirname "$bundle_key_file")"
|
|
232
245
|
printf '%s' "$bundle_key" > "$bundle_key_file"
|