Skip to content

Commit 08735bc

Browse files
committed
feat: add translation files to macOS app bundle
1 parent 2a1c725 commit 08735bc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

create-macos-app.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ TEAM_ID="???"
2424
# Name for notarytool keychain profile (store once with notarytool store-credentials)
2525
NOTARY_PROFILE="notarytool-profile"
2626

27+
LOCALES_ZIP_URL="https://www.heidisql.com/downloads/locale/HeidiSQL-locale.zip"
2728

2829
### INSTALL REQUIRED LIBRARIES VIA HOMEBREW
2930

@@ -215,6 +216,24 @@ rewrite_exe_dep "libpq"
215216
rewrite_exe_dep "libsqlite3"
216217
rewrite_exe_dep "libmariadb"
217218

219+
220+
### DOWNLOAD AND EXTRACT LOCALE FILES
221+
222+
if [[ -n "${LOCALES_ZIP_URL}" ]]; then
223+
LOCALE_DEST="${APP_DIR}/Contents/Resources/locale"
224+
mkdir -p "${LOCALE_DEST}"
225+
226+
TMP_ZIP="$(mktemp -t heidisql_locales.XXXXXX).zip"
227+
echo "Downloading locales from ${LOCALES_ZIP_URL}..."
228+
curl -L --fail --show-error "${LOCALES_ZIP_URL}" -o "${TMP_ZIP}"
229+
230+
echo "Extracting locales to ${LOCALE_DEST}..."
231+
/usr/bin/unzip -o "${TMP_ZIP}" -d "${LOCALE_DEST}" >/dev/null
232+
233+
rm -f "${TMP_ZIP}"
234+
fi
235+
236+
218237
echo "Done. Bundled app is at: ${APP_DIR}"
219238

220239

0 commit comments

Comments
 (0)