Use versioned resource in gnustep-gui. Lots of bundles and resources still unversioned though

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24844 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2007-03-09 23:33:58 +00:00
parent 2e5254afc1
commit df2318e0d9
5 changed files with 32 additions and 11 deletions

View file

@ -1,3 +1,13 @@
2007-03-09 Nicola Pero <nicola.pero@meta-innovation.com>
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 <stoyan255@yahoo.com>
* Source/GSSlideView.m: (- _slideFrom:to:): Calcuate number of

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 */