[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser-bundle/master] Compile and install wine-wrappers.
commit 6521aadaea29baadbcd9982a5c85439bacf5f5ad
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Mon Dec 2 02:25:03 2013 +0000
Compile and install wine-wrappers.
gcc.exe, dllwrap.exe, and swig.exe need to be actual executables. If you
merely rename gcc.py and dllwrap.py, the programs run, but they
immediately detach themselves from the shell and run in the background.
So when py2exe calls a bunch of programs in series:
gcc -o file1.o file1.c
dllwrap file1.o
gcc -o file2.o file2.c
dllwrap file2.o
gcc -o file3.o file3.c
dllwrap file3.o
all the programs would run essentially simultaneously. dllwrap wasn't
waiting for gcc to finish writing the object file that it (dllwrap)
needed as input.
(You could actually get a successful build out of this, if you ran
build_ext once, waiting a few seconds for all the gccs to finish, then
ran it again. The second time, distutils would notice that the object
files already existed, and run only the dllwrap commands, which would
succeed because the object files were already in place.)
---
.../descriptors/windows/gitian-pluggable-transports.yml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gitian/descriptors/windows/gitian-pluggable-transports.yml b/gitian/descriptors/windows/gitian-pluggable-transports.yml
index 6869af9..b7f3100 100644
--- a/gitian/descriptors/windows/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/windows/gitian-pluggable-transports.yml
@@ -17,6 +17,7 @@ remotes:
"dir": "openssl"
files:
- "ubuntu-wine.gpg"
+- "wine-wrappers"
- "python.msi"
- "py2exe.exe"
- "dzip.sh"
@@ -32,6 +33,7 @@ script: |
export LDFLAGS="-mwindows"
# This is correct only for kvm.
MIRROR_HOST=10.0.2.2
+ WINEROOT=$HOME/.wine/drive_c
# XXX: Hardening options cause the exe's to crash.. not sure why
#export CFLAGS="-mwindows -fstack-protector-all -fPIE -Wstack-protector --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-initializers -Wformat-security"
#export LDFLAGS="-mwindows -Wl,--dynamicbase -Wl,--nxcompat -lssp -L/usr/lib/gcc/i686-w64-mingw32/4.6/"
@@ -65,6 +67,18 @@ script: |
7z x py2exe.exe
cp -a PLATLIB/* $INSTDIR/python/Lib/site-packages/
#
+ cd wine-wrappers
+ # Push our config into wine-wrappers.
+ > settings.py
+ echo "LD_PRELOAD = \"$LD_PRELOAD\"" >> settings.py
+ echo "FAKETIME = \"$FAKETIME\"" >> settings.py
+ # Must pre-copy python27.dll into the build directory, or else py2exe can't find it.
+ mkdir -p build/bdist.win32/winexe/bundle-2.7/
+ cp -a $INSTDIR/python/python27.dll build/bdist.win32/winexe/bundle-2.7/
+ LD_PRELOAD= $INSTPYTHON setup.py py2exe
+ cp -a dist/gcc.exe dist/dllwrap.exe dist/swig.exe $WINEROOT/windows/
+ cd ..
+ #
cd openssl
find -type f | xargs touch --date="$REFERENCE_DATETIME"
./Configure -shared --cross-compile-prefix=i686-w64-mingw32- mingw --prefix=$INSTDIR/openssl
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits