Commit 57693e01 authored by Sukhbir Singh's avatar Sukhbir Singh Committed by Georg Koppen
Browse files

Bug 25837: Integrate fxc2 for Windows Tor Browser builds

This commit adds support for building and bundling fxc2 which is
required for Windows cross-compilation on Linux.
parent 37514746
......@@ -34,6 +34,23 @@ EOF
export PATH="$mingwdir/helpers:$PATH"
[% END -%]
[% IF c("var/windows") %]
# Unpack fxc2.
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf [% c('input_files_by_name/fxc2') %]
fxcdir=/var/tmp/dist/fxc2/bin
cp $mingwdir/[% c("arch") %]-w64-mingw32/bin/libwinpthread-1.dll $fxcdir
export PATH="$fxcdir:$PATH"
# fxc2 requires Wine.
[% IF c("var/windows-x86_64") %]
export WINEARCH=win64
[% END %]
export HOME=/var/tmp/home
mkdir -p $HOME
WINEROOT=$HOME/.wine/drive_c
wine wineboot -i
[% END -%]
[% IF c("var/linux") %]
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
......@@ -161,6 +178,7 @@ rm -f js/src/configure
cp -a obj-*/dist/firefox/* $distdir/Browser/
cp -a $rootdir/msvcr100.dll $distdir/Browser
cp -a $gcclibs/libssp-0.dll $distdir/Browser
cp -a $fxcdir/d3dcompiler_47.dll $distdir/Browser
[% END %]
# Make MAR-based update tools available for use during the bundle phase.
......
......@@ -65,6 +65,11 @@ targets:
arch_deps:
- rsync
windows:
var:
arch_deps:
- wine
windows-i686:
var:
martools_filename: mar-tools-win32.zip
......@@ -107,3 +112,6 @@ input_files:
- project: llvm
name: llvm
enable: '[% c("var/linux") %]'
- project: fxc2
name: fxc2
enable: '[% c("var/windows") %]'
#!/bin/bash
[% c("var/set_default_env") -%]
distdir="/var/tmp/dist/[% project %]"
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c("version") %].tar.gz
cd /var/tmp/build/[% project %]-[% c("version") %]
[% IF c("var/windows-i686") -%]
make x86
[% ELSE -%]
make x64
[% END -%]
mkdir -p $distdir/bin/
cp fxc2.exe $distdir/bin/
[% IF c("var/windows-i686") -%]
cp dll/d3dcompiler_47_32.dll $distdir/bin/d3dcompiler_47.dll
[% ELSE -%]
cp dll/d3dcompiler_47.dll $distdir/bin/
[% END -%]
cd /var/tmp/dist
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
git_url: https://github.com/azadi/fxc2.git
git_hash: 079f5c7b9f6ea0b7e5504bb53abf8709cc92835d
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
var:
container:
use_container: 1
input_files:
- project: container-image
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment