-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-distribution.xml
135 lines (106 loc) · 4.87 KB
/
build-distribution.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
130
131
132
133
134
135
<project name="Idea Parser language scripted build file" default="assemble"
basedir=".">
<!-- set global properties for this build -->
<property name="work" location="build"/>
<property name="dist" location="dist"/>
<property name="parser.plugin" value="${dist}/idea-parser3.jar"/>
<property name="idea.community.build"
location="${user.home}/Projects/ideaIC-107.105/"/>
<property name="target.platform" value="current"/>
<property name="parser.ide.target.package"
value="${dist}/parser-ide-${target.platform}.zip"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<!--<mkdir dir="${target.root}" />-->
<echo message="Assembling ParserIde into archive: ${parser.ide.target.package}"/>
<condition property="is.darwin">
<equals arg1="${target.platform}" arg2="darwin"/>
</condition>
</target>
<target name="resources" depends="init"
description="Builds the ParserIde resources jar">
<echo message="Using Idea Community build from: ${idea.community.build}"/>
<jar destfile="${dist}/parseride-resources.jar">
<fileset dir="${basedir}/parseride/resources" includes="**/*.*"/>
<zipfileset src="${idea.community.build}/lib/resources.jar"
includes="idea/IdeaActions.xml"
fullpath="idea/ParserIdeActions.xml"/>
<zipfileset src="${idea.community.build}/lib/resources.jar"
includes="META-INF/IdeaPlugin.xml"
fullpath="META-INF/ParserIdePlugin.xml"/>
</jar>
</target>
<target name="fix.Info.plist" depends="init" if="is.darwin">
<replaceregexp
file="${idea.community.build}/Contents/Info.plist"
byline="false"
match="(<key>idea.platform.prefix</key>[\r\n \t]+<string>)Idea(</string>)"
replace="\1ParserIde\2"
/>
<replaceregexp
file="${idea.community.build}/Contents/Info.plist"
byline="false"
match="(<key>idea.paths.selector</key>[\r\n \t]+<string>)[^<]+(</string>)"
replace="\1.ParserIde1\2"
/>
<replaceregexp
file="${idea.community.build}/Contents/Info.plist"
byline="false"
match="(<key>CFBundleName</key>[\r\n \t]+<string>)[^<]+(</string>)"
replace="\1Parser Ide\2"
/>
<replaceregexp
file="${idea.community.build}/Contents/Info.plist"
byline="false"
match="(<key>CFBundleIdentifier</key>[\r\n \t]+<string>)[^<]+(</string>)"
replace="\1idea-parser3\2"
/>
<replaceregexp
file="${idea.community.build}/Contents/Info.plist"
byline="false"
match="(<key>CFBundleGetInfoString</key>[\r\n \t]+<string>)[^<]+(</string>)"
replace="\1ParserIde 1.0.0, build (git)\2"
/>
<replaceregexp
file="${idea.community.build}/Contents/Info.plist"
byline="false"
match="(<key>CFBundleShortVersionString</key>[\r\n \t]+<string>)[^<]+(</string>)"
replace="\11.0.0\2"
/>
<replaceregexp
file="${idea.community.build}/Contents/Info.plist"
byline="false"
match="(<key>CFBundleVersion</key>[\r\n \t]+<string>)[^<]+(</string>)"
replace="\11.0.0 (git)\2"
/>
</target>
<target name="assemble" depends="clean,init,resources,fix.Info.plist"
description="compile the source">
<concat destfile="${work}/idea.properties" force="true">
<fileset dir="${idea.community.build}/bin" includes="idea.properties"/>
<footer trimleading="yes">idea.platform.prefix=ParserIde</footer>
</concat>
<replaceregexp
file="${work}/idea.properties"
byline="true"
match="^(?:# )?idea.(config|system|plugins|log).path=([^/]+)/\.[^/]+/(config|system)"
replace="idea.\1.path=\2/.ParserIde1/\3"/>
<fixcrlf srcdir="${idea.community.build}/bin" includes="*.bat" eol="dos"/>
<zip file="${parser.ide.target.package}" preserve0permissions="true">
<zipfileset dir="${idea.community.build}" prefix="go-ide"
includes="**/*"
excludes="bin/*.sh,bin/fsnotifier*,bin/idea.properties,bin/*.exe"/>
<zipfileset file="${work}/idea.properties" prefix="go-ide/bin"/>
<zipfileset dir="${idea.community.build}" prefix="go-ide"
includes="bin/*.sh,bin/fsnotifier*,bin/*.exe" filemode="755"/>
<zipfileset file="${parser.plugin}"
prefix="parseride/plugins/idea-parser3/lib/"/>
<zipfileset file="${dist}/parseride-resources.jar" prefix="parseride/lib/"/>
</zip>
</target>
<target name="clean" description="clean up">
<delete file="${parser.ide.target.package}.zip"/>
</target>
</project>