Improve packaging mechanism for macOS

This change automates the creation of an installer image for macOS containing both a client and server version for Jamulus.
This commit is contained in:
Daniel Masato 2020-04-18 17:49:11 +01:00
parent 8411debb39
commit 10f65f1ee2
5 changed files with 16 additions and 10 deletions

View file

@ -31,6 +31,11 @@ if [ ! -f "${ROOT_PATH}/${APP_NAME}.pro" ]; then
exit 1 exit 1
fi fi
# Install dmgbuild (for the current user), this is required to build the installer image
python -m ensurepip --user --default-pip
python -m pip install --user dmgbuild
DMGBUILD_BIN="$(python -c 'import site; print(site.USER_BASE)')/bin/dmgbuild"
# Get Jamulus version # Get Jamulus version
APP_VERSION=$(cat "${ROOT_PATH}/${APP_NAME}.pro" | sed -nE 's/^VERSION *= *(.*)$/\1/p') APP_VERSION=$(cat "${ROOT_PATH}/${APP_NAME}.pro" | sed -nE 's/^VERSION *= *(.*)$/\1/p')
@ -44,9 +49,9 @@ mkdir -p "${DEPLOY_PATH}"
build_app "${APP_NAME}" build_app "${APP_NAME}"
# Build Jamulus server # Build Jamulus server
build_app "${SERVER_NAME}" "DEFINES+=SERVER_MODE" build_app "${SERVER_NAME}" "DEFINES+=SERVER_BUNDLE"
# Build installer image # Build installer image
dmgbuild -s "${MAC_PATH}/deployment_settings.py" -D background="${RES_PATH}/installerbackground.png" \ "${DMGBUILD_BIN}" -s "${MAC_PATH}/deployment_settings.py" -D background="${RES_PATH}/installerbackground.png" \
-D app_path="${DEPLOY_PATH}/${APP_NAME}.app" -D server_path="${DEPLOY_PATH}/${SERVER_NAME}.app" \ -D app_path="${DEPLOY_PATH}/${APP_NAME}.app" -D server_path="${DEPLOY_PATH}/${SERVER_NAME}.app" \
-D license="${ROOT_PATH}/COPYING" "${APP_NAME} Installer" "${DEPLOY_PATH}/${INSTALLER_NAME}.dmg" -D license="${ROOT_PATH}/COPYING" "${APP_NAME} Installer" "${DEPLOY_PATH}/${INSTALLER_NAME}.dmg"

View file

@ -64,9 +64,9 @@ include_list_view_settings = False
# Where to put the icons # Where to put the icons
icon_locations = { icon_locations = {
app_name: (600, 240), app_name: (630, 210),
server_name: (500, 240), server_name: (530, 210),
"Applications": (790, 240) "Applications": (820, 210)
} }
# View/Window element configuration # View/Window element configuration
@ -76,18 +76,17 @@ show_toolbar = False
show_pathbar = False show_pathbar = False
show_sidebar = False show_sidebar = False
show_icon_preview = False show_icon_preview = False
sidebar_width = 180
# Window position in ((x, y), (w, h)) format # Window position in ((x, y), (w, h)) format
window_rect = ((200, 400), (900, 340)) window_rect = ((200, 400), (900, 320))
# Icon view configuration # Icon view configuration
arrange_by = None arrange_by = None
grid_offset = (0, 0) grid_offset = (0, 0)
grid_spacing = 100 grid_spacing = 72
scroll_position = (0, 0) scroll_position = (0, 0)
label_pos = "bottom" label_pos = "bottom"
icon_size = 80 icon_size = 72
text_size = 12 text_size = 12
# License configuration # License configuration

View file

@ -44,7 +44,9 @@ int main ( int argc, char** argv )
// initialize all flags and string which might be changed by command line // initialize all flags and string which might be changed by command line
// arguments // arguments
#if defined( SERVER_MODE ) && ( defined( __APPLE__ ) || defined( __MACOSX ) )
#if defined( SERVER_BUNDLE ) && ( defined( __APPLE__ ) || defined( __MACOSX ) )
// if we are on MacOS and we are building a server bundle, starts Jamulus in server mode
bool bIsClient = false; bool bIsClient = false;
#else #else
bool bIsClient = true; bool bIsClient = true;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 KiB

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.