Firefox: Difference between revisions

From Halfface
Jump to navigation Jump to search
No edit summary
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Prepare the machine for build.
=plugins=
yum groupinstall "Development Tools"
Plugins are stored here.
 
  ls -l /usr/lib/mozilla/plugins/
Download source code of firefox.
  lrwxrwxrwx 1 root root 54 2018-11-05 15:59:14 libnpjp2.so -> /usr/java/jdk1.8.0_181-amd64/jre/lib/amd64/libnpjp2.so
 
Unpack the source code.
tar jxf firefox-2.0.0.7-source.tar.bz2
 
In the top level of the source tree, create a .mozconfig file, containing your compiler options. Here's a basic configuration that works for me:
 
. $topsrcdir/browser/config/mozconfig
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --enable-official-branding
ac_add_options --enable-xinerama
mk_add_options MOZ_CO_PROJECT=browser
 
Start compiling.
  make -f client.mk build
 
Now to package the result. Firefox provides a special make command to create an installer archive. With the example .mozconfig file, a small hack is needed. Open browser/installer/Makefile in your editor and find this section:
 
ifdef BUILD_STATIC_LIBS
ifeq (WINNT,$(OS_ARCH))
MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages-static
else
ifneq (,$(filter-out OS2 Darwin,$(OS_ARCH)))
MOZ_PKG_MANIFEST_P = $(srcdir)/unix/packages-static
  endif
endif
else
$(error you need a "--enable-static --disable-shared" build to create an installer)
endif
 
Delete the two lines so it looks like this:
 
ifdef BUILD_STATIC_LIBS
ifeq (WINNT,$(OS_ARCH))
MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages-static
else
ifneq (,$(filter-out OS2 Darwin,$(OS_ARCH)))
MOZ_PKG_MANIFEST_P = $(srcdir)/unix/packages-static
endif
endif
endif
 
Create firefox tar.gz in dist directory (dist/firefox-2.0.0.7.en-US.linux-x86_64.tar.gz).
make -C browser/installer
 
Unpack this file in /usr/lib64 and rename the firefox directory to firefox-2.0.0.7
cd /usr/lib64
tar zxf firefox-2.0.0.7.en-US.linux-x86_64.tar.gz
mv firfox firefox-2.0.0.7
 
Now create a copy of /usr/bin/firefox called /usr/bin/firefox.2 and change to 2 paths to point to /usr/lib64/firefox-2.0.0.7
*before
if [ -x "/usr/lib64/firefox-1.5.0.10/firefox-bin" ]
then
  MOZ_LIB_DIR="/usr/lib64"
fi
MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox-1.5.0.10"
*after
if [ -x "/usr/lib64/firefox-2.0.0.7/firefox-bin" ]
then
  MOZ_LIB_DIR="/usr/lib64"
fi
MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox-2.0.0.7"
 
Start the application and verify it works.
 
firefox.2

Latest revision as of 06:37, 6 November 2018

plugins

Plugins are stored here.

ls -l /usr/lib/mozilla/plugins/
lrwxrwxrwx 1 root root 54 2018-11-05 15:59:14 libnpjp2.so -> /usr/java/jdk1.8.0_181-amd64/jre/lib/amd64/libnpjp2.so