Create Resources directory dynamically at compile time
The 'Resources' directory is used in macOS development to test the binary without building TuxPaint.app bundle, which is helpful for rapid application development since creating the app bundle takes a long time. It's been reported that the symlink in the Resources directory was causing the 'release' target to copy the files in the 'data' directory twice into the source release tarball. This change removes the static Resources directory but creates it dynamically when the 'tuxpaint' target is built and removes it via 'clean' target so the 'release' target does not copy the files in the 'data' directory into the source release tarball twice.
This commit is contained in:
parent
e3356eb4d8
commit
4019f8b963
3 changed files with 5 additions and 26 deletions
6
Makefile
6
Makefile
|
|
@ -83,6 +83,9 @@ RSRC_CMD:=$($(OS)_RSRC_CMD)
|
|||
beos_MIMESET_CMD:=mimeset -f tuxpaint
|
||||
MIMESET_CMD:=$($(OS)_MIMESET_CMD)
|
||||
|
||||
macos_RAD_CMD:=[[ ! -d Resources/share ]] && mkdir -p Resources/share && ln -s ../../data Resources/share/tuxpaint || :
|
||||
RAD_CMD:=$($(OS)_RAD_CMD)
|
||||
|
||||
windows_SO_TYPE:=dll
|
||||
macos_SO_TYPE:=dylib
|
||||
beos_SO_TYPE:=so
|
||||
|
|
@ -607,7 +610,7 @@ clean:
|
|||
@-rm -f templates/.thumbs/*.png
|
||||
@if [ -d templates/.thumbs ]; then rmdir templates/.thumbs; fi
|
||||
@-if [ "x$(BUNDLE)" != "x" ]; then rm -rf $(BUNDLE); fi
|
||||
@-rm -f TuxPaint.dmg temp.dmg; rm -rf magic/*.dSYM
|
||||
@-rm -f TuxPaint.dmg temp.dmg; rm -rf magic/*.dSYM Resources
|
||||
@echo
|
||||
|
||||
# "make uninstall" should remove the various parts from their
|
||||
|
|
@ -1052,6 +1055,7 @@ tuxpaint: obj/tuxpaint.o obj/i18n.o obj/im.o obj/cursor.o obj/pixels.o \
|
|||
$(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(FRIBIDI_CFLAGS) $(DEFS) \
|
||||
-o tuxpaint $^ \
|
||||
$(SDL_LIBS) $(SVG_LIB) $(ARCH_LINKS)
|
||||
@$(RAD_CMD)
|
||||
@$(RSRC_CMD)
|
||||
@$(MIMESET_CMD)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue