Skip to content

Commit

Permalink
Adjust and optimize DMG building for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed May 21, 2019
1 parent 4eccf1e commit 6eea4b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 76 deletions.
76 changes: 1 addition & 75 deletions build/dmgbuild_settings.py
Expand Up @@ -4,19 +4,6 @@
import biplist
import os.path

#
# Example settings file for dmgbuild
#

# Use like this: dmgbuild -s settings.py "Test Volume" test.dmg

# You can actually use this file for your own application (not just TextEdit)
# by doing e.g.
#
# dmgbuild -s settings.py -D app=/path/to/My.app "My Application" MyApp.dmg

# .. Useful stuff ..............................................................

application = defines.get('app', '/Applications/WAIL.app')
appname = os.path.basename(application)

Expand All @@ -30,33 +17,13 @@ def icon_from_app(app_path):
icon_name = icon_root + icon_ext
return os.path.join(app_path, 'Contents', 'Resources', icon_name)

# .. Basics ....................................................................

# Uncomment to override the output filename
# filename = 'test.dmg'

# Uncomment to override the output volume name
# volume_name = 'Test'

# Volume format (see hdiutil create -help)
format = defines.get('format', 'UDBZ')
size = defines.get('size', '650M')

# Volume size (must be large enough for your files)
size = defines.get('size', '600M')

# Files to include
files = [ application ]

# Symlinks to create
symlinks = { 'Applications': '/Applications' }

# Volume icon
#
# You can either define icon, in which case that icon file will be copied to the
# image, *or* you can define badge_icon, in which case the icon file you specify
# will be used to badge the system's Removable Disk icon
#
#icon = '/path/to/icon.icns'
badge_icon = icon_from_app(application)

# Where to put the icons
Expand All @@ -67,26 +34,6 @@ def icon_from_app(app_path):

# .. Window configuration ......................................................

# Background
#
# This is a STRING containing any of the following:
#
# #3344ff - web-style RGB color
# #34f - web-style RGB color, short form (#34f == #3344ff)
# rgb(1,0,0) - RGB color, each value is between 0 and 1
# hsl(120,1,.5) - HSL (hue saturation lightness) color
# hwb(300,0,0) - HWB (hue whiteness blackness) color
# cmyk(0,1,0,0) - CMYK color
# goldenrod - X11/SVG named color
# builtin-arrow - A simple built-in background with a blue arrow
# /foo/bar/baz.png - The path to an image file
#
# The hue component in hsl() and hwb() may include a unit; it defaults to
# degrees ('deg'), but also supports radians ('rad') and gradians ('grad'
# or 'gon').
#
# Other color components may be expressed either in the range 0 to 1, or
# as percentages (e.g. 60% is equivalent to 0.6).
background = 'builtin-arrow'

show_status_bar = False
Expand All @@ -99,13 +46,6 @@ def icon_from_app(app_path):
# Window position in ((x, y), (w, h)) format
window_rect = ((100, 100), (640, 280))

# Select the default view; must be one of
#
# 'icon-view'
# 'list-view'
# 'column-view'
# 'coverflow'
#
default_view = 'icon-view'

# General view configuration
Expand All @@ -127,20 +67,6 @@ def icon_from_app(app_path):
icon_size = 128

# .. List view configuration ...................................................

# Column names are as follows:
#
# name
# date-modified
# date-created
# date-added
# date-last-opened
# size
# kind
# label
# version
# comments
#
list_icon_size = 16
list_text_size = 12
list_scroll_position = (0, 0)
Expand Down
10 changes: 9 additions & 1 deletion bundledApps/MAKEFILE.sh
Expand Up @@ -51,7 +51,6 @@ esac

installRequirements ()
{
#pip install --upgrade --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
python3 -m pip install --upgrade wxPython
python3 -m pip install -r requirements.txt
}
Expand Down Expand Up @@ -84,6 +83,14 @@ cleanupByproducts ()
rm -r ./build/WAIL
}

optimizeforMac ()
{
# Remove Windows supporting package
rm ./dist/WAIL.app/bundledApps/memgator-linux-amd64
rm ./dist/WAIL.app/bundledApps/memgator-windows-amd64.exe
rm -rf ./dist/WAIL.app/bundledApps/Java/Windows
}

buildDiskImage ()
{
# Create a dmg
Expand All @@ -102,6 +109,7 @@ tweakOS ()
installRequirements
createBinary
deleteBinary # Remove previous version
optimizeforMac
mvProducts
cleanupByproducts

Expand Down
Binary file removed bundledApps/memgator
Binary file not shown.

0 comments on commit 6eea4b0

Please sign in to comment.