From a1f77c4293be30ae9833faec4d84c5bad159f224 Mon Sep 17 00:00:00 2001 From: "mozilla@weilbacher.org" Date: Thu, 13 Mar 2008 17:39:33 -0700 Subject: [PATCH] [OS/2] Bug 421626: Fix packaging and signing on OS/2, r=ted.mielczarek --- toolkit/mozapps/installer/os2/sign.cmd | 17 +++++++++++++++++ toolkit/mozapps/installer/os2/strip.cmd | 2 ++ toolkit/mozapps/installer/packager.mk | 6 +++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 toolkit/mozapps/installer/os2/sign.cmd create mode 100755 toolkit/mozapps/installer/os2/strip.cmd diff --git a/toolkit/mozapps/installer/os2/sign.cmd b/toolkit/mozapps/installer/os2/sign.cmd new file mode 100755 index 00000000000..f991a54abf7 --- /dev/null +++ b/toolkit/mozapps/installer/os2/sign.cmd @@ -0,0 +1,17 @@ +/* An adapted version of sign.cmd from NSS */ +PARSE ARG dist filename +dist=forwardtoback(dist); +'@echo 'dist +'set BEGINLIBPATH='dist'\bin;%BEGINLIBPATH%' +'set LIBPATHSTRICT=T' +dist'\bin\shlibsign -v -i 'filename +exit + +forwardtoback: procedure + arg pathname + parse var pathname pathname'/'rest + do while (rest <> "") + pathname = pathname'\'rest + parse var pathname pathname'/'rest + end + return pathname diff --git a/toolkit/mozapps/installer/os2/strip.cmd b/toolkit/mozapps/installer/os2/strip.cmd new file mode 100755 index 00000000000..6b60acefb46 --- /dev/null +++ b/toolkit/mozapps/installer/os2/strip.cmd @@ -0,0 +1,2 @@ +@rem compress binaries for optimum performance without disturbing chkdll32 +lxlite /ydd /yxd /d %1 diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index 84cba980a3f..d0d78cc7242 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -189,8 +189,12 @@ NATIVE_ARCH = $(shell uname -p | sed -e s/powerpc/ppc/) NATIVE_DIST = $(DIST)/../../$(NATIVE_ARCH)/dist SIGN_CMD = $(NATIVE_DIST)/bin/run-mozilla.sh $(NATIVE_DIST)/bin/shlibsign -v -i else +ifeq ($(OS_ARCH),OS2) +SIGN_CMD = $(topsrcdir)/toolkit/mozapps/installer/os2/sign.cmd $(DIST) +else SIGN_CMD = $(RUN_TEST_PROGRAM) $(DIST)/bin/shlibsign -v -i endif +endif SOFTOKN = $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)softokn3$(DLL_SUFFIX) FREEBL = $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)freebl3$(DLL_SUFFIX) @@ -270,7 +274,7 @@ STRIP_FLAGS = -g PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin" endif ifeq ($(OS_ARCH),OS2) -STRIP = $(srcdir)/os2/strip.cmd +STRIP = $(topsrcdir)/toolkit/mozapps/installer/os2/strip.cmd STRIP_FLAGS = PLATFORM_EXCLUDE_LIST = ! -name "*.ico" endif