forked from libswift/libswift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xpimakedist.bat
65 lines (44 loc) · 1.96 KB
/
xpimakedist.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
REM @echo off
set XULRUNNER=\build\xulrunner-1.9.1.19
set ZIP7CMD="C:\Program Files\7-Zip\7z.exe"
REM ----- Check for XULRUNNER
IF NOT EXIST %XULRUNNER% (
echo .
echo Could not locate the XULRUNNER SDK at %XULRUNNER%.
echo Please modify this script or install from https://developer.mozilla.org/en/XULRunner
exit /b
)
REM ----- Check for ZIP7CMD
IF NOT EXIST %ZIP7CMD% (
echo .
echo Could not locate the 7-Zip at %ZIP7CMD%.
echo Please modify this script or install from ww.7-zip.org
exit /b
)
REM ----- Clean up
rmdir /S /Q dist
REM ----- Build
@echo Build swift.exe first by calling scons
REM Diego: building the deepest dir we get all of them.
mkdir dist\installdir\bgprocess
REM Arno: Move swift binary to installdir
copy swift.exe dist\installdir\bgprocess
copy LICENSE dist\installdir\LICENSE.txt
REM ----- Build XPI of SwarmTransport
mkdir dist\installdir\components
copy firefox\icon.png dist\installdir
copy firefox\install.rdf dist\installdir
copy firefox\chrome.manifest dist\installdir
xcopy firefox\components dist\installdir\components /S /I
xcopy firefox\chrome dist\installdir\chrome /S /I
xcopy firefox\skin dist\installdir\skin /S /I
REM ----- Turn .idl into .xpt
%XULRUNNER%\bin\xpidl -m typelib -w -v -I %XULRUNNER%\idl -e dist\installdir\components\tribeIChannel.xpt firefox\tribeIChannel.idl
%XULRUNNER%\bin\xpidl -m typelib -w -v -I %XULRUNNER%\idl -e dist\installdir\components\tribeISwarmTransport.xpt firefox\tribeISwarmTransport.idl
cd dist\installdir
REM Arno: Win7 gives popup if swift.exe is not signed
"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\swift.exe
REM ----- Turn installdir into .xpi
%ZIP7CMD% a -tzip "SwarmPlayer.xpi" * -r -mx=9
move SwarmPlayer.xpi ..
cd ..\..