2 set LIBRARYNAME=BaseLib
\r
4 set PYTHONHOME=\Python254
\r
5 REM Arno: Add . to find our core (py 2.5)
\r
6 set PYTHONPATH=.;%PYTHONHOME%
\r
7 echo PYTHONPATH SET TO %PYTHONPATH%
\r
9 set XULRUNNER=..\xulrunner-sdk
\r
10 set ZIP7CMD="\Program Files\7-Zip\7z.exe"
\r
12 REM ----- Check for Python and essential site-packages
\r
14 IF NOT EXIST %PYTHONHOME%\python.exe (
\r
16 echo Could not locate Python in %PYTHONHOME%.
\r
17 echo Please modify this script or install python [www.python.org]
\r
21 IF NOT EXIST %PYTHONHOME%\Lib\site-packages\wx-*-unicode (
\r
23 echo Could not locate wxPython in %PYTHONHOME%\Lib\site-packages.
\r
24 echo Please modify this script or install wxPython [www.wxpython.org]
\r
28 IF NOT EXIST %PYTHONHOME%\Lib\site-packages\py2exe (
\r
30 echo Could not locate py2exe in %PYTHONHOME%\Lib\site-packages.
\r
31 echo Please modify this script or install py2exe [www.py2exe.org]
\r
35 REM ----- Check for XULRUNNER
\r
37 IF NOT EXIST %XULRUNNER% (
\r
39 echo Could not locate the XULRUNNER SDK at %XULRUNNER%.
\r
40 echo Please modify this script or install from https://developer.mozilla.org/en/XULRunner
\r
44 REM ----- Check for ZIP7CMD
\r
46 IF NOT EXIST %ZIP7CMD% (
\r
48 echo Could not locate the 7-Zip at %ZIP7CMD%.
\r
49 echo Please modify this script or install from ww.7-zip.org
\r
60 REM Arno: When adding files here, make sure tribler.nsi actually
\r
61 REM packs them in the installer .EXE
\r
63 REM Diego: building the deepest dir we get all of them.
\r
64 mkdir dist\installdir\bgprocess\%LIBRARYNAME%\Images
\r
66 %PYTHONHOME%\python.exe -O %LIBRARYNAME%\Transport\Build\Win32\setupBGexe.py py2exe
\r
68 REM Arno: Move py2exe results to installdir
\r
69 move dist\*.* dist\installdir\bgprocess
\r
70 copy %LIBRARYNAME%\Images\SwarmPlayerIcon.ico dist\installdir\bgprocess\%LIBRARYNAME%\Images
\r
72 REM Riccardo: move the files needed for the WebUI
73 xcopy %LIBRARYNAME%\WebUI dist\installdir\bgprocess\%LIBRARYNAME%\WebUI /S /I
74 del dist\installdir\bgprocess\%LIBRARYNAME%\WebUI\*.py
76 REM Diego: replace vlc *.txt with P2P-Next License.txt
\r
77 del dist\installdir\*.txt
\r
78 type %LIBRARYNAME%\ns-LICENSE.txt %LIBRARYNAME%\binary-LICENSE-postfix.txt > %LIBRARYNAME%\binary-LICENSE.txt
\r
79 copy %LIBRARYNAME%\binary-LICENSE.txt dist\installdir
\r
81 copy %PYTHONHOME%\Lib\site-packages\wx-2.8-msw-unicode\wx\msvcp71.dll dist\installdir\bgprocess
\r
83 copy reset.bat dist\installdir
\r
85 REM Arno: Move swift binary to installdir
\r
86 copy swift.exe dist\installdir\bgprocess
\r
89 REM ----- Build XPI of SwarmTransport
\r
90 mkdir dist\installdir\components
\r
91 copy %LIBRARYNAME%\Transport\icon.png dist\installdir
\r
92 copy %LIBRARYNAME%\Transport\install.rdf dist\installdir
\r
93 copy %LIBRARYNAME%\Transport\chrome.manifest dist\installdir
\r
94 xcopy %LIBRARYNAME%\Transport\components dist\installdir\components /S /I
\r
95 xcopy %LIBRARYNAME%\Transport\chrome dist\installdir\chrome /S /I
96 xcopy %LIBRARYNAME%\Transport\skin dist\installdir\skin /S /I
\r
98 REM ----- Turn .idl into .xpt
\r
99 %XULRUNNER%\bin\xpidl -m typelib -w -v -I %XULRUNNER%\idl -e dist\installdir\components\tribeIChannel.xpt %LIBRARYNAME%\Transport\tribeIChannel.idl
\r
100 %XULRUNNER%\bin\xpidl -m typelib -w -v -I %XULRUNNER%\idl -e dist\installdir\components\tribeISwarmTransport.xpt %LIBRARYNAME%\Transport\tribeISwarmTransport.idl
\r
104 REM Arno: Win7 gives popup if SwarmEngine is not signed
\r
105 "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\signtool.exe" sign /f c:\build\certs\swarmplayerprivatekey.pfx /p "" /d "SwarmEngine" /du "http://www.pds.ewi.tudelft.nl/code.html" /t "http://timestamp.verisign.com/scripts/timestamp.dll" bgprocess\SwarmEngine.exe
\r
107 REM ----- Turn installdir into .xpi
\r
108 %ZIP7CMD% a -tzip "SwarmPlayer.xpi" * -r -mx=9
\r
109 move SwarmPlayer.xpi ..
\r