instrumentation: add next-share/
[cs-p2p-next.git] / instrumentation / next-share / pluginmakedist_IE_only.bat
1 REM @echo off\r
2 set LIBRARYNAME=BaseLib\r
3 \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
8 \r
9 set NSIS="\Program Files\NSIS\makensis.exe"\r
10 \r
11 REM ----- Check for Python and essential site-packages\r
12 \r
13 IF NOT EXIST %PYTHONHOME%\python.exe (\r
14   echo .\r
15   echo Could not locate Python in %PYTHONHOME%.\r
16   echo Please modify this script or install python [www.python.org]\r
17   exit /b\r
18 )\r
19 \r
20 IF NOT EXIST %PYTHONHOME%\Lib\site-packages\wx-*-unicode (\r
21   echo .\r
22   echo Could not locate wxPython in %PYTHONHOME%\Lib\site-packages.\r
23   echo Please modify this script or install wxPython [www.wxpython.org]\r
24   exit /b\r
25 )\r
26 \r
27 IF NOT EXIST %PYTHONHOME%\Lib\site-packages\py2exe (\r
28   echo .\r
29   echo Could not locate py2exe in %PYTHONHOME%\Lib\site-packages.\r
30   echo Please modify this script or install wxPython [www.py2exe.org]\r
31   exit /b\r
32 )\r
33 \r
34 REM ----- Check for NSIS installer\r
35 \r
36 IF NOT EXIST %NSIS% (\r
37   echo .\r
38   echo Could not locate the NSIS installer at %NSIS%.\r
39   echo Please modify this script or install NSIS [nsis.sf.net]\r
40   exit /b\r
41 )\r
42 \r
43 REM ----- Clean up\r
44 \r
45 call clean.bat\r
46 \r
47 REM ----- Build\r
48 \r
49 REM Arno: When adding files here, make sure tribler.nsi actually\r
50 REM packs them in the installer .EXE\r
51 \r
52 REM Diego: building the deepest dir we get all of them.\r
53 mkdir dist\installdir\bgprocess\%LIBRARYNAME%\Images\r
54 \r
55 %PYTHONHOME%\python.exe -O %LIBRARYNAME%\Plugin\Build\Win32\setupBGexe.py py2exe\r
56 \r
57 REM Arno: Move py2exe results to installdir\r
58 move dist\*.* dist\installdir\bgprocess\r
59 copy %LIBRARYNAME%\Images\SwarmPluginIcon.ico dist\installdir\bgprocess\%LIBRARYNAME%\Images\r
60 \r
61 xcopy vlc4plugin\* dist\installdir /E /I\r
62 \r
63 REM Riccardo:  move the files needed for the WebUI\r
64 xcopy %LIBRARYNAME%\WebUI dist\installdir\bgprocess\%LIBRARYNAME%\WebUI /S /I\r
65 del dist\installdir\bgprocess\%LIBRARYNAME%\WebUI\*.py\r
66 \r
67 REM Diego: replace vlc *.txt with P2P-Next License.txt\r
68 del dist\installdir\*.txt\r
69 type %LIBRARYNAME%\ns-LICENSE.txt %LIBRARYNAME%\binary-LICENSE-postfix.txt > %LIBRARYNAME%\binary-LICENSE.txt\r
70 copy %LIBRARYNAME%\binary-LICENSE.txt dist\installdir\r
71 \r
72 REM Diego: sign axvlc.dll\r
73 "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\signtool.exe" sign /f c:\build\certs\swarmplayerprivatekey.pfx /p "" /d "SwarmPlugin for Internet Explorer" /du "http://www.pds.ewi.tudelft.nl/code.html" /t "http://timestamp.verisign.com/scripts/timestamp.dll" "dist\installdir\activex\axvlc.dll"\r
74 \r
75 copy %LIBRARYNAME%\Plugin\Build\Win32\heading.bmp dist\installdir\r
76 REM TODO Diego: manifest?\r
77 copy %LIBRARYNAME%\Plugin\Build\Win32\swarmplugin_IE_only.nsi dist\installdir\r
78 REM copy %LIBRARYNAME%\Plugin\Build\Win32\swarmplugin.exe.manifest dist\installdir\r
79 \r
80 copy %PYTHONHOME%\Lib\site-packages\wx-2.8-msw-unicode\wx\msvcp71.dll dist\installdir\bgprocess\r
81 \r
82 copy reset*.bat dist\installdir\r
83 \r
84 cd dist\installdir\r
85 \r
86 REM Arno: Win7 gives popup if SwarmEngine is not signed\r
87 "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\signtool.exe" sign /f c:\build\certs\swarmplayerprivatekey.pfx /p "" /d "SwarmPlugin for Internet Explorer and Firefox" /du "http://www.pds.ewi.tudelft.nl/code.html" /t "http://timestamp.verisign.com/scripts/timestamp.dll" bgprocess\SwarmEngine.exe\r
88 \r
89 \r
90 :makeinstaller\r
91 %NSIS% swarmplugin_IE_only.nsi\r
92 \r
93 rename SwarmPlugin_*.exe SwarmPlugin_IE_*.exe\r
94 move SwarmPlugin_IE*.exe ..\r
95 cd ..\r
96 REM Diego : sign SwarmPlugin_*.exe\r
97 "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\signtool.exe" sign /f c:\build\certs\swarmplayerprivatekey.pfx /p "" /d "SwarmPlugin for Internet Explorer" /du "http://www.pds.ewi.tudelft.nl/code.html" /t "http://timestamp.verisign.com/scripts/timestamp.dll" "SwarmPlugin_IE*.exe"\r
98 REM Arno: build .cab file. \r
99 "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\CabArc.Exe" -s 6144 n SwarmPlugin_IE.cab ..\%LIBRARYNAME%\Plugin\Build\Win32\SwarmPlugin_IE.inf\r
100 REM Arno : sign SwarmPlugin*.cab\r
101 "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\signtool.exe" sign /f c:\build\certs\swarmplayerprivatekey.pfx /p "" /d "SwarmPlugin for Internet Explorer" /du "http://www.pds.ewi.tudelft.nl/code.html" /t "http://timestamp.verisign.com/scripts/timestamp.dll" "SwarmPlugin_IE*.cab"\r
102 \r
103 cd ..\r