Commit 434b926a authored by Oskar Skog's avatar Oskar Skog

freedesktop=, macosx= and windows= now use "true" and "false" for value

parent ea0d90e5
......@@ -10,6 +10,9 @@
force the correct version number.
* Makefile.static (dist): Don't depend on zip and tarballs. Doing
that will cause issues with parallel make.
* Makefile.static, configure.py, RELEASE-NOTES, INSTALL: Changed the
values for freedesktop, macosx and windows to the unambiguous true
or false.
2016-07-19 Oskar Skog <oskar.skog.finland@gmail.com>
0.2.22
......
......@@ -115,9 +115,9 @@ INSTALLATION
srcdir The directory extracted from the tarball.
builddir (Current working directory)
freedesktop Empty=false, non-empty=true; "Linux" desktop
macosx Empty=false, non-empty=true; Mac OS X
windows Empty=false, non-empty=true; Windows (Cygwin)
freedesktop 'true' or 'false'; "Linux" desktop
macosx 'true' or 'false'; Mac OS X
windows 'true' or 'false'; Windows (Cygwin)
NOTE 1
......
......@@ -83,10 +83,10 @@ ALL_STAGE := "$(MAIN_STAGE)" "$(OSX_WRAPPER)" "$(OSX_INFO_PLIST)" \
all : $(MAIN_STAGE) $(ENGINECFG_STAGE)
@$(info) 'Maybe building .desktop and app/bundle'
@if [ -n "$(freedesktop)" ]; then \
@if "$(freedesktop)"; then \
cd "$(builddir)" && make build-freedesktop > /dev/null; \
fi
@if [ -n "$(macosx)" ]; then \
@if "$(macosx)"; then \
cd "$(builddir)" && make build-macosx > /dev/null; \
fi
......@@ -185,11 +185,11 @@ install-dirs : FORCE
@if [ "$(MODULES_OTHERVER)" != "non-existent" ]; then \
mkdir -p "$(DESTDIR)$(MODULES_OTHERVER)" || true; \
fi
@if [ -n "$(freedesktop)" ]; then \
@if "$(freedesktop)"; then \
mkdir -p "$(DESTDIR)$(prefix)/share/applications" || true; \
mkdir -p "$(DESTDIR)$(prefix)/share/pixmaps" || true; \
fi
@if [ -n "$(macosx)" ]; then \
@if "$(macosx)"; then \
$(INSTALL) -d "$(BUNDLE)/Contents"; \
$(INSTALL) -d "$(BUNDLE)/Contents/MacOS"; \
$(INSTALL) -d "$(BUNDLE)/Contents/Resources"; \
......@@ -207,7 +207,7 @@ install : check-install-cfg install-dirs
@: # Create highscore file unless it already exists.
@touch "$(HISCORE_FILE)"
@chmod 666 "$(HISCORE_FILE)"
@if [ -n "$(freedesktop)" ]; then \
@if "$(freedesktop)"; then \
$(info) 'Installing icons and .desktop (NORMAL_INSTALL)'; \
$(INSTALL) -m 644 "$(FD_DESKTOP_STAGE)" "$(FD_DESKTOP_DEST)"; \
$(INSTALL) -d "$(FD_ICON_DESTDIR16)"; \
......@@ -219,7 +219,7 @@ install : check-install-cfg install-dirs
$(INSTALL) -d "$(FD_ICON_DESTDIR256)"; \
$(INSTALL) -m 644 "$(FD_ICON_SRC256)" "$(FD_ICON_DEST256)"; \
fi
@if [ -n "$(macosx)" ]; then \
@if "$(macosx)"; then \
$(info) 'Installing app/bundle'; \
$(INSTALL) -m 644 "$(OSX_INFO_PLIST)" \
"$(BUNDLE)/Contents/Info.plist"; \
......@@ -233,12 +233,12 @@ install : check-install-cfg install-dirs
@$(NO_OTHERVER) || ln -sf "$(SOLVER_DEST)" "$(SOLVER_DEST_OTHERVER)"
@$(NO_OTHERVER) || ln -sf "$(FIELDS_DEST)" "$(FIELDS_DEST_OTHERVER)"
@$(POST_INSTALL)
@if [ -n "$(freedesktop)" ]; then \
@if "$(freedesktop)"; then \
$(info) 'Installing icons and .desktop (POST_INSTALL)'; \
xdg-desktop-menu install --novendor --mode system \
"$(FD_DESKTOP_DEST)" || true; \
fi
@if [ -n "$(windows)" ]; then \
@if "$(windows)"; then \
$(info) 'Installing shortcuts'; \
$(INSTALL) "$(CYG_ICO_SRC)" "$(CYG_ICO_DEST)"; \
mkshortcut -A -P -a '-lc $(NAME)' -n "$(NAME_C)" \
......@@ -269,7 +269,7 @@ CYG_DESKTOP_ME := $(W_U)/Desktop/$(W_F)
uninstall: FORCE
@$(PRE_UNINSTALL)
@if [ -n "$(freedesktop)" ]; then \
@if "$(freedesktop)"; then \
xdg-desktop-menu uninstall --novendor --mode system \
"$(FD_DESKTOP_DEST)" || true; \
fi
......@@ -278,16 +278,16 @@ uninstall: FORCE
@-rm "$(ENGINE_DEST)" "$(SOLVER_DEST)" "$(FIELDS_DEST)" "$(MAIN_DEST)"
@$(NO_OTHERVER) || rm "$(ENGINE_DEST_OTHERVER)" \
"$(SOLVER_DEST_OTHERVER)" "$(FIELDS_DEST_OTHERVER)" || true
@if [ -n "$(freedesktop)" ]; then \
@if "$(freedesktop)"; then \
rm "$(FD_DESKTOP_DEST)" || true; \
for size in $(FD_ICON_SIZES); do \
rm "$(FD_ICON_DEST)" || true; \
done; \
fi
@if [ -n "$(macosx)" ]; then \
@if "$(macosx)"; then \
rm -r "$(BUNDLE)" || true; \
fi
@if [ -n "$(windows)" ]; then \
@if "$(windows)"; then \
rm "$(CYG_STARTMENU_NT5X_ALL)" || true; \
rm "$(CYG_STARTMENU_NT5X_ME)" || true; \
rm "$(CYG_STARTMENU_NT6X_ALL)" || true; \
......@@ -310,17 +310,17 @@ print-destinations: FORCE
echo "Fields module symlink: $(FIELDS_DEST_OTHERVER)"
@echo "Configuration files: " '$(CFG_DIR) (directory)'
@echo "Highscores file: " "$(HISCORE_FILE)"
@if [ -n "$(freedesktop)" ]; then \
@if "$(freedesktop)"; then \
echo "[freedesktop.org] .desktop:" $(FD_DESKTOP_DEST)"; \
echo "[freedesktop.org] Icon: " $(FD_ICON_DEST16)"; \
echo "[freedesktop.org] Icon: " $(FD_ICON_DEST32)"; \
echo "[freedesktop.org] Icon: " $(FD_ICON_DEST64)"; \
echo "[freedesktop.org] Icon: " $(FD_ICON_DEST256)"; \
fi
@if [ -n "$(macosx)" ]; then \
@if "$(macosx)"; then \
echo "[Mac OS X] Bundle (App):" $(BUNDLE) '(directory)'; \
fi
@if [ -n "$(windows)" ]; then \
@if "$(windows)"; then \
echo "[Windows] Shortcut: $(CYG_STARTMENU_NT5X_ALL)"; \
echo "[Windows] Shortcut: $(CYG_STARTMENU_NT5X_ME)"; \
echo "[Windows] Shortcut: $(CYG_STARTMENU_NT6X_ALL)"; \
......@@ -335,8 +335,8 @@ check: FORCE
@$(srcdir)check.sh "$(srcdir)" "$(builddir)"
dist : FORCE
@cd "$(builddir)" && make tarballs
@cd "$(builddir)" && make zip
@cd "$(builddir)" && make tarballs > /dev/null
@cd "$(builddir)" && make zip > /dev/null
release : dist check
@cp -t ~www-data/archive/"$(NAME)/" "$(PKG).tar.gz" \
......
......@@ -475,8 +475,7 @@ def detect_desktop(Makefile, flags):
Sets Makefile['macosx'] if needed.
Sets Makefile['windows'] if needed.
The value for these variables are either an empty string (meaning
false) or a non-empty string (meaning true).
The value for these variables are either 'true' or 'false'.
Checks for the existence of various desktop environments.
'''
......@@ -490,9 +489,9 @@ def detect_desktop(Makefile, flags):
if desktop not in Makefile:
try:
os.listdir(mapping[desktop])
Makefile[desktop] = 'non-empty'
Makefile[desktop] = 'true'
except OSError:
Makefile[desktop] = ''
Makefile[desktop] = 'false'
return False
def main():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment