summaryrefslogtreecommitdiff
path: root/README.MacOS
blob: b83f3f7731d1144df1030e62fdb1f286e6363875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Requirements:
-------------

1. Xcode 9 or above (for the compiler and build tools)
2. A version of Qt 5 or 6.  Homebrew, vcpkg, macports, or whatever you prefer.  For
   example, in HomeBrew...
		brew install qt

Note that Qt6 imposes greater Xcode and macOS requirements.  Qt6 uses `std::filesystem`, which
is only implemented with a 10.15 or later minimum macOS deployment target.

Building Quackle:
-----------------

Follow the cmake instructions in [README.md](README.md).  You can use the Xcode generator
to make an Xcode project if you wish.


Creating the DMG:
---------------------------------
* Set up Xcode with your Mac Developer account, and make sure you
  have a Developer ID Application signing certificate installed into
  your Keychain.
* In the Xcode settings, set the deployment target to 10.9 (earlier versions
  don't appear to work with C++11).
* Create an Archive build using XCode.
* From the Archive interface, click Validate... and validate for a Developer
  ID-signed Application.  If you have a signing profile, this validation
  should work.
* Click Export... and export as a Mac Application.
* You now have an unsigned application which is missing Qt frameworks, but
  will work locally.
* From the Qt4 distribution, run 'macdeployqt Quackle.app'.
* But, it turns out that the Frameworks installed by macdeployqt are partly
  broken and can't be code-signed.  So, remove the Frameworks directory, clone
  	https://github.com/jfultz/MacQt4Frameworks.git
  and cp -R the entire Frameworks directory into Quackle.app/Contents.
* Run 'codesign -s <identity> --force --deep Quackle.app' where <identity>
  is the SHA1 of your certificate (if you open it in Keychain and scroll all
  the way to the bottom, you'l see it...but you'll have to strip the spaces).
* Verify code-signing with
	spctl --assess --type execute --verbose Quackle.app
* Package it up in a .dmg.  I used the *very* nice package create-dmg off of
  Github with the following command-line:

create-dmg --app-drop-link 400 100 --icon Quackle.app 100 100 \
--window-size 500 250 --background DmgBackground.png Quackle.dmg Quackle.app