Skip to content

Commit d8e8b04

Browse files
committed
Update DMG build settings for MacOS Build
1 parent 5900604 commit d8e8b04

4 files changed

Lines changed: 166 additions & 109 deletions

File tree

.github/workflows/macos-test-build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ on:
44
branches: [master, development]
55
push:
66
branches: [master, development]
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
env:
13+
AWS_REGION : us-east-1
714

815
jobs:
916
check:
@@ -57,6 +64,20 @@ jobs:
5764
run: |
5865
ls
5966
python $GITHUB_WORKSPACE/OpenBCI_GUI_UnitTests/run-unittests.py
67+
68+
- name: Decrypt Certificate
69+
run: |
70+
openssl version
71+
openssl enc -aes-256-cbc -a -d -pbkdf2 -in $GITHUB_WORKSPACE/release_script/mac_only/Certificates_2023.p12.enc -out $GITHUB_WORKSPACE/release_script/mac_only/Certificates.p12 -k "$OPENSSL_CERT_K"
72+
openssl base64 -in $GITHUB_WORKSPACE/release_script/mac_only/Certificates.p12 -out $GITHUB_WORKSPACE/release_script/mac_only/Certificates.txt
73+
env:
74+
OPENSSL_CERT_K: ${{ secrets.OPENSSL_CERT_K }}
75+
76+
- name: Add OSX Signing Certificate
77+
uses: apple-actions/import-codesign-certs@v2
78+
with:
79+
p12-filepath: ${{ github.workspace }}/release_script/mac_only/Certificates.p12
80+
p12-password: ${{ secrets.CERTIFICATE_P12_PASSWORD }}
6081

6182
- name: Build GUI
6283
run: |
@@ -66,3 +87,19 @@ jobs:
6687
python $GITHUB_WORKSPACE/release_script/make-release.py --no-prompts
6788
GUI_COMMIT_TIME=`cat temp/timestamp.txt`
6889
GUI_VERSION_STRING=`cat temp/versionstring.txt`
90+
91+
- name: Store DMG on AWS
92+
env:
93+
AWS_DEFAULT_REGION: ${{ env.AWS_REGION }}
94+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_2023 }}
95+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_2023 }}
96+
run: |
97+
export CURRENT_BRANCH=`git branch --show-current`
98+
export GUI_COMMIT_TIME=`cat temp/timestamp.txt`
99+
export GUI_VERSION_STRING=`cat temp/versionstring.txt`
100+
cd $GITHUB_WORKSPACE
101+
ls
102+
aws s3 rm s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
103+
aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/${GUI_VERSION_STRING} --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
104+
aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
105+

appveyor.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ build_script:
4949
- set /p GUI_VERSION_STRING= < temp\versionstring.txt
5050

5151
deploy_script:
52-
- aws s3 rm s3://openbci-gui/%APPVEYOR_REPO_BRANCH%/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
53-
- aws s3 cp %APPVEYOR_BUILD_FOLDER%\. s3://openbci-gui/%APPVEYOR_REPO_BRANCH%/%GUI_VERSION_STRING%_%GUI_COMMIT_TIME% --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
54-
- aws s3 cp %APPVEYOR_BUILD_FOLDER%\. s3://openbci-gui/%APPVEYOR_REPO_BRANCH%/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
52+
#- aws s3 rm s3://openbci-gui/%APPVEYOR_REPO_BRANCH%/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
53+
#- aws s3 cp %APPVEYOR_BUILD_FOLDER%\. s3://openbci-gui/%APPVEYOR_REPO_BRANCH%/%GUI_VERSION_STRING%_%GUI_COMMIT_TIME% --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
54+
#- aws s3 cp %APPVEYOR_BUILD_FOLDER%\. s3://openbci-gui/%APPVEYOR_REPO_BRANCH%/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
5555
# copy index.html and list.js back to s3 to refresh it and avoid it being deleted by the eviction policy
56-
- aws s3 cp %APPVEYOR_BUILD_FOLDER%\release_script\index.html s3://openbci-gui/index.html
57-
- aws s3 cp %APPVEYOR_BUILD_FOLDER%\release_script\list.js s3://openbci-gui/list.js
56+
#- aws s3 cp %APPVEYOR_BUILD_FOLDER%\release_script\index.html s3://openbci-gui/index.html
57+
#- aws s3 cp %APPVEYOR_BUILD_FOLDER%\release_script\list.js s3://openbci-gui/list.js
5858

5959
notifications:
6060
- provider: Email
-3.08 KB
Binary file not shown.
Lines changed: 124 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals
3-
4-
import biplist
51
import os.path
2+
import plistlib
63

74
#
8-
# Settings file for dmgbuild
5+
# Example settings file for dmgbuild
96
#
107

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

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

1815
# .. Useful stuff ..............................................................
1916

20-
application = defines.get('app', '/Applications/TextEdit.app') # default
17+
application = defines.get("app", "/System/Applications/TextEdit.app") # noqa: F821
2118
appname = os.path.basename(application)
2219

20+
2321
def icon_from_app(app_path):
24-
plist_path = os.path.join(app_path, 'Contents', 'Info.plist')
25-
plist = biplist.readPlist(plist_path)
26-
icon_name = plist['CFBundleIconFile']
27-
icon_root,icon_ext = os.path.splitext(icon_name)
22+
plist_path = os.path.join(app_path, "Contents", "Info.plist")
23+
with open(plist_path, "rb") as f:
24+
plist = plistlib.load(f)
25+
icon_name = plist["CFBundleIconFile"]
26+
icon_root, icon_ext = os.path.splitext(icon_name)
2827
if not icon_ext:
29-
icon_ext = '.icns'
28+
icon_ext = ".icns"
3029
icon_name = icon_root + icon_ext
31-
return os.path.join(app_path, 'Contents', 'Resources', icon_name)
30+
return os.path.join(app_path, "Contents", "Resources", icon_name)
31+
3232

3333
# .. Basics ....................................................................
3434

@@ -39,31 +39,38 @@ def icon_from_app(app_path):
3939
# volume_name = 'Test'
4040

4141
# Volume format (see hdiutil create -help)
42-
format = defines.get('format', 'UDBZ')
42+
format = defines.get("format", "UDBZ") # noqa: F821
43+
44+
# Compression level (if relevant)
45+
# compression_level = 9
4346

4447
# Volume size
45-
size = defines.get('size', None)
48+
size = defines.get("size", None) # noqa: F821
4649

4750
# Files to include
48-
files = [ application ]
51+
files = [application]
4952

5053
# Symlinks to create
51-
symlinks = { 'Applications': '/Applications' }
54+
symlinks = {"Applications": "/Applications"}
55+
56+
# Files to hide
57+
# hide = [ 'Secret.data' ]
58+
59+
# Files to hide the extension of
60+
# hide_extension = [ 'README.rst' ]
5261

5362
# Volume icon
5463
#
5564
# You can either define icon, in which case that icon file will be copied to the
5665
# image, *or* you can define badge_icon, in which case the icon file you specify
57-
# will be used to badge the system's Removable Disk icon
66+
# will be used to badge the system's Removable Disk icon. Badge icons require
67+
# pyobjc-framework-Quartz.
5868
#
59-
#icon = '/path/to/icon.icns'
69+
# icon = '/path/to/icon.icns'
6070
badge_icon = icon_from_app(application)
6171

6272
# Where to put the icons
63-
icon_locations = {
64-
appname: (140, 120),
65-
'Applications': (500, 120)
66-
}
73+
icon_locations = {appname: (140, 120), "Applications": (500, 120)}
6774

6875
# .. Window configuration ......................................................
6976

@@ -87,7 +94,7 @@ def icon_from_app(app_path):
8794
#
8895
# Other color components may be expressed either in the range 0 to 1, or
8996
# as percentages (e.g. 60% is equivalent to 0.6).
90-
background = 'builtin-arrow'
97+
background = "builtin-arrow"
9198

9299
show_status_bar = False
93100
show_tab_view = False
@@ -106,23 +113,23 @@ def icon_from_app(app_path):
106113
# 'column-view'
107114
# 'coverflow'
108115
#
109-
default_view = 'icon-view'
116+
default_view = "icon-view"
110117

111118
# General view configuration
112119
show_icon_preview = False
113120

114121
# Set these to True to force inclusion of icon/list view settings (otherwise
115122
# we only include settings for the default view)
116-
include_icon_view_settings = 'auto'
117-
include_list_view_settings = 'auto'
123+
include_icon_view_settings = "auto"
124+
include_list_view_settings = "auto"
118125

119126
# .. Icon view configuration ...................................................
120127

121128
arrange_by = None
122129
grid_offset = (0, 0)
123130
grid_spacing = 100
124131
scroll_position = (0, 0)
125-
label_pos = 'bottom' # or 'right'
132+
label_pos = "bottom" # or 'right'
126133
text_size = 16
127134
icon_size = 128
128135

@@ -144,34 +151,34 @@ def icon_from_app(app_path):
144151
list_icon_size = 16
145152
list_text_size = 12
146153
list_scroll_position = (0, 0)
147-
list_sort_by = 'name'
154+
list_sort_by = "name"
148155
list_use_relative_dates = True
149-
list_calculate_all_sizes = False,
150-
list_columns = ('name', 'date-modified', 'size', 'kind', 'date-added')
156+
list_calculate_all_sizes = (False,)
157+
list_columns = ("name", "date-modified", "size", "kind", "date-added")
151158
list_column_widths = {
152-
'name': 300,
153-
'date-modified': 181,
154-
'date-created': 181,
155-
'date-added': 181,
156-
'date-last-opened': 181,
157-
'size': 97,
158-
'kind': 115,
159-
'label': 100,
160-
'version': 75,
161-
'comments': 300,
162-
}
159+
"name": 300,
160+
"date-modified": 181,
161+
"date-created": 181,
162+
"date-added": 181,
163+
"date-last-opened": 181,
164+
"size": 97,
165+
"kind": 115,
166+
"label": 100,
167+
"version": 75,
168+
"comments": 300,
169+
}
163170
list_column_sort_directions = {
164-
'name': 'ascending',
165-
'date-modified': 'descending',
166-
'date-created': 'descending',
167-
'date-added': 'descending',
168-
'date-last-opened': 'descending',
169-
'size': 'descending',
170-
'kind': 'ascending',
171-
'label': 'ascending',
172-
'version': 'ascending',
173-
'comments': 'ascending',
174-
}
171+
"name": "ascending",
172+
"date-modified": "descending",
173+
"date-created": "descending",
174+
"date-added": "descending",
175+
"date-last-opened": "descending",
176+
"size": "descending",
177+
"kind": "ascending",
178+
"label": "ascending",
179+
"version": "ascending",
180+
"comments": "ascending",
181+
}
175182

176183
# .. License configuration .....................................................
177184

@@ -193,54 +200,67 @@ def icon_from_app(app_path):
193200
# pt_PT, ro_RO, ru_RU, se, sk_SK, sl_SI, sr_RS, sv_SE, th_TH, to_TO, tr_TR,
194201
# uk_UA, ur_IN, ur_PK, uz_UZ, vi_VN, zh_CN, zh_TW
195202

196-
# license = {
197-
# 'default-language': 'en_US',
198-
# 'licenses': {
199-
# # For each language, the text of the license. This can be plain text,
200-
# # RTF (in which case it must start "{\rtf1"), or a path to a file
201-
# # containing the license text. If you're using RTF,
202-
# # watch out for Python escaping (or read it from a file).
203-
# 'English': b'''{\\rtf1\\ansi\\ansicpg1252\\cocoartf1504\\cocoasubrtf820
204-
# {\\fonttbl\\f0\\fnil\\fcharset0 Helvetica-Bold;\\f1\\fnil\\fcharset0 Helvetica;}
205-
# {\\colortbl;\\red255\\green255\\blue255;\\red0\\green0\\blue0;}
206-
# {\\*\\expandedcolortbl;;\\cssrgb\\c0\\c0\\c0;}
207-
# \\paperw11905\\paperh16837\\margl1133\\margr1133\\margb1133\\margt1133
208-
# \\deftab720
209-
# \\pard\\pardeftab720\\sa160\\partightenfactor0
210-
211-
# \\f0\\b\\fs60 \\cf2 \\expnd0\\expndtw0\\kerning0
212-
# \\up0 \\nosupersub \\ulnone \\outl0\\strokewidth0 \\strokec2 Test License\\
213-
# \\pard\\pardeftab720\\sa160\\partightenfactor0
214-
215-
# \\fs36 \\cf2 \\strokec2 What is this?\\
216-
# \\pard\\pardeftab720\\sa160\\partightenfactor0
217-
218-
# \\f1\\b0\\fs22 \\cf2 \\strokec2 This is the English license. It says what you are allowed to do with this software.\\
219-
# \\
220-
# }''',
221-
# },
222-
# 'buttons': {
223-
# # For each language, text for the buttons on the licensing window.
224-
# #
225-
# # Default buttons and text are built-in for the following languages:
226-
# #
227-
# # English (en_US), German (de_DE), Spanish (es_ES), French (fr_FR),
228-
# # Italian (it_IT), Japanese (ja_JP), Dutch (nl_NL), Swedish (sv_SE),
229-
# # Brazilian Portuguese (pt_BR), Simplified Chinese (zh_CN),
230-
# # Traditional Chinese (zh_TW), Danish (da_DK), Finnish (fi_FI),
231-
# # Korean (ko_KR), Norwegian (nb_NO)
232-
# #
233-
# # You don't need to specify them for those languages; if you fail to
234-
# # specify them for some other language, English will be used instead.
235-
236-
# 'en_US': (
237-
# b'English',
238-
# b'Agree',
239-
# b'Disagree',
240-
# b'Print',
241-
# b'Save',
242-
# b'If you agree with the terms of this license, press "Agree" to '
243-
# b'install the software. If you do not agree, press "Disagree".'
244-
# ),
245-
# },
246-
# }
203+
license = {
204+
"default-language": "en_US",
205+
"licenses": {
206+
# For each language, the text of the license. This can be plain text,
207+
# RTF (in which case it must start "{\rtf1"), or a path to a file
208+
# containing the license text. If you're using RTF,
209+
# watch out for Python escaping (or read it from a file).
210+
"en_GB": b"""{\\rtf1\\ansi\\ansicpg1252\\cocoartf1504\\cocoasubrtf820
211+
{\\fonttbl\\f0\\fnil\\fcharset0 Helvetica-Bold;\\f1\\fnil\\fcharset0 Helvetica;}
212+
{\\colortbl;\\red255\\green255\\blue255;\\red0\\green0\\blue0;}
213+
{\\*\\expandedcolortbl;;\\cssrgb\\c0\\c0\\c0;}
214+
\\paperw11905\\paperh16837\\margl1133\\margr1133\\margb1133\\margt1133
215+
\\deftab720
216+
\\pard\\pardeftab720\\sa160\\partightenfactor0
217+
218+
\\f0\\b\\fs60 \\cf2 \\expnd0\\expndtw0\\kerning0
219+
\\up0 \\nosupersub \\ulnone \\outl0\\strokewidth0 \\strokec2 Test License\\
220+
\\pard\\pardeftab720\\sa160\\partightenfactor0
221+
222+
\\fs36 \\cf2 \\strokec2 What is this?\\
223+
\\pard\\pardeftab720\\sa160\\partightenfactor0
224+
225+
\\f1\\b0\\fs22 \\cf2 \\strokec2 This is the English license. It says what you are allowed to do with this software.\\
226+
\\
227+
}""",
228+
"de_DE": "Ich bin ein Berliner. Bielefeld gibt's doch gar nicht.",
229+
},
230+
"buttons": {
231+
# For each language, text for the buttons on the licensing window.
232+
#
233+
# Default buttons and text are built-in for the following languages:
234+
#
235+
# da_DK: Danish
236+
# de_DE: German
237+
# en_AU: English (Australian)
238+
# en_GB: English (UK)
239+
# en_NZ: English (New Zealand)
240+
# en_US: English (US)
241+
# es_ES: Spanish
242+
# fr_CA: French (Canadian)
243+
# fr_FR: French
244+
# it_IT: Italian
245+
# ja_JP: Japanese
246+
# nb_NO: Norsk
247+
# nl_BE: Flemish
248+
# nl_NL: Dutch
249+
# pt_BR: Brazilian Portuguese
250+
# pt_PT: Portugese
251+
# sv_SE: Swedish
252+
# zh_CN: Simplified Chinese
253+
# zh_TW: Traditional Chinese
254+
#
255+
# You don't need to specify them for those languages; if you fail to
256+
# specify them for some other language, English will be used instead.
257+
"en_US": (
258+
b"English",
259+
b"Agree!",
260+
b"Disagree!",
261+
b"Print!",
262+
b"Save!",
263+
b'Do you agree or not? Press "Agree" or "Disagree".',
264+
),
265+
},
266+
}

0 commit comments

Comments
 (0)