Follow-up to bug 785102 - Set the library path rather than using run-mozilla.sh to fix builds for apps that don't ship run-mozilla.sh on Mac. Also define the command for when LIBXUL_SDK is set. r=glandium over irc
authorMark Banner <bugzilla@standard8.plus.com>
Fri, 24 Aug 2012 14:22:03 +0100
changeset 105264 b3c4235d1300c55027f95e079d2fd85f85843a3a
parent 105263 1c0ac073dc650d335197c2b14501605de264e4db
child 105265 f37e93ab69c00669bace52f1f681b5596d5ae964
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersglandium
bugs785102
milestone17.0a1
Follow-up to bug 785102 - Set the library path rather than using run-mozilla.sh to fix builds for apps that don't ship run-mozilla.sh on Mac. Also define the command for when LIBXUL_SDK is set. r=glandium over irc
toolkit/mozapps/installer/packager.mk
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -459,25 +459,26 @@ PRECOMPILE_DIR=XCurProcD
 PRECOMPILE_RESOURCE=app
 PRECOMPILE_GRE=$(LIBXUL_DIST)/bin
 else
 PRECOMPILE_DIR=GreD
 PRECOMPILE_RESOURCE=gre
 PRECOMPILE_GRE=$$PWD
 endif
 
-ifndef LIBXUL_SDK
-
 ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
 # FIXME: not tested on OS/2. Is it using the correct libxul?
 RUN_FROM_PWD = $(_ABS_RUN_TEST_PROGRAM)
 else
-RUN_FROM_PWD = "$$PWD/run-mozilla.sh"
+# For non-Windows, just set the library path so we load the libs from the right place.
+ifdef ($(OS_ARCH),Darwin)
+RUN_FROM_PWD = DYLD_LIBRARY_PATH=$(PRECOMPILE_GRE)
+else
+RUN_FROM_PWD = LD_LIBRARY_PATH=$(PRECOMPILE_GRE)
 endif
-
 endif
 
 # Silence the unzip step so we don't print any binary data from the comment field.
 GENERATE_CACHE = \
   $(RUN_FROM_PWD) $(LIBXUL_DIST)/bin/xpcshell$(BIN_SUFFIX) -g "$(PRECOMPILE_GRE)" -a "$$PWD" -f $(call core_abspath,$(MOZILLA_DIR)/toolkit/mozapps/installer/precompile_cache.js) -e "populate_startupcache('$(PRECOMPILE_DIR)', '$(OMNIJAR_NAME)', 'startupCache.zip');" && \
   rm -rf jsloader jssubloader && \
   $(UNZIP) -q startupCache.zip && \
   rm startupCache.zip && \