Skip to content

Commit 2d170c5

Browse files
authored
Xojo 2023r4 | API 2 (#16)
* Saved with Xojo 2023r4 * Update jo-tools/applescript-automation * Xojo: Auto Convert to API 2 * Add Pragma unused * Xojo API 2: Fix Deprecations * Xojo API 2: Dim - Var * Style: Whitespace * Xojo API 2: Post Build Script * Update Comments in Post Build Script * Version 2.0.0 * Adjust DMG Settings * Update ReadMe and ScreenShots * Update Example Build
1 parent 60a8e44 commit 2d170c5

13 files changed

+634
-467
lines changed

Build Automation.xojo_code

Lines changed: 127 additions & 124 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Xojo2DMG
2-
Xojo2DMG: CodeSign, DMG creation and Notarization (Post Build Script)
2+
Xojo2DMG: CodeSign, DMG creation and Notarization *(Post Build Script)*
33

44
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
55

@@ -9,19 +9,19 @@ A requirement for that is to CodeSign with Hardened Runtime. This might lead to
99
That's why I encourage everyone to CodeSign *(with Hardened Runtime)* each and every DebugRun on macOS, allowing you to develop and debug as close to a Release Build as possible.
1010

1111
This example shows how a Post Build Script can be used in a Xojo project in order to create a customized DiskImage, sign and notarize both .app and .dmg.
12-
You can easily customize the DiskImage's appearance by setting a couple of Variables in the Post Build Script. Additionally, even Notarization can be performed fully scripted. That requires to set up an item in your Keychain - see Info in the Script provided.
12+
You can easily customize the DiskImage's appearance by setting a couple of Variables in the Post Build Script. Additionally, even Notarization can be performed fully scripted. That requires to set up an item in your Keychain - see Info in the Scripts provided.
1313

1414

1515
### Requirements
1616
1. Xojo running on macOS *(obviously... you can't CodeSign for macOS on Windows)*
1717
2. CodeSigning, CodeSigning-Validation and Notarization requires Xcode to be installed
18-
5. Xojo2DMG requires
19-
1. to be run on **macOS 11.3** *(or later)*
20-
2. have **Xcode 13** *(or later)* installed
18+
3. Xojo2DMG requires
19+
* to be run on **macOS 11.3** *(or later)*
20+
* have **Xcode 13** *(or later)* installed
2121

2222

2323
### ScreenShots
24-
[This DMG](example-build/Xojo2DMG.dmg) has been created with Xojo2DMG *(built with Xojo 2022r2, macOS 12.6, Xcode 14.0.1 for CodeSigning/Notarization)*. It contains the built example app *(built as macOS Universal: x86_64 & ARM64)*.
24+
[This DMG](example-build/Xojo2DMG.dmg) has been created with Xojo2DMG *(built with Xojo 2023r4, macOS 14.4, Xcode 15.3 for CodeSigning/Notarization)*. It contains the built example app *(built as macOS Universal: x86_64 & ARM64)*.
2525
![ScreenShot: Disk Image](screenshots/xojo2dmg_screenshot_1.png?raw=true)
2626

2727
Xojo IDE with the Post Build Script:
@@ -31,16 +31,15 @@ Xojo IDE with the Post Build Script:
3131
### Requirements
3232
[Xojo](https://www.xojo.com/) is a rapid application development for Desktop, Web, Mobile & Raspberry Pi.
3333

34-
The Desktop application Xojo example project ```Xojo2DMG.xojo_project``` is using:
35-
- Xojo 2018r4
36-
- API 1
34+
The Desktop application Xojo example project ```Xojo2DMG.xojo_project``` and its Post Build Script is using:
35+
- Xojo 2023r4
36+
- API 2
3737

3838
### How to use in your own Xojo project?
3939
1. Copy the folder ```scripts``` to your project folder.
40-
2. Create a PostBuild Script in your project and copy-and-paste the example PostBuild Script provided in Xojo2DMG.
41-
3. If you're using **Xojo 2022r1** *(or newer)*: make sure this PostBuild Script runs after the Step 'Sign'. Otherwise Xojo will overwrite the CodeSigning again with it's 'Sign' step.
42-
*Note: You even need to do this if you're opening this example project in Xojo 2022r1+. The reason is that Xojo 2018r4 *(which has been used to save this example project)* doesn't have Xojo's 'Sign' step - and all existing Post Build steps are being placed before 'Sign' by default.*
43-
4. Read the Comments in PostBuild Script, modify according to your needs *(CodeSign Entitlements, Notarization, DMG look and feel)*.
40+
2. Create a PostBuild Script in your project and copy-and-paste the example PostBuild Script provided in ```Xojo2DMG.xojo_project```.
41+
3. If you're using **Xojo 2022r1** *(or newer)*: make sure this PostBuild Script runs after the Step 'Sign'. Otherwise Xojo will overwrite the CodeSigning again with it's 'Sign' step.
42+
4. Read the cComments in the provided Post Build Script, modify it according to your needs *(CodeSign Entitlements, Notarization, DMG look and feel)*.
4443

4544
## About
4645
Juerg Otter is a long term user of Xojo and working for [CM Informatik AG](https://cmiag.ch/). Their Application [CMI LehrerOffice](https://cmi-bildung.ch/) is a Xojo Design Award Winner 2018. In his leisure time Juerg provides some [bits and pieces for Xojo Developers](https://www.jo-tools.ch/).

Xojo2DMG.xojo_project

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
Type=Desktop
2-
RBProjectVersion=2018.04
3-
MinIDEVersion=20150400
2+
RBProjectVersion=2023.04
3+
MinIDEVersion=20210300
4+
OrigIDEVersion=00000000
45
Folder=resources;resources;&h000000003990F7FF;&h0000000000000000;false
56
BuildSteps=Build Automation;Build Automation.xojo_code;&h000000007106C7FF;&h0000000000000000;false
67
Folder=Xojo2DMG;Xojo2DMG;&h00000000605BD7FF;&h0000000000000000;false
78
Plist=Info;scripts/resources/Info.plist;&h000000005435A7FF;&h00000000605BD7FF;false
89
Class=App;Xojo2DMG/App.xojo_code;&h000000004AFCCFFF;&h00000000605BD7FF;false
9-
Window=Window1;Xojo2DMG/Window1.xojo_window;&h0000000074773FFF;&h00000000605BD7FF;false
10+
DesktopWindow=Window1;Xojo2DMG/Window1.xojo_window;&h0000000074773FFF;&h00000000605BD7FF;false
1011
MenuBar=MainMenuBar;Xojo2DMG/MainMenuBar.xojo_menu;&h00000000371E07FF;&h00000000605BD7FF;false
12+
Module=modMacOsApplications;Xojo2DMG/modMacOsApplications.xojo_code;&h0000000009304FFF;&h00000000605BD7FF;false
1113
Module=modAppleScriptUtils;Xojo2DMG/modAppleScriptUtils.xojo_code;&h000000002EF41FFF;&h00000000605BD7FF;false
1214
Class=XojoScriptEvaluator;Xojo2DMG/XojoScriptEvaluator.xojo_code;&h00000000711AED1D;&h00000000605BD7FF;false
1315
MultiImage=AppIcon_128;resources/AppIcon_128.xojo_image;&h000000006DB3EFFF;&h000000003990F7FF;false
1416
MultiImage=PayPal;resources/PayPal.xojo_image;&h000000000F8CD7FF;&h000000003990F7FF;false
1517
DefaultWindow=Window1
1618
AppMenuBar=MainMenuBar
17-
MajorVersion=1
18-
MinorVersion=1
19-
SubVersion=1
19+
MajorVersion=2
20+
MinorVersion=0
21+
SubVersion=0
2022
NonRelease=0
2123
Release=2
2224
InfoVersion=Xojo2DMG
2325
LongVersion=jo-tools.ch
24-
ShortVersion=1.1.1
26+
ShortVersion=2.0.0
2527
WinCompanyName=jo-tools.ch
2628
WinInternalName=Xojo2DMG
2729
WinProductName=Xojo2DMG
@@ -46,9 +48,13 @@ UseBuildsFolder=True
4648
HiDPI=True
4749
DarkMode=True
4850
CopyRedistNextToWindowsEXE=False
51+
IncludePDB=False
52+
WinUIFramework=False
4953
IsWebProject=False
5054
LinuxBuildArchitecture=1
51-
MacBuildArchitecture=1
55+
MacBuildArchitecture=4
56+
LinuxNormalizeControlSizes=True
5257
OptimizationLevel=6
5358
WindowsVersions={35138b9a-5d96-4fbd-8e2d-a2440225f93a}|{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}|{1f676c76-80e1-4239-95bb-83d0f6d0da78}|{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}
5459
WindowsRunAs=0
60+
MacOSMinimumVersion=

Xojo2DMG.xojo_resources

-9.9 MB
Binary file not shown.

Xojo2DMG/App.xojo_code

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#tag Class
22
Protected Class App
3-
Inherits Application
3+
Inherits DesktopApplication
44
#tag Event
5-
Sub Open()
6-
Me.AutoQuit = True
5+
Sub Opening()
6+
Me.AllowAutoQuit = True
77
End Sub
88
#tag EndEvent
99

Xojo2DMG/MainMenuBar.xojo_menu

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,106 @@
11
#tag Menu
22
Begin Menu MainMenuBar
3-
Begin MenuItem FileMenu
3+
Begin DesktopMenuItem FileMenu
44
SpecialMenu = 0
5-
Text = "&File"
65
Index = -2147483648
6+
Text = "&File"
7+
AutoEnabled = True
78
AutoEnable = True
89
Visible = True
9-
Begin QuitMenuItem FileQuit
10+
Begin DesktopQuitMenuItem FileQuit
1011
SpecialMenu = 0
11-
Text = "#App.kFileQuit"
1212
Index = -2147483648
13+
Text = "#App.kFileQuit"
1314
ShortcutKey = "#App.kFileQuitShortcut"
1415
Shortcut = "#App.kFileQuitShortcut"
16+
AutoEnabled = True
1517
AutoEnable = True
1618
Visible = True
1719
End
1820
End
19-
Begin MenuItem EditMenu
21+
Begin DesktopMenuItem EditMenu
2022
SpecialMenu = 0
21-
Text = "&Edit"
2223
Index = -2147483648
24+
Text = "&Edit"
25+
AutoEnabled = True
2326
AutoEnable = True
2427
Visible = True
25-
Begin MenuItem EditUndo
28+
Begin DesktopMenuItem EditUndo
2629
SpecialMenu = 0
27-
Text = "&Undo"
2830
Index = -2147483648
31+
Text = "&Undo"
2932
ShortcutKey = "Z"
3033
Shortcut = "Cmd+Z"
3134
MenuModifier = True
35+
AutoEnabled = True
3236
AutoEnable = True
3337
Visible = True
3438
End
35-
Begin MenuItem EditSeparator1
39+
Begin DesktopMenuItem EditSeparator1
3640
SpecialMenu = 0
37-
Text = "-"
3841
Index = -2147483648
42+
Text = "-"
43+
AutoEnabled = True
3944
AutoEnable = True
4045
Visible = True
4146
End
42-
Begin MenuItem EditCut
47+
Begin DesktopMenuItem EditCut
4348
SpecialMenu = 0
44-
Text = "Cu&t"
4549
Index = -2147483648
50+
Text = "Cu&t"
4651
ShortcutKey = "X"
4752
Shortcut = "Cmd+X"
4853
MenuModifier = True
54+
AutoEnabled = True
4955
AutoEnable = True
5056
Visible = True
5157
End
52-
Begin MenuItem EditCopy
58+
Begin DesktopMenuItem EditCopy
5359
SpecialMenu = 0
54-
Text = "&Copy"
5560
Index = -2147483648
61+
Text = "&Copy"
5662
ShortcutKey = "C"
5763
Shortcut = "Cmd+C"
5864
MenuModifier = True
65+
AutoEnabled = True
5966
AutoEnable = True
6067
Visible = True
6168
End
62-
Begin MenuItem EditPaste
69+
Begin DesktopMenuItem EditPaste
6370
SpecialMenu = 0
64-
Text = "&Paste"
6571
Index = -2147483648
72+
Text = "&Paste"
6673
ShortcutKey = "V"
6774
Shortcut = "Cmd+V"
6875
MenuModifier = True
76+
AutoEnabled = True
6977
AutoEnable = True
7078
Visible = True
7179
End
72-
Begin MenuItem EditClear
80+
Begin DesktopMenuItem EditClear
7381
SpecialMenu = 0
74-
Text = "#App.kEditClear"
7582
Index = -2147483648
83+
Text = "#App.kEditClear"
84+
AutoEnabled = True
7685
AutoEnable = True
7786
Visible = True
7887
End
79-
Begin MenuItem EditSeparator2
88+
Begin DesktopMenuItem EditSeparator2
8089
SpecialMenu = 0
81-
Text = "-"
8290
Index = -2147483648
91+
Text = "-"
92+
AutoEnabled = True
8393
AutoEnable = True
8494
Visible = True
8595
End
86-
Begin MenuItem EditSelectAll
96+
Begin DesktopMenuItem EditSelectAll
8797
SpecialMenu = 0
88-
Text = "Select &All"
8998
Index = -2147483648
99+
Text = "Select &All"
90100
ShortcutKey = "A"
91101
Shortcut = "Cmd+A"
92102
MenuModifier = True
103+
AutoEnabled = True
93104
AutoEnable = True
94105
Visible = True
95106
End

0 commit comments

Comments
 (0)