forked from onmyee/Flashtool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-linux.xml
129 lines (121 loc) · 6.41 KB
/
setup-linux.xml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="all" name="Create Linux Package">
<target name="all" depends="loadprops, binaries, dotar"/>
<target name="main_lib" depends="loadprops">
<jar destfile="../Deploy/FlashTool/x10flasher.jar">
<manifest>
<attribute name="Main-Class" value="gui.Main"/>
<attribute name="Class-Path" value=". x10flasher.jar x10flasher_lib/x10flasher-res.jar x10flasher_lib/AXMLPrinter2.jar x10flasher_lib/sony.jar x10flasher_lib/commons-io-2.4.jar x10flasher_lib/jdom-1.1.1.jar x10flasher_lib/jna-3.5.1.jar x10flasher_lib/jopt-simple-4.3.jar x10flasher_lib/log4j-1.2.17.jar x10flasher_lib/platform-3.5.1.jar x10flasher_lib/swtlin/commands.jar x10flasher_lib/swtlin/equinox.jar x10flasher_lib/swtlin/jface.jar x10flasher_lib/swtlin/jobs.jar x10flasher_lib/swtlin/osgi.jar x10flasher_lib/swtlin/runtime.jar x10flasher_lib/swtlin/swt.jar"/>
<attribute name="Implementation-Version" value="Version ${Internal-Version} built on ${Internal-Date}"/>
<attribute name="Internal-Version" value="${Internal-Version}"/>
</manifest>
<fileset dir="./bin" excludes="/gui/ressources/icons/**"/>
</jar>
</target>
<target name="clean">
<delete dir="../Deploy/FlashTool/x10flasher_lib/winjre32"/>
<delete dir="../Deploy/FlashTool/x10flasher_lib/winjre64"/>
<delete dir="../Deploy/FlashTool/x10flasher_lib/linjre32"/>
<delete dir="../Deploy/FlashTool/x10flasher_lib/linjre64"/>
<delete dir="../Deploy/FlashTool/x10flasher_lib/macjre64"/>
<delete file="../Deploy/FlashTool/FlashTool.exe"/>
<delete file="../Deploy/FlashTool/FlashTool64.exe"/>
<delete file="../Deploy/FlashTool/FlashToolConsole"/>
<delete file="../Deploy/FlashTool/FlashTool"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/7z.exe"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/adb.exe"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/bin2elf.exe"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/bin2sin.exe"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/fastboot.exe"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/unyaffs.windows.exe"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/7z.dll"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/AdbWinApi.dll"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/AdbWinUsbApi.dll"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/cygwin1.dll"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/adb.linux"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/fastboot.linux"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/unyaffs.linux"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/bin2elf"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/bin2sin"/>
<delete dir="../Deploy/FlashTool/x10flasher_lib/linux"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/adb.mac"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/fastboot.mac"/>
<delete file="../Deploy/FlashTool/x10flasher_lib/unyaffs.mac"/>
<delete dir="../Deploy/FlashTool/x10flasher_lib/swtwin"/>
<delete dir="../Deploy/FlashTool/x10flasher_lib/swtmac"/>
<delete dir="../Deploy/FlashTool/x10flasher_lib/mac"/>
<delete file="../Deploy/FlashTool/config.properties"/>
</target>
<target name="JRE">
<exec executable="tar" dir="../Deploy/FlashTool/x10flasher_lib">
<arg value="xf"/>
<arg value="../../../Flashtool/jre/linjre.tar"/>
</exec>
<chmod dir="../Deploy/FlashTool/x10flasher_lib/linjre64/bin" perm="755" includes="**/*"/>
<chmod dir="../Deploy/FlashTool/x10flasher_lib/linjre32/bin" perm="755" includes="**/*"/>
<chmod file="../Deploy/FlashTool/x10flasher_lib/linjre32/lib/jexec" perm="755"/>
<chmod file="../Deploy/FlashTool/x10flasher_lib/linjre64/lib/jexec" perm="755"/>
<chmod dir="../Deploy/FlashTool/x10flasher_lib/linjre64/lib" perm="755" includes="**/*.so"/>
<chmod dir="../Deploy/FlashTool/x10flasher_lib/linjre32/lib" perm="755" includes="**/*.so"/>
</target>
<target name="binaries" depends="clean, main_lib, JRE">
<copy file="./ProgramExe/FlashTool" todir="../Deploy/FlashTool"/>
<copy file="./ProgramExe/FlashToolConsole" todir="../Deploy/FlashTool"/>
<copy todir="../Deploy/FlashTool/x10flasher_lib">
<fileset dir="./linux"
excludes="**/.svn"/>
</copy>
<chmod file="../Deploy/FlashTool/FlashTool" perm="755" />
<chmod file="../Deploy/FlashTool/FlashToolConsole" perm="755"/>
<chmod file="../Deploy/FlashTool/x10flasher_lib/adb.linux" perm="755" />
<chmod file="../Deploy/FlashTool/x10flasher_lib/fastboot.linux" perm="755" />
<chmod file="../Deploy/FlashTool/x10flasher_lib/unyaffs.linux" perm="755" />
<chmod file="../Deploy/FlashTool/x10flasher_lib/bin2elf" perm="755" />
<chmod file="../Deploy/FlashTool/x10flasher_lib/bin2sin" perm="755" />
<chmod file="../Deploy/FlashTool/x10flasher_lib/linux/lib64/libusbx-1.0.so.0.1.0" perm="755" />
<chmod file="../Deploy/FlashTool/x10flasher_lib/linux/lib32/libusbx-1.0.so.0.1.0" perm="755" />
</target>
<target name="loadprops">
<loadmf jar="../Deploy/FlashTool/x10flasher_lib/x10flasher-res.jar" prefix=""/>
</target>
<target name="dotar">
<exec executable="tar" dir="../Deploy">
<arg value="cf"/>
<arg value="flashtool-${Internal-Version}-linux.tar"/>
<arg value="FlashTool"/>
</exec>
<exec executable="7zr" dir="../Deploy">
<arg value="a"/>
<arg value="-t7z"/>
<arg value="-m0=lzma"/>
<arg value="-mx=4"/>
<arg value="-mfb=64"/>
<arg value="-md=32m"/>
<arg value="-ms=on"/>
<arg value="flashtool-${Internal-Version}-linux.tar.7z"/>
<arg value="flashtool-${Internal-Version}-linux.tar"/>
</exec>
<exec executable="rm" dir="../Deploy">
<arg value="flashtool-${Internal-Version}-linux.tar"/>
</exec>
</target>
<!--
Loads entries from a manifest file.
@jar The jar from where to read
@prefix A prefix to prepend
-->
<macrodef name="loadmf">
<attribute name="jar"/>
<attribute name="prefix" default=""/>
<sequential>
<loadproperties>
<!-- Load the manifest entries -->
<zipentry zipfile="@{jar}" name="META-INF/MANIFEST.MF"/>
<!-- Add the prefix -->
<filterchain>
<prefixlines prefix="@{prefix}"/>
</filterchain>
</loadproperties>
</sequential>
</macrodef>
</project>