I need to change the Font Max Size on a couple of files of the source code of 
Xulrunner
and rebuild it for Centos 6 64 bits

Those two lines are
gfxFont.h
#define FONT_MAX_SIZE 2000.0
and at cairo-ft-font.c : 
#define MAX_FONT_SIZE 1000 

and i change those two values to much larger values.

I tried to rebuild it myself and the build works but then i cant manage to 
package it to be able to move it all together to a different folder on my 
server and execute it properly, this is what i have done so far

1) First i downloaded the source from here:
hg clone http://hg.mozilla.org/mozilla-central/ src
Then i set the variable $topsrcdir  to the folder where i put the source
Then i did cd src and inside src i did:
echo ". \$topsrcdir/xulrunner/config/mozconfig" > .mozconfig
to point the build to the configuration file for Xulrunner

2) Then inside $topsrcdir/xulrunner/config/mozconfig i added
# This file specifies the build flags for XULRunner. #  . 
ac_add_options --enable-application=xulrunner
ac_add_options --disable-system-cairo
mk_add_options MOZ_OBJDIR=@topsrcdir@/obj-xulrunnerfinished

so i specified the output folder and also i try to disable system cairo so that 
build hopefully will pick the cairo with the modified source code of the files 
i changed instead of the linux system cairo (as i need to change the font max 
size value and i changed that in the source code files so i have to make sure 
that the build picks the files of the source code i changed, instead of the 
linux system cairo)

3) Then i make the build with 
make -f client.mk build
I got errors because my Python and GCC versions were too old,
so i updated Python and GCC to the correct versions and then
the build executed well

4) The build completed and as a result i got an output folder
called obj-xulrunnerfinished (as specified in the mozconfig)

5) I can now successfully run the new xulrunner from the /dist/bin subfolder 
like this

[root@ns236697 bin]# pwd
{install folder}obj-xulrunnerfinished/dist/bin
[root@ns236697 bin]# ./xulrunner
Mozilla XULRunner 28.0a1

Usage: xulrunner [OPTIONS]
xulrunner APP-FILE [APP-OPTIONS...]

OPTIONS
--app specify APP-FILE (optional)
-h, --help show this message
-v, --version show version
--gre-version print the GRE version string on stdout
--install-app <application> [<destination> [<directoryname>]]
Install a XUL application.

APP-FILE
Application initialization file.

APP-OPTIONS
Application specific options.

6) The next and final step is to 
Package the new xulrunner so that i can move it and put it somewhere else in my 
server

So i go to the root of the results and i do:
make package

but it fails with an error in python file related to Symlinks

obj-xulrunnerfinished]# make package
make[1]: Entering directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make export
make[2]: Entering directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make[2]: Nothing to be done for `export'.
make[2]: Leaving directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make compile
make[2]: Entering directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make[2]: Nothing to be done for `compile'.
make[2]: Leaving directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make libs
make[2]: Entering directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make make-package-internal
make[3]: Entering directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
OMNIJAR_NAME=omni.ja \
{installed-folder}/obj-xulrunnerfinished/_virtualenv/bin/python 
{installed-folder}/toolkit/mozapps/installer/packager.py -DMOZ_GLUE_IN_PROGRAM 
-DNO_NSPR_10_SUPPORT -DDLL_PREFIX=lib -DDLL_SUFFIX=.so -DBIN_SUFFIX= 
-DGRE_MILESTONE=28.0a1 -DGRE_BUILDID=20131113193941 -DMOZ_DEB_TIMESTAMP="Wed, 
13 Nov 2013 21:34:22 +0100" -DMOZ_APP_NAME=xulrunner 
-Dinstalldir=/usr/local/lib/xulrunner-28.0a1 \
--format omni \
\
--ignore-errors \
\
\
--optimizejars \
\
../../dist ../../dist/xulrunner \

Traceback (most recent call last):
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 375, in 
<module>
main()
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 320, in 
main
sink.close(args.manifest is not None)
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 
366, in close
self.packager.close()
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 
298, in close
self._queue.execute()
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 
217, in execute
function(*args)
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 219, in 
add_manifest
self._formatter.add_manifest(entry)
File "{installed-folder}/python/mozbuild/mozpack/packager/formats.py", line 
241, in add_manifest
formatter, base, path = self._get_omnijar(entry.base)
File "{installed-folder}/python/mozbuild/mozpack/packager/formats.py", line 
228, in _get_omnijar
return self.omnijars[base], base, mozpack.path.relpath(path, base)
File "{installed-folder}/python/mozbuild/mozpack/path.py", line 27, in relpath
rel = normsep(os.path.relpath(path, start))
File 
"{installed-folder}/obj-xulrunnerfinished/_virtualenv/lib/python2.7/posixpath.py",
 line 404, in relpath
raise ValueError("no path specified")
ValueError: no path specified
make[3]: *** [stage-package] Error 1
make[3]: Leaving directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make[2]: *** [make-package] Error 2
make[2]: Leaving directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make[1]: *** [default] Error 2
make[1]: Leaving directory 
`{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make: *** [package] Error 2


so i went to line of file where error happens:
line 404 is this: if not path:
raise ValueError("no path specified")

within this segment below:


def _resolve_link(path):
"""Internal helper function. Takes a path and follows symlinks
until we either arrive at something that isn't a symlink, or
encounter a path we've seen before (meaning that there's a loop).
"""
paths_seen = set()
while islink(path):
if path in paths_seen:
# Already seen this path, so we must have a symlink loop
return None
paths_seen.add(path)
# Resolve where the link points to
resolved = os.readlink(path)
if not isabs(resolved):
dir = dirname(path)
path = normpath(join(dir, resolved))
else:
path = normpath(resolved)
return path

supports_unicode_filenames = (sys.platform == 'darwin')

def relpath(path, start=curdir):
"""Return a relative version of a path"""

if not path:
raise ValueError("no path specified")

start_list = [x for x in abspath(start).split(sep) if x]
path_list = [x for x in abspath(path).split(sep) if x]

# Work out how much of the filepath is shared by start and path.
i = len(commonprefix([start_list, path_list]))

rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
if not rel_list:
return curdir
return join(*rel_list)
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to