Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[embedlite] Introduce build.mk for installer. JB#49712
We do not have package-manifest.in or removed-files.in
yet. Need to consider removed-files.in.

There's no longer need for embedlite/installer install
call from the spec.

The Makefile.in of the installer is also now a bit closer
to the Android mobile / B2G.
  • Loading branch information
rainemak committed Apr 29, 2020
1 parent 8ac6426 commit 2776d27
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 17 deletions.
7 changes: 7 additions & 0 deletions embedding/embedlite/build.mk
@@ -0,0 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

install:
@$(MAKE) -C embedding/embedlite/installer install

65 changes: 49 additions & 16 deletions embedding/embedlite/installer/Makefile.in
Expand Up @@ -14,29 +14,67 @@ NO_PKG_FILES = \
ifndef STAGE_SDK
NO_PKG_FILES += \
xpcshell* \
run-mozilla* \
install_app.py \
$(NULL)
endif

# If we're on mac, we don't want an end-user-facing DMG, we want a .tar.bz2
# which developers then use to package their application.
include $(topsrcdir)/config/rules.mk
MOZ_PKG_DUPEFLAGS = -f $(srcdir)/allowed-dupes.mn

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
MOZ_PKG_FORMAT = BZ2
_APPNAME = XUL.framework
_BINPATH = /$(_APPNAME)/Versions/Current
_RESPATH := $(_BINPATH)
DEFINES += \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DPREF_DIR=$(PREF_DIR) \
-DJAREXT= \
-DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) \
$(NULL)

ifdef MOZ_DEBUG
DEFINES += -DMOZ_DEBUG=1
endif

include $(topsrcdir)/config/rules.mk
MOZ_PKG_DUPEFLAGS = -f $(srcdir)/allowed-dupes.mn
ifdef ENABLE_MARIONETTE
DEFINES += -DENABLE_MARIONETTE=1
endif

MOZ_PACKAGER_MINIFY=1

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
ifndef _APPNAME
_APPNAME = $(MOZ_MACBUNDLE_NAME)
endif
ifndef _BINPATH
_BINPATH = /$(_APPNAME)/Contents/MacOS
endif
ifndef _RESPATH
_RESPATH = /$(_APPNAME)/Contents/Resources
endif
endif

INSTALL_SDK = 1

include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk

# Note that JS_BINARY can be defined in packager.mk, so this test must come
# after including that file. MOZ_PACKAGER_MINIFY_JS is used in packager.mk, but
# since recipe evaluation is deferred, we can set it here after the inclusion.
ifneq (,$(JS_BINARY))
ifndef MOZ_DEBUG
MOZ_PACKAGER_MINIFY_JS=1
endif
endif

ifeq (bundle, $(MOZ_FS_LAYOUT))
BINPATH = $(_BINPATH)
RESPATH = $(_RESPATH)
DEFINES += -DAPPNAME=$(_APPNAME)
else
# Every other platform just winds up in dist/bin
BINPATH = bin
RESPATH = bin
endif
DEFINES += -DBINPATH=$(BINPATH)
DEFINES += -DRESPATH=$(RESPATH)

# Add pkg-config files to the install:: target

pkg_config_files = \
Expand Down Expand Up @@ -147,8 +185,3 @@ deb: package debian/changelog debian/xulrunner.service debian/xulrunner.links
dh_link; fakeroot dh_fixperms; fakeroot dh_installdeb; fakeroot dh_shlibdeps; fakeroot dh_gencontrol; fakeroot dh_md5sums; fakeroot dh_builddeb;
endif

DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
# package name comes from xulrunner/installer/debian/changelog.in
DEB_PKG_NAME = $(MOZ_PKG_APPNAME)_$(GRE_MILESTONE)-$(MOZ_BUILDID)_$(DEB_BUILD_ARCH).deb
# relative to $(DIST)
UPLOAD_EXTRA_FILES += ../xulrunner/$(DEB_PKG_NAME)
1 change: 0 additions & 1 deletion rpm/xulrunner-qt5.spec
Expand Up @@ -243,7 +243,6 @@ echo "ac_add_options --disable-startupcache" >> "$MOZCONFIG"
source "%BUILD_DIR"/rpm-shared.env

%{__make} -f client.mk install DESTDIR=%{buildroot}
%{__make} -C %{BUILD_DIR}/embedding/embedlite/installer install DESTDIR=%{buildroot}

for i in $(cd ${RPM_BUILD_ROOT}%{mozappdirdev}/sdk/lib/; ls *.so); do
rm ${RPM_BUILD_ROOT}%{mozappdirdev}/sdk/lib/$i
Expand Down

0 comments on commit 2776d27

Please sign in to comment.