From 887a45822703da2420df9c2ecc024b1f4dfc218e Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 15 Jan 2006 03:16:09 +0000 Subject: [PATCH] Work on Linux and OSX desktop integration stuff via make install and packaging via EPM. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4750 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- configure.in | 18 ++++++++++++++++-- fltk.list.in | 20 ++++++++++++++++---- fltk.spec | 7 +++++-- fluid/Makefile | 33 +++++++++++++++++++++++++++++++-- fluid/fluid.desktop | 10 ++++++++++ fluid/fluid.plist | 4 ++-- fluid/x-fluid.desktop | 8 ++++++++ makeinclude.in | 6 +++++- 8 files changed, 93 insertions(+), 13 deletions(-) create mode 100644 fluid/fluid.desktop create mode 100644 fluid/x-fluid.desktop diff --git a/configure.in b/configure.in index c0acfc50d..8c69efa65 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ dnl "$Id$" dnl dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl -dnl Copyright 1998-2005 by Bill Spitzak and others. +dnl Copyright 1998-2006 by Bill Spitzak and others. dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Library General Public @@ -37,7 +37,7 @@ dnl FLTK library versions... FL_MAJOR_VERSION=1 FL_MINOR_VERSION=1 FL_PATCH_VERSION=7 -FL_RELEASE_VERSION=cvs +FL_RELEASE_VERSION= FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION} AC_SUBST(FL_MAJOR_VERSION) @@ -558,6 +558,9 @@ THREADS= AC_ARG_WITH(links, [ --with-links make header links for common misspellings]) +INSTALL_DESKTOP="" +UNINSTALL_DESKTOP="" + case $uname in CYGWIN* | MINGW*) dnl Cygwin environment... @@ -622,6 +625,10 @@ case $uname in # Add a postbuild step after linking applications POSTBUILD="/Developer/Tools/Rez -t APPL -o" + + # Install/Uninstall FLUID application + INSTALL_DESKTOP="install-osx" + UNINSTALL_DESKTOP="uninstall-osx" ;; *) @@ -735,6 +742,10 @@ case $uname in if test "x$with_links" = xno; then HLINKS="#" fi + + # Install/Uninstall FLUID application support files + INSTALL_DESKTOP="install-linux" + UNINSTALL_DESKTOP="uninstall-linux" ;; esac @@ -744,6 +755,9 @@ AC_SUBST(HLINKS) AC_SUBST(POSTBUILD) AC_SUBST(THREADS) +AC_SUBST(INSTALL_DESKTOP) +AC_SUBST(UNINSTALL_DESKTOP) + dnl Figure out the appropriate formatted man page extension... case "$uname" in *BSD* | Darwin*) diff --git a/fltk.list.in b/fltk.list.in index f48dbe2b1..badf0cc27 100644 --- a/fltk.list.in +++ b/fltk.list.in @@ -5,7 +5,7 @@ # # (EPM can be found at http://www.easysw.com/epm/) # -# Copyright 1998-2005 by Bill Spitzak and others. +# Copyright 1998-2006 by Bill Spitzak and others. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -28,7 +28,7 @@ # %product Fast Light Tool Kit (FLTK) -%copyright 1998-2005 by Bill Spitzak and others. +%copyright 1998-2006 by Bill Spitzak and others. %vendor FLTK Development Team %license COPYING %readme README @@ -48,7 +48,7 @@ $datadir=@datadir@ $includedir=@includedir@ $libdir=@libdir@ $mandir=@mandir@ -$docdir=@docdir@ +$docdir=$(datadir)/doc/fltk $CAT1EXT=@CAT1EXT@ $CAT3EXT=@CAT3EXT@ @@ -124,9 +124,19 @@ f 0444 root sys /Applications/fluid.app/PkgInfo fluid/fluid.info d 0555 root sys /Applications/fluid.app/Contents/MacOS - l 0555 root sys /Applications/fluid.app/Contents/MacOS/fluid $bindir/fluid d 0555 root sys /Applications/fluid.app/Contents/Resources - -f 0444 root sys /Applications/fluid.app/Contents/Resources/fluid.icns fluid/fluid.icns +f 0444 root sys /Applications/fluid.app/Contents/Resources/fluid.icns fluid/icons/fluid.icns %postinstall $bindir/fltk-config --post $bindir/fluid %postremove /bin/rm -rf /Applications/fluid.app + +%system linux +f 0444 root sys /usr/share/applnk/Development/fluid.desktop fluid/fluid.desktop +f 0444 root sys /usr/share/icons/hicolor/16x16/fluid.png fluid/icons/fluid-16.png +f 0444 root sys /usr/share/icons/hicolor/32x32/fluid.png fluid/icons/fluid-32.png +f 0444 root sys /usr/share/icons/hicolor/48x48/fluid.png fluid/icons/fluid-48.png +f 0444 root sys /usr/share/icons/hicolor/64x64/fluid.png fluid/icons/fluid-64.png +f 0444 root sys /usr/share/icons/hicolor/128x128/fluid.png fluid/icons/fluid-128.png +f 0444 root sys /usr/share/mimelnk/application/x-fluid.desktop fluid/x-fluid.desktop + %system all # FLUID @@ -232,6 +242,7 @@ l 0000 root sys $includedir/FL/Fl_Image.h Fl_Image.H l 0000 root sys $includedir/FL/Fl_JPEG_Image.h Fl_JPEG_Image.H l 0000 root sys $includedir/FL/Fl_Input.h Fl_Input.H l 0000 root sys $includedir/FL/Fl_Input_.h Fl_Input_.H +l 0000 root sys $includedir/FL/Fl_Input_Choice.h Fl_Input_Choice.H l 0000 root sys $includedir/FL/Fl_Int_Input.h Fl_Int_Input.H l 0000 root sys $includedir/FL/Fl_Light_Button.h Fl_Light_Button.H l 0000 root sys $includedir/FL/Fl_Line_Dial.h Fl_Line_Dial.H @@ -270,6 +281,7 @@ l 0000 root sys $includedir/FL/Fl_Select_Browser.h Fl_Select_Browser.H l 0000 root sys $includedir/FL/Fl_Simple_Counter.h Fl_Simple_Counter.H l 0000 root sys $includedir/FL/Fl_Single_Window.h Fl_Single_Window.H l 0000 root sys $includedir/FL/Fl_Slider.h Fl_Slider.H +l 0000 root sys $includedir/FL/Fl_Spinner.h Fl_Spinner.H l 0000 root sys $includedir/FL/Fl_Tabs.h Fl_Tabs.H l 0000 root sys $includedir/FL/Fl_Tile.h Fl_Tile.H l 0000 root sys $includedir/FL/Fl_Timer.h Fl_Timer.H diff --git a/fltk.spec b/fltk.spec index 5509a67c2..f84088cf2 100644 --- a/fltk.spec +++ b/fltk.spec @@ -3,7 +3,7 @@ # # RPM spec file for FLTK. # -# Copyright 1998-2005 by Bill Spitzak and others. +# Copyright 1998-2006 by Bill Spitzak and others. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -33,7 +33,7 @@ Summary: Fast Light Tool Kit (FLTK) Name: fltk Version: %{version} Release: %{release} -Copyright: LGPL +License: LGPL Group: System Environment/Libraries Source: ftp://ftp.fltk.org/pub/fltk/%{version}/fltk-%{version}-source.tar.gz URL: http://www.fltk.org @@ -96,6 +96,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/* %dir %{prefix}/share/doc/fltk %{prefix}/share/doc/fltk/* +%{prefix}/share/applnk/* +%{prefix}/share/icons/* +%{prefix}/share/mimelnk/* # # End of "$Id$". diff --git a/fluid/Makefile b/fluid/Makefile index 254f3e16f..ec17b98cd 100644 --- a/fluid/Makefile +++ b/fluid/Makefile @@ -76,7 +76,7 @@ depend: $(CPPFILES) # Automatically generated dependencies... include makedepend -install: all +install: all $(INSTALL_DESKTOP) echo "Installing FLUID in $(DESTDIR)$(bindir)..." -$(MKDIR) $(DESTDIR)$(bindir) $(CP) $(FLUID) $(DESTDIR)$(bindir)/fluid$(EXEEXT) @@ -84,9 +84,38 @@ install: all $(DESTDIR)$(bindir)/fltk-config --post $(DESTDIR)$(bindir)/fluid$(EXEEXT) $(CHMOD) 755 $(DESTDIR)$(bindir)/fluid$(EXEEXT) -uninstall: +install-linux: + -$(MKDIR) $(DESTDIR)/usr/share/applnk/Development + $(CP) fluid.desktop $(DESTDIR)/usr/share/applnk/Development + for size in 16 32 48 64 128; do \ + -$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}; \ + $(CP) icons/fluid-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/fluid.png; \ + done + -$(MKDIR) $(DESTDIR)/usr/share/mimelnk/application + $(CP) x-fluid.desktop $(DESTDIR)/usr/share/mimelnk/application + +install-osx: + -$(MKDIR) $(DESTDIR)/Applications/fluid.app + $(CP) fluid.plist $(DESTDIR)/Applications/fluid.app/Info.plist + $(CP) fluid.info $(DESTDIR)/Applications/fluid.app/PkgInfo + -$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents + -$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents/MacOS + $(LN) $(bindir)/fluid $(DESTDIR)/Application/fluid.app/Contents/MacOS/fluid + -$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents/Resources + $(CP) icons/fluid.icns $(DESTDIR)/Applications/fluid.app/Contents/Resources + +uninstall: $(UNINSTALL_DESKTOP) $(RM) $(DESTDIR)$(bindir)/fluid$(EXEEXT) +uninstall-linux: + $(RM) $(DESTDIR)/usr/share/applnk/Development/fluid.desktop + $(RM) $(DESTDIR)/usr/share/icons/hicolor/*/fluid.png + $(RM) $(DESTDIR)/usr/share/mimelnk/application/x-fluid.desktop + +uninstall-osx: + $(RM) -r $(DESTDIR)/Applications/fluid.app + + # # Note: The rebuild target can only be used if you have the original .fl # files. This is normally only used by the FLTK maintainers... diff --git a/fluid/fluid.desktop b/fluid/fluid.desktop new file mode 100644 index 000000000..c95c89343 --- /dev/null +++ b/fluid/fluid.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=fluid +Comment=FLTK GUI Designer +TryExec=fluid +Exec=fluid +Icon=fluid +Terminal=false +Type=Application +Encoding=UTF-8 +Categories=Development diff --git a/fluid/fluid.plist b/fluid/fluid.plist index e6e774cdb..73bbfd657 100644 --- a/fluid/fluid.plist +++ b/fluid/fluid.plist @@ -17,7 +17,7 @@ English NSHumanReadableCopyright - Copyright 1998-2005 by Bill Spitzak and others + Copyright 1998-2006 by Bill Spitzak and others CFAppleHelpAnchor help @@ -38,7 +38,7 @@ 1.1.7 CFBundleGetInfoString - 1.1.7, Copyright 1998-2005 by Bill Spitzak and others + 1.1.7, Copyright 1998-2006 by Bill Spitzak and others CFBundleDocumentTypes diff --git a/fluid/x-fluid.desktop b/fluid/x-fluid.desktop new file mode 100644 index 000000000..994e6443c --- /dev/null +++ b/fluid/x-fluid.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=MimeType +MimeType=application/x-fluid +Icon=fluid.png +Patterns=*.fl +Name=FLUID +Comment=FLUID GUI Design +Encoding=UTF-8 diff --git a/makeinclude.in b/makeinclude.in index 89311336e..c067e131d 100644 --- a/makeinclude.in +++ b/makeinclude.in @@ -3,7 +3,7 @@ # # Make include file for the Fast Light Tool Kit (FLTK). # -# Copyright 1998-2005 by Bill Spitzak and others. +# Copyright 1998-2006 by Bill Spitzak and others. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -105,6 +105,10 @@ POSTBUILD = @POSTBUILD@ CAT1EXT = @CAT1EXT@ CAT3EXT = @CAT3EXT@ +# Additional GUI install/uninstall targets... +INSTALL_DESKTOP = @INSTALL_DESKTOP@ +UNINSTALL_DESKTOP = @UNINSTALL_DESKTOP@ + # Be quiet when building... .SILENT: