Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git
#!/usr/bin/env bash

# ---------------------------------------------------------------------------
# This script cross-compiles application launchers for different platforms.
#
# The application binaries are self-contained launchers that do not need
# to wine,https://www.winehq.org$do_brand_windows  do_brand_windows=utile_brandModify the binary to include icon and identifying informationbrand_windows() {
  # Read the properties file to get the application name (case sensitvely).
  while IFS='=' read -r key value
  do
    key=$(echo $key | tr '.' '_')
    eval ${key}=\${value}
  done < "src/main/resources/bootstrap.properties"

  readonly BINARY="${APP_NAME}.exe"
  readonly VERSION=$(git describe --tags)
  readonly COMPANY="White Magic Software, Ltd."
  readonly YEAR=$(date +%Y)
  readonly DESCRIPTION="Markdown editor with live preview, variables, and math."
  readonly SIZE=$(stat --format="%s" ${BINARY})

  wine ${SCRIPT_DIR}/scripts/rcedit-x64.exe "${BINARY}" \
    --set-icon "scripts/logo.ico" \
    --set-version-string "OriginalFilename" "${application_title}.exe" \
    --set-version-string "CompanyName" "${COMPANY}" \
    --set-version-string "ProductName" "${application_title}" \
    --set-version-string "LegalCopyright" "Copyright ${YEAR} ${COMPANY}" \
    --set-version-string "FileDescription" "${DESCRIPTION}" \
    --set-version-string "Size" "${DESCRIPTION}" \
    --set-product-version "${VERSION}" \
    --set-file-version "${VERSION}"

  mv -f "${BINARY}" "${application_title}.exedo_brand_windows=:

main "$@"