Changes to make testing in macOS easier.
Previously, testing in macOS required running `make install`, switching over to the Finder, then double clicking TuxPaint.app, which was a time consuming process. This change allows the tuxpaint binary to be run directly from the command line (./tuxpaint) without `make install`, which makes it easier to test any small code change. Now `make install` is only required to build the TuxPaint.app bundle for execution from the Finder. FYI, `make install` also builds TuxPaint.dmg for distribution. A small change is included in this commit to allow TuxPaint.dmg to be built without building TuxPaint.app (if, for example, you delete TuxPaint.dmg by accident and need to rebuild it.) This is done via `make TuxPaint.dmg`.
This commit is contained in:
parent
1db3d431f5
commit
4231370205
4 changed files with 34 additions and 5 deletions
12
Makefile
12
Makefile
|
|
@ -458,7 +458,7 @@ trans:
|
||||||
######
|
######
|
||||||
|
|
||||||
windows_ARCH_INSTALL:=
|
windows_ARCH_INSTALL:=
|
||||||
osx_ARCH_INSTALL:=install-bundlefiles
|
osx_ARCH_INSTALL:=install-macbundle TuxPaint.dmg
|
||||||
beos_ARCH_INSTALL:=install-haiku
|
beos_ARCH_INSTALL:=install-haiku
|
||||||
linux_ARCH_INSTALL:=install-gnome install-kde install-kde-icons
|
linux_ARCH_INSTALL:=install-gnome install-kde install-kde-icons
|
||||||
ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
|
ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
|
||||||
|
|
@ -1014,9 +1014,9 @@ install-man:
|
||||||
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tp-magic-config.1.gz
|
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tp-magic-config.1.gz
|
||||||
|
|
||||||
|
|
||||||
# Install the support files for macOS application bundle and create DMG
|
# Install the support files for macOS application bundle
|
||||||
.PHONY: install-bundlefiles
|
.PHONY: install-macbundle
|
||||||
install-bundlefiles:
|
install-macbundle:
|
||||||
@echo
|
@echo
|
||||||
@echo "...Installing App Bundle Support Files..."
|
@echo "...Installing App Bundle Support Files..."
|
||||||
@install -d -m 755 $(BUNDLE)/Contents/MacOS
|
@install -d -m 755 $(BUNDLE)/Contents/MacOS
|
||||||
|
|
@ -1027,6 +1027,10 @@ install-bundlefiles:
|
||||||
@install -m 644 macos/Info.plist $(BUNDLE)/Contents
|
@install -m 644 macos/Info.plist $(BUNDLE)/Contents
|
||||||
@install -m 644 macos/tuxpaint.icns $(BUNDLE)/Contents/Resources
|
@install -m 644 macos/tuxpaint.icns $(BUNDLE)/Contents/Resources
|
||||||
@custom/macos.sh
|
@custom/macos.sh
|
||||||
|
|
||||||
|
|
||||||
|
# Create DMG for macOS
|
||||||
|
TuxPaint.dmg:
|
||||||
@echo
|
@echo
|
||||||
@echo "...Creating DMG Distribution File..."
|
@echo "...Creating DMG Distribution File..."
|
||||||
@custom/macos-mkdmg.sh
|
@custom/macos-mkdmg.sh
|
||||||
|
|
|
||||||
24
Resources/README.txt
Normal file
24
Resources/README.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
This folder exists to ease testing under macOS. Please ignore but do not
|
||||||
|
delete. More details are below.
|
||||||
|
|
||||||
|
macOS requires all files in an application have a specific folder structure.
|
||||||
|
We create this structure under the folder "TuxPaint.app" when `make install` is
|
||||||
|
run. But `make install` takes a long time to run under macOS due to the large
|
||||||
|
number of files that need to be copied, as well as all the processing we do to
|
||||||
|
those files (see custom/macos.sh for what we need to do.) This makes testing
|
||||||
|
even a small code change time consuming.
|
||||||
|
|
||||||
|
That's the problem this folder solves: Instead of creating the folder
|
||||||
|
structure under TuxPaint.app every time to test a code change to be able to run
|
||||||
|
the application, we pre-build the folder structure around the tuxpaint binary
|
||||||
|
so the binary can be executed directly without re-creating the folder structure
|
||||||
|
every time. Luckily for us, this only require that we only have a single
|
||||||
|
folder "Resources" in the root folder of the tuxpaint source code (with some
|
||||||
|
subfolders and symlinks underneath the Resources folder.)
|
||||||
|
|
||||||
|
I hope my fellow Tux Paint contributors will forgive me for taking up yet
|
||||||
|
another whole folder for use by a single platform, let alone almost empty, in
|
||||||
|
the root folder of the source code distribution meant for multiple platforms.
|
||||||
|
|
||||||
|
Mark Kim
|
||||||
|
2018.06.27
|
||||||
1
Resources/share/tuxpaint
Symbolic link
1
Resources/share/tuxpaint
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../data
|
||||||
|
|
@ -23,6 +23,6 @@
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>TXPT</string>
|
<string>TXPT</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2018-06-26</string>
|
<string>2018-06-27</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue