diff --git a/ChangeLog b/ChangeLog index f76e76a63..d90ac7e27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-03-09 Nicola Pero + + Updated gnustep-gui to use versioned library resources. + * Source/NSApplication.m ([+initialize]): Use + bundleForLibrary:version: to get the correct version of the + gnustep-gui resources. + * Source/GNUmakefile: Install resources in versioned directory. + * Resources/GNUmakefile: Same change. + * Panels/GNUmakefile.postamble: Same change. + 2007-03-09 Sergii Stoian * Source/GSSlideView.m: (- _slideFrom:to:): Calcuate number of diff --git a/Panels/GNUmakefile.postamble b/Panels/GNUmakefile.postamble index 2b441ecf6..983edd634 100644 --- a/Panels/GNUmakefile.postamble +++ b/Panels/GNUmakefile.postamble @@ -23,17 +23,24 @@ # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# TODO: extend resource-set.make so that this can be done easily with +# it. + +include ../Version +libgnustep-gui_INTERFACE_VERSION=$(GNUSTEP_GUI_MAJOR_VERSION).$(GNUSTEP_GUI_MINOR_VERSION) +POSTAMBLE_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Libraries/gnustep-gui/Versions/$(libgnustep-gui_INTERFACE_VERSION)/Resources + # Things to do after installing after-install:: ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)),) $(ECHO_NOTHING)echo "Copying localized resources into system..."; \ for l in $(LANGUAGES); do \ - if [ ! -d $(GNUSTEP_RESOURCES)/gnustep-gui/$$l.lproj ]; then \ - $(MKDIRS) $(GNUSTEP_RESOURCES)/gnustep-gui/$$l.lproj; \ + if [ ! -d $(POSTAMBLE_INSTALL_DIR)/$$l.lproj ]; then \ + $(MKDIRS) $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \ fi; \ for f in $(LOCALIZED_RESOURCE_FILES); do \ if [ -f $$l.lproj/$$f ]; then \ - cp -r $$l.lproj/$$f $(GNUSTEP_RESOURCES)/gnustep-gui/$$l.lproj; \ + cp -r $$l.lproj/$$f $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \ fi; \ done; \ done$(END_ECHO) @@ -41,13 +48,13 @@ endif ifneq ($(strip $(LOCALIZED_RESOURCE_COMPONENTS)),) $(ECHO_NOTHING)echo "Copying localized components into system..."; \ for l in $(LANGUAGES); do \ - if [ ! -d $(GNUSTEP_RESOURCES)/gnustep-gui/$$l.lproj ]; then \ - $(MKDIRS) $(GNUSTEP_RESOURCES)/gnustep-gui/$$l.lproj; \ + if [ ! -d $(POSTAMBLE_INSTALL_DIR)/$$l.lproj ]; then \ + $(MKDIRS) $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \ fi; \ for f in $(LOCALIZED_RESOURCE_COMPONENTS); do \ if [ -d $$l.lproj/$$f ]; then \ - cp -r $$l.lproj/$$f $(GNUSTEP_RESOURCES)/gnustep-gui/$$l.lproj; \ - rm -rf $(GNUSTEP_RESOURCES)/gnustep-gui/$$l.lproj/$$f/.svn; \ + cp -r $$l.lproj/$$f $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \ + rm -rf $(POSTAMBLE_INSTALL_DIR)/$$l.lproj/$$f/.svn; \ fi; \ done; \ done$(END_ECHO) @@ -58,7 +65,7 @@ after-uninstall:: ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)),) $(ECHO_NOTHING)for l in $(LANGUAGES); do \ if [ -d $$l.lproj ]; then \ - rm -rf $(GNUSTEP_RESOURCES)/gnustep-gui/$$l.lproj; \ + rm -rf $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \ fi; \ done$(END_ECHO) endif diff --git a/Resources/GNUmakefile b/Resources/GNUmakefile index 8a68ad259..98bccd923 100644 --- a/Resources/GNUmakefile +++ b/Resources/GNUmakefile @@ -26,11 +26,14 @@ GNUSTEP_INSTALLATION_DOMAIN = SYSTEM GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=../gui.make include $(GNUSTEP_MAKEFILES)/common.make +include ../Version +libgnustep-gui_INTERFACE_VERSION=$(GNUSTEP_GUI_MAJOR_VERSION).$(GNUSTEP_GUI_MINOR_VERSION) + RESOURCE_SET_NAME = gui-resources # Defined twice, one for old gnustep-makes, one for new ones. In the long # run, keep only the new xxx_INSTALL_DIR one. gui-resources_RESOURCE_FILES_INSTALL_DIR = Library/Libraries/Resources/gnustep-gui -gui-resources_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Libraries/Resources/gnustep-gui +gui-resources_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Libraries/gnustep-gui/Versions/$(libgnustep-gui_INTERFACE_VERSION)/Resources gui-resources_LANGUAGES = English Italian Lojban Esperanto German gui-resources_LOCALIZED_RESOURCE_FILES = Localizable.strings diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 588cda830..25cc1166a 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -413,7 +413,7 @@ RESOURCE_SET_NAME = libgui-resources # Defined twice, one for old gnustep-makes, one for new ones. In the long # run, keep only the new xxx_INSTALL_DIR one. libgui-resources_RESOURCE_FILES_INSTALL_DIR = Library/Libraries/Resources/gnustep-gui -libgui-resources_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Libraries/Resources/gnustep-gui +libgui-resources_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Libraries/gnustep-gui/Versions/$(libgnustep-gui_INTERFACE_VERSION)/Resources libgui-resources_RESOURCE_DIRS = libgui-resources_RESOURCE_FILES = Info-gnustep.plist diff --git a/Source/NSApplication.m b/Source/NSApplication.m index a4cb52283..8cdfa83a4 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -686,7 +686,8 @@ static NSSize scaledIconSizeForSize(NSSize imageSize) [self setVersion: 1]; /* Create the gui bundle we use to localize messages. */ - guiBundle = [NSBundle bundleForLibrary: @"gnustep-gui"]; + guiBundle = [NSBundle bundleForLibrary: @"gnustep-gui" + version: OBJC_STRINGIFY(GNUSTEP_GUI_MAJOR_VERSION.GNUSTEP_GUI_MINOR_VERSION)]; RETAIN(guiBundle); /* Save the base library exception handler */