forked from jindrapetrik/jpexs-decompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
903 lines (755 loc) · 39.9 KB
/
build.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
<?xml version="1.0" encoding="UTF-8"?>
<project name="FFDec" basedir="." default="all" xmlns:jacoco="antlib:org.jacoco.ant">
<description>Builds project FFDec</description>
<loadproperties srcfile="build.properties" />
<property name="jar.filename" value="${prefix.filename}"/>
<property name="exe.filename" value="${prefix.filename}"/>
<property name="exe64.filename" value="${prefix.filename}64"/>
<path id="ant.lib.classpath">
<fileset dir="${ant.lib.dir}" includes="**/*.jar"/>
</path>
<taskdef name="mkbom" classname="com.jpexs.jbomutils.ant.MkBomTask" classpathref="ant.lib.classpath" />
<taskdef name="xar" classname="com.jpexs.xar.ant.XarTask" classpathref="ant.lib.classpath" />
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="ant.lib.classpath" />
<taskdef name="cpio" classname="org.apache.ant.compress.taskdefs.Cpio" classpathref="ant.lib.classpath" />
<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" classpathref="ant.lib.classpath" />
<taskdef name="desktopentry" classname="com.googlecode.ant_deb_task.DesktopEntry" classpathref="ant.lib.classpath" />
<taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="ant.lib.classpath" />
<taskdef name="nsis" classname="com.danielreese.nsisant.Task" classpathref="ant.lib.classpath" />
<property name="dist.lib.dir" value="${dist.dir}/${dist.lib.dirname}"/>
<patternset id="compiler.resources">
<include name="**/?*.properties"/>
<include name="**/?*.colorschemes"/>
<include name="**/?*.bin"/>
<include name="**/?*.xml"/>
<include name="**/?*.txt"/>
<include name="**/?*.gif"/>
<include name="**/?*.png"/>
<include name="**/?*.jpeg"/>
<include name="**/?*.jpg"/>
<include name="**/?*.html"/>
<include name="**/?*.dtd"/>
<include name="**/?*.tld"/>
<include name="**/?*.mid"/>
<include name="**/?*.wav"/>
<include name="**/?*.js"/>
<include name="**/?*.swf"/>
</patternset>
<target name="-loadversion" depends="-loadversion-prop,-loadversion-private">
</target>
<target name="-loadversion-private" unless="newversion.type">
<property name="version.major" value="0" />
<property name="version.minor" value="0" />
<property name="version.release" value="0" />
<property name="version.major" value="0" />
<property name="version.build" value="0" />
<!-- <property name="version.revision" value="" /> -->
<property name="version.debug" value="true" />
<property name="version" value="${version.major}.${version.minor}.${version.release}" />
<property name="version.number" value="${version.major}.${version.minor}.${version.release}.${version.build}" />
<property name="private" value="true" />
</target>
<target name="-loadversion-prop" if="newversion.type">
<loadproperties srcfile="version.properties" prefix="version"/>
<property name="version" value="${version.major}.${version.minor}.${version.release}" />
<property name="version.number" value="${version.major}.${version.minor}.${version.release}.${version.build}" />
<script language="javascript">
if(project.getProperty("version.debug")=="true"){
project.setProperty("nightly",true);
}
</script>
<echo level="info" message="Loaded Version:${version.major}.${version.minor}.${version.release}.${version.build}"/>
</target>
<target name="compile" depends="build_lib">
<!--<delete dir="${compile.dir}"/>-->
<mkdir dir="${compile.dir}"/>
<javac srcdir="${src.dir}" destdir="${compile.dir}" includes="**/*.java" target="${target.java}" source="${target.java}" debug="true"
debuglevel="lines,vars,source" includeantruntime="false" encoding="utf-8">
<compilerarg line="-Xlint:unchecked"/> <!-- For Java 8: -Xdiags:verbose -->
<classpath>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</classpath>
</javac>
<copy todir="${compile.dir}">
<fileset dir="${src.dir}">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile_lib">
<ant antfile="${core.lib.script}" target="compile" inheritAll="false" usenativebasedir="true" />
</target>
<target name="compile-tests">
<delete dir="${compile.test.dir}"/>
<mkdir dir="${compile.test.dir}"/>
<javac srcdir="${test.dir}" destdir="${compile.test.dir}" includes="**/*.java" target="${target.java}" source="${target.java}" debug="true" includeantruntime="false" encoding="utf-8">
<classpath>
<pathelement path="${compile.dir}"/>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="${test.lib.dir}" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="-test-halt-newver" if="new.version">
<property name="test.halt.failure" value="true" />
</target>
<target name="-test-halt-nonewver" unless="new.version">
<property name="test.halt.failure" value="false" />
</target>
<target name="test" depends="-test-halt-newver,-test-halt-nonewver,test_lib,compile,compile-tests">
<delete dir="${test.result.dir}"/>
<mkdir dir="${test.result.dir}"/>
<mkdir dir="${test.result.dir}/raw/"/>
<mkdir dir="${coverage.dir}" />
<jacoco:coverage destfile="${coverage.dir}/jacoco.exec">
<testng
outputDir="${test.result.dir}"
haltOnFailure="${test.halt.failure}" verbose="2" workingDir="${basedir}">
<classpath>
<pathelement path="${compile.test.dir}"/>
<pathelement path="${compile.dir}"/>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="${test.lib.dir}" includes="**/*.jar"/>
</classpath>
<jvmarg value="-noverify" />
<classfileset dir="${compile.test.dir}" includes="**/*.class" />
</testng>
</jacoco:coverage>
<!-- Coverage report -->
<mkdir dir="${coverage.result.dir}"/>
<jacoco:report>
<executiondata>
<file file="${coverage.dir}/jacoco.exec" />
</executiondata>
<structure name="${project.name}">
<classfiles>
<fileset dir="${compile.dir}" />
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${src.dir}" />
</sourcefiles>
</structure>
<html destdir="${coverage.result.dir}" />
</jacoco:report>
</target>
<condition property="is_windows">
<os family="windows"/>
</condition>
<target name="installer" depends="-loadversion,-load-tools,dist">
<property name="exe.file" value="${releases.dir}/${prefix.filename}_${version}${version.suffix}_setup.exe"/>
<nsis script="installer.nsi" path="${nsis.path}" verbosity="2">
<define name="APP_NAME" value="${product.name}"/>
<define name="APP_VER" value="${version}${version.suffix}"/>
<define name="APP_VER_MAJOR" value="${version.major}"/>
<define name="APP_VER_MINOR" value="${version.minor}"/>
<define name="APP_PUBLISHER" value="${vendor}"/>
<define name="APP_URL" value="${product.url}"/>
<define name="APP_SETUPFILE" value="${exe.file}" />
<define name="JRE_VERSION" value="${target.java}" />
</nsis>
<echo level="info" message="Setup created in ${exe.file}"/>
</target>
<target name="library" depends="-loadversion,build_lib">
<mkdir dir="${releases.dir}"/>
<copy file="${core.lib.path}" tofile="${releases.dir}/${prefix.filename}_${version}${version.suffix}_lib.jar"/>
</target>
<target name="archive" depends="-loadversion,dist">
<mkdir dir="${releases.dir}"/>
<property name="zip.file" value="${releases.dir}/${prefix.filename}_${version}${version.suffix}.zip" />
<zip destfile="${zip.file}" basedir="${dist.dir}" excludes="${app.script}">
<zipfileset dir="${dist.dir}" includes="${app.script}" fullpath="${app.script}" filemode="755"/>
</zip>
</target>
<target name="deb" depends="-loadversion,dist">
<mkdir dir="${releases.dir}"/>
<tempfile property="app.deb.desktop.temp" deleteonexit="true" prefix="desktop"/>
<desktopentry
toFile="${app.deb.desktop.temp}"
name="${product.name}"
comment="${app.description.short}"
exec="/usr/bin/${app.package}"
icon="/usr/share/java/${app.package}/icon.png"
categories="Development;Network;Utility;WebDevelopment;Java"
/>
<deb
package="${app.package}"
todir="${releases.dir}"
debFilenameProperty="deb.file.orig"
section="editors"
depends="${app.package.depends}">
<version upstream="${version}" />
<maintainer name="${vendor}" email="${app.vendor.mail}"/>
<description synopsis="${app.description.short}">${app.description}</description>
<tarfileset dir="${dist.dir}" prefix="usr/share/java/${app.package}">
<include name="**"/>
</tarfileset>
<tarfileset file="${dist.dir}/${app.script}" fullpath="usr/bin/${app.package}" filemode="755" />
<tarfileset file="${app.deb.desktop.temp}" fullpath="usr/share/applications/${app.deb.desktop.file}.desktop"/>
</deb>
<property name="deb.file" value="${releases.dir}/${prefix.filename}_${version}${version.suffix}.deb" />
<move file="${deb.file.orig}" tofile="${deb.file}" />
<delete file="${app.deb.desktop.temp}" />
</target>
<target name="osx-app-installer" depends="osx-app-bundle">
<mkdir dir="${app.installer.dir}/flat/base.pkg"/>
<mkdir dir="${app.installer.dir}/flat/Resources/en.lproj"/>
<mkdir dir="${app.installer.dir}/root/Applications"/>
<copy todir="${app.installer.dir}/root/Applications/">
<fileset dir="${app.bundle.dir}">
<include name="${app.osx.dir}.app/**" />
</fileset>
</copy>
<tempfile deleteonexit="true" property="app.cpio.temp" prefix="cpio"/>
<cpio destfile="${app.cpio.temp}" format="odc">
<tarfileset dir="${app.installer.dir}/root" uid="0" gid="80" includes="Applications/${app.osx.dir}.app/Contents/MacOS/${app.osx.dir}" filemode="777" />
<tarfileset dir="${app.installer.dir}/root" uid="0" gid="80">
<exclude name="Applications/${app.osx.dir}.app/Contents/Resources/${app.script}" />
<exclude name="Applications/${app.osx.dir}.app/Contents/MacOS/${app.osx.dir}" />
</tarfileset>
<tarfileset dir="${app.installer.dir}/root" uid="0" gid="80" includes="Applications/${app.osx.dir}.app/Contents/Resources/${app.script}" filemode="777" />
</cpio>
<gzip src="${app.cpio.temp}" destfile="${app.installer.dir}/flat/base.pkg/Payload" />
<delete file="${app.cpio.temp}" />
<resourcecount property="app.installer.files.number">
<fileset dir="${app.installer.dir}/root" />
</resourcecount>
<length property="app.installer.files.size.bytes">
<fileset dir="${app.installer.dir}/root" />
</length>
<script language="javascript">
<![CDATA[
var length_bytes = project.getProperty("app.installer.files.size.bytes");
var length_kbytes = Math.round((length_bytes / 1024) * Math.pow(10,2))
/ Math.pow(10,2);
project.setNewProperty("app.installer.files.size.kilobytes", length_kbytes);
]]>
</script>
<echo file="${app.installer.dir}/flat/base.pkg/PackageInfo"><![CDATA[<pkg-info format-version="2" identifier="${mac.bundle}.base.pkg" version="${version}${version.suffix}" install-location="/" auth="root">
<payload installKBytes="${app.installer.files.size.kilobytes}" numberOfFiles="${app.installer.files.number}"/>
<bundle-version>
<bundle id="${mac.bundle}" CFBundleIdentifier="${mac.bundle}" path="./Applications/${app.osx.dir}.app" CFBundleVersion="${version}${version.suffix}"/>
</bundle-version>
</pkg-info>]]></echo>
<mkbom destfile="${app.installer.dir}/flat/base.pkg/Bom">
<tarfileset dir="${app.installer.dir}/root" uid="0" gid="80" includes="Applications/${app.osx.dir}.app/Contents/MacOS/${app.osx.dir}" filemode="755" />
<tarfileset dir="${app.installer.dir}/root" uid="0" gid="80">
<exclude name="Applications/${app.osx.dir}.app/Contents/Resources/${app.script}" />
<exclude name="Applications/${app.osx.dir}.app/Contents/MacOS/${app.osx.dir}" />
</tarfileset>
<tarfileset dir="${app.installer.dir}/root" uid="0" gid="80" includes="Applications/${app.osx.dir}.app/Contents/Resources/${app.script}" filemode="755" />
</mkbom>
<echo file="${app.installer.dir}/flat/Distribution"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">
<title>${product.name} ${version}${version.suffix}</title>
<options customize="never" allow-external-scripts="no"/>
<domains enable_anywhere="true"/>
<installation-check script="pm_install_check();"/>
<script>function pm_install_check() {
if(!(system.compareVersions(system.version.ProductVersion,'10.5') >= 0)) {
my.result.title = 'Failure';
my.result.message = 'You need at least Mac OS X 10.5 to install ${product.name}';
my.result.type = 'Fatal';
return false;
}
return true;
}
</script>
<choices-outline>
<line choice="choice1"/>
</choices-outline>
<choice id="choice1" title="base">
<pkg-ref id="${mac.bundle}.base.pkg"/>
</choice>
<pkg-ref id="${mac.bundle}.base.pkg" installKBytes="${app.installer.files.size.kilobytes}" version="${version}${version.suffix}" auth="Root">#base.pkg</pkg-ref>
</installer-script>]]></echo>
<property name="pkg.file" value="${releases.dir}/${prefix.filename}_${version}${version.suffix}.pkg"/>
<xar destfile="${pkg.file}" compression="none">
<tarfileset dir="${app.installer.dir}/flat" />
</xar>
</target>
<target name="osx-app-bundle" depends="-loadversion,dist">
<property name="app.script.temp" value="${app.bundle.dir}/${app.osx.dir}.app/Contents/MacOS/${app.osx.dir}"/>
<echo file="${app.script.temp}">#!/bin/bash cd "$(dirname "$${BASH_SOURCE[0]}")" cd ../Resources ./${app.script}</echo>
<property name="app.info.temp" value="${app.bundle.dir}/${app.osx.dir}.app/Contents/Info.plist"/>
<echo file="${app.info.temp}"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>${product.name}</string>
<key>CFBundleExecutable</key>
<string>FFDec</string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
<key>CFBundleIdentifier</key>
<string>${mac.bundle}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>FFDec</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${version}${version.suffix}</string>
<key>CFBundleVersion</key>
<string>${version}${version.suffix}</string>
<key>LSApplicationCategoryType</key>
<string>${mac.category.type}</string>
</dict>
</plist>]]></echo>
<copy todir="${app.bundle.dir}/${app.osx.dir}.app/Contents/Resources/">
<fileset dir="${dist.dir}" />
</copy>
</target>
<target name="osx-app-archive" depends="osx-app-bundle">
<mkdir dir="${releases.dir}"/>
<property name="osx.zip.file" value="${releases.dir}/${prefix.filename}_${version}${version.suffix}_macosx.zip" />
<zip destfile="${osx.zip.file}">
<zipfileset dir="${app.bundle.dir}" includes="${app.osx.dir}.app/Contents/MacOS/${app.osx.dir}" filemode="777" />
<zipfileset dir="${app.bundle.dir}">
<exclude name="${app.osx.dir}.app/Contents/Resources/${app.script}" />
<exclude name="${app.osx.dir}.app/Contents/MacOS/${app.osx.dir}" />
</zipfileset>
<zipfileset dir="${app.bundle.dir}" includes="${app.osx.dir}.app/Contents/Resources/${app.script}" filemode="777" />
</zip>
</target>
<target name="-set-gui-type">
<property name="exe.type" value="gui" />
</target>
<target name="-set-console-type">
<property name="exe.type" value="console" />
</target>
<target name="-exe-config" depends="-loadversion">
<echoxml file="${exe.config}">
<launch4jConfig>
<dontWrapJar>true</dontWrapJar>
<headerType>${exe.type}</headerType>
<jar>${jar.filename}.jar</jar>
<outfile>${basedir}/${dist.dir}/${exe.filename}.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir></chdir>
<priority>normal</priority>
<downloadUrl>https://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<customProcName>false</customProcName>
<stayAlive>false</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>${basedir}/${exe.icon}</icon>
<jre>
<path></path>
<minVersion>${min.java.version}</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
<maxHeapPercent>${max.heap.size.percent}</maxHeapPercent>
<opt>-Djava.net.preferIPv4Stack=true</opt>
<opt>-Djna.nosys=true</opt>
</jre>
<splash>
<file>graphics/splash.bmp</file>
<waitForWindow>true</waitForWindow>
<timeout>60</timeout>
<timeoutErr>true</timeoutErr>
</splash>
<versionInfo>
<fileVersion>${version.number}</fileVersion>
<txtFileVersion>${version}${version.suffix}</txtFileVersion>
<fileDescription>${product.name}</fileDescription>
<copyright>${vendor}</copyright>
<productVersion>${version.number}</productVersion>
<txtProductVersion>${version}${version.suffix}</txtProductVersion>
<productName>${product.name}</productName>
<companyName></companyName>
<internalName>${internal.name}</internalName>
<originalFilename>${exe.filename}.exe</originalFilename>
</versionInfo>
</launch4jConfig>
</echoxml>
</target>
<target name="-exe-linux" unless="is_windows" depends="-load-tools,-exe-config">
<exec dir="${launch4j.path}" executable="${launch4j.path}/launch4j" failonerror="true">
<arg file="${exe.config}" />
</exec>
</target>
<target name="-exe-windows" if="is_windows" depends="-load-tools,-exe-config">
<exec dir="${launch4j.path}" executable="${launch4j.path}\launch4jc.exe" failonerror="true">
<arg file="${exe.config}" />
</exec>
</target>
<target name="exe" depends="-set-gui-type,-exe-linux,-exe-windows">
</target>
<target name="-check-tools">
<available file="tools.properties" property="tools.config.exists"/>
</target>
<target name="-load-tools-ok" if="tools.config.exists">
<loadproperties srcfile="tools.properties" />
</target>
<target name="-load-tools-fail" unless="tools.config.exists">
<fail>
tools.properties NOT found.
Please create file named "tools.properties" and add two lines:
nsis.path = Path to Nullsoft Install System
launch4j.path = Path to launch4j
WARNING: You must use double backslash in paths on Windows System or forward slash
</fail>
</target>
<target name="-load-tools" depends="-check-tools,-load-tools-ok,-load-tools-fail">
</target>
<target name="exe-console" depends="-set-console-type,-exe-linux,-exe-windows">
</target>
<target name="release" depends="library,archive,deb,osx-app-archive,installer,osx-app-installer,locales">
</target>
<target name="all" depends="clean,build,test,javadoc,release">
</target>
<target name="-upload-fail" unless="upload.config.exists">
<fail message="Cannot upload - Website properties file missing. Create file named jpexs_website.properties and put username=xxx, password=yyy lines in there" />
</target>
<target name="-set-none-newversion" unless="newversion.type">
<property name="newversion.type" value="none"/>
</target>
<target name="-check-version-online" depends="-set-none-newversion,git-tag">
<loadproperties srcfile="jpexs_website.properties" prefix="website"/>
<echo level="info">Checking version online: ${newversion.type}...</echo>
<!-- Note: You must have developer account to upload to JPEXS website -->
<java jar="${ant.lib.dir}/uploader.jar" fork="true" failonerror="true" outputproperty="newversion.prop">
<arg value="${website.version.url}" />
<arg value="-field" />
<arg value="mode" />
<arg value="commandline" />
<arg value="-field" />
<arg value="set_username" />
<arg value="${website.username}" />
<arg value="-field" />
<arg value="set_password" />
<arg value="${website.password}" />
<arg value="-field" />
<arg value="revision" />
<arg value="${git.tag}" />
<arg value="-field" />
<arg value="new" />
<arg value="${newversion.type}" />
</java>
<echo file="version.properties" message="${newversion.prop}" force=""/>
</target>
<target name="-upload-do" if="upload.config.exists">
<loadproperties srcfile="jpexs_website.properties" prefix="website"/>
<echo level="info">Uploading...</echo>
<!-- Note: You must have developer account to upload to JPEXS website -->
<java jar="${ant.lib.dir}/uploader.jar" fork="true" failonerror="true">
<arg value="${website.upload.url}" />
<arg value="-field" />
<arg value="mode" />
<arg value="commandline" />
<arg value="-field" />
<arg value="set_username" />
<arg value="${website.username}" />
<arg value="-field" />
<arg value="set_password" />
<arg value="${website.password}" />
<arg value="-${upload.form.new.type}" />
<arg value="new" />
<arg value="${upload.form.new.value}" />
<arg value="-${upload.form.fixed.type}" />
<arg value="fixed" />
<arg value="${upload.form.fixed.value}" />
<arg value="-file" />
<arg value="fileExe" />
<arg value="${exe.file}" />
<arg value="-file" />
<arg value="fileZip" />
<arg value="${zip.file}" />
<arg value="-file" />
<arg value="fileOSXZip" />
<arg value="${osx.zip.file}" />
<arg value="-file" />
<arg value="filePkg" />
<arg value="${pkg.file}" />
<arg value="-file" />
<arg value="fileDeb" />
<arg value="${deb.file}" />
<arg value="-file" />
<arg value="fileLang" />
<arg value="${lang.file}" />
</java>
</target>
<target name="-upload-check-config">
<available file="jpexs_website.properties" property="upload.config.exists"/>
</target>
<!-- Prepare upload dialog to not show (no changes in nightly) -->
<target name="-upload-check-nightly" if="nightly">
<property name="upload.form.new.type" value="emptyfield" />
<property name="upload.form.new.value" value="" />
<property name="upload.form.fixed.type" value="emptyfield" />
<property name="upload.form.fixed.value" value="" />
</target>
<!-- Prepare upload dialog to show -->
<target name="-upload-check-stable" unless="nightly">
<property name="upload.form.new.type" value="textarea" />
<property name="upload.form.new.value" value="New:" />
<property name="upload.form.fixed.type" value="textarea" />
<property name="upload.form.fixed.value" value="Fixed:" />
</target>
<target name="-upload" depends="-upload-check-nightly,-upload-check-stable,-upload-check-config,-upload-do,-upload-fail">
</target>
<target name="dist" depends="build,exe">
<copy todir="${dist.dir}">
<fileset dir="${resources.dir}" includes="**/*.*"/>
</copy>
</target>
<target name="locales" depends="-loadversion">
<delete dir="${locales.target.dir}"/>
<mkdir dir="${locales.target.dir}/${project.name}"/>
<copy todir="${locales.target.dir}/${project.name}">
<fileset dir="${locales.dir}" includes="**/*.*"/>
</copy>
<mkdir dir="${locales.target.dir}/jsyntaxpane/bundle/"/>
<copy todir="${locales.target.dir}/jsyntaxpane/bundle/">
<fileset dir="libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane" includes="**/*.*"/>
</copy>
<mkdir dir="${locales.target.dir}/jsyntaxpane/defaultsyntaxkit"/>
<copy todir="${locales.target.dir}/jsyntaxpane/defaultsyntaxkit">
<fileset dir="libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/defaultsyntaxkit" includes="**/*.*"/>
</copy>
<mkdir dir="${locales.target.dir}/jsyntaxpane/syntaxkits/flasmsyntaxkit"/>
<copy todir="${locales.target.dir}/jsyntaxpane/syntaxkits/flasmsyntaxkit">
<fileset dir="libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/syntaxkits/flasmsyntaxkit" includes="**/config*.properties"/>
</copy>
<mkdir dir="${locales.target.dir}/jsyntaxpane/syntaxkits/flasm3syntaxkit"/>
<copy todir="${locales.target.dir}/jsyntaxpane/syntaxkits/flasm3syntaxkit">
<fileset dir="libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/syntaxkits/flasm3syntaxkit" includes="**/config*.properties"/>
</copy>
<mkdir dir="${locales.target.dir}/jsyntaxpane/syntaxkits/flasm3methodinfosyntaxkit"/>
<copy todir="${locales.target.dir}/jsyntaxpane/syntaxkits/flasm3methodinfosyntaxkit">
<fileset dir="libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/syntaxkits/flasm3methodinfosyntaxkit" includes="**/config*.properties"/>
</copy>
<mkdir dir="${locales.target.dir}/lib"/>
<copy todir="${locales.target.dir}/lib">
<fileset dir="${locales.lib.dir}" includes="**/*.*"/>
</copy>
<echo file="${locales.target.dir}/readme.txt">${project.name} ${version}${version.suffix} localization pack
-------------------------------------------------------------------
Please follow instructions on https://www.free-decompiler.com/flash/translations.html
</echo>
<property name="lang.file" value="${releases.dir}/${prefix.filename}_${version}${version.suffix}_lang.zip" />
<zip destfile="${lang.file}" basedir="${locales.target.dir}"/>
</target>
<target name="-nightly-suffix" if="nightly">
<property name="version.suffix" value="_nightly${version.build}"/>
</target>
<target name="-no-suffix" unless="version.suffix">
<property name="version.suffix" value=""/>
</target>
<target name="-private-suffix" if="private">
<property name="version.suffix" value="_private_${git.short.tag}"/>
</target>
<target name="-suffix" depends="-nightly-suffix,-private-suffix,-no-suffix">
</target>
<target name="-timestamp" depends="-loadversion,git-tag">
<tstamp>
<format property="BUILTAT" pattern="MM/dd/yyyy hh:mm aa" timezone="CET"/>
<format property="VERDATE" pattern="yyyyddMM_hhmm" timezone="CET"/>
</tstamp>
<echo level="info" message="Version: ${version}"/>
</target>
<target name="build_lib">
<ant antfile="${core.lib.script}" target="build" inheritAll="false" usenativebasedir="true"/>
<copy file="${core.lib.path}" todir="${lib.dir}" />
</target>
<target name="clean_lib">
<ant antfile="${core.lib.script}" target="clean" inheritAll="false" usenativebasedir="true" />
<delete file="${lib.dir}/${core.lib.name}" />
</target>
<target name="-test_lib-newver" if="new.version">
<ant antfile="${core.lib.script}" target="testhalt" inheritAll="false" usenativebasedir="true" />
</target>
<target name="-test_lib-nonewver" unless="new.version">
<ant antfile="${core.lib.script}" target="test" inheritAll="false" usenativebasedir="true" />
</target>
<target name="test_lib" depends="-test_lib-newver,-test_lib-nonewver">
</target>
<target name="-git-check-exists" >
<property environment="env" />
<available file="git" filepath="${env.PATH}" property="git.present" />
<available file="git.exe" filepath="${env.Path}" property="git.present"/>
<available file="git.exe" filepath="${env.PATH}" property="git.present" />
</target>
<target name="-git-required" depends="-git-check-exists" unless="private">
<fail unless="git.present" message="Git not found. Please install git with commandline support."/>
</target>
<target name="-do-git-tag" if="git.present">
<exec executable="git" outputproperty="git.tag" failonerror="true">
<arg value="rev-parse"/>
<arg value="HEAD"/>
</exec>
<exec executable="git" outputproperty="git.short.tag" failonerror="true">
<arg value="rev-parse"/>
<arg value="--short"/>
<arg value="HEAD"/>
</exec>
<echo level="info" message="Git tag:${git.tag}"/>
<echo level="info" message="Git shorttag:${git.short.tag}"/>
</target>
<target name="-no-git-tag" if="private" unless="git.present">
<property name="git.tag" value="unknown" />
<property name="git.short.tag" value="unk" />
<echo level="warning" message="Warning: Git executable not found. No revision hash will be included in release." />
</target>
<target name="git-tag" depends="-git-required,-no-git-tag,-do-git-tag">
</target>
<target name="build" depends="-loadversion,build_lib,-timestamp,-suffix,compile">
<mkdir dir="${dist.dir}"/>
<!-- <delete dir="${dist.lib.dir}"/> -->
<mkdir dir="${dist.lib.dir}"/>
<copy todir="${dist.lib.dir}">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="${lib.dir}" includes="**/*.exe"/>
<fileset dir="${lib.dir}" includes="**/*.txt"/>
</copy>
<propertyfile file="${compile.dir}/${properties.name}"
comment="This file is automatically generated - DO NOT EDIT">
<entry key="buildtime" value="${BUILTAT}"/>
<entry key="build" value="${git.tag}"/>
<entry key="builder" value="${builder}"/>
<entry key="version" value="${version}"/>
<entry key="nightly" value="${nightly}"/>
<entry key="version.major" value="${version.major}"/>
<entry key="version.minor" value="${version.minor}"/>
<entry key="version.release" value="${version.release}"/>
<entry key="version.build" value="${version.build}"/>
<entry key="version.debug" value="${version.debug}"/>
</propertyfile>
<pathconvert pathsep=" " property="manifestClassPath">
<fileset dir="${dist.dir}" includes="${dist.lib.dirname}/**/*.*"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="${dist.lib.dirname}/*"/>
</chainedmapper>
</pathconvert>
<jar destfile="${dist.dir}/${jar.filename}.jar" basedir="${compile.dir}">
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Class-Path" value="${manifestClassPath}"/>
</manifest>
</jar>
</target>
<target name="run" depends="build">
<java jar="${dist.dir}/${jar.filename}.jar" fork="true">
<jvmarg value="-Xmx${max.heap.size.run}m" />
<jvmarg value="-Djava.net.preferIPv4Stack=true" />
<arg line="${run.params}" />
</java>
</target>
<target name="javadoc">
<mkdir dir="${javadoc.dir}"/>
<javadoc sourcepath="${src.dir}" destdir="${javadoc.dir}" windowtitle="${project.name}"
useexternalfile="yes">
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</classpath>
</javadoc>
</target>
<target name="clean" depends="clean_lib">
<delete dir="${compile.dir}"/>
<delete dir="${compile.test.dir}"/>
<delete dir="${coverage.dir}"/>
<delete dir="${coverage.result.dir}"/>
<delete dir="${test.result.dir}"/>
<delete dir="${locales.target.dir}"/>
<delete dir="${javadoc.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${app.installer.dir}"/>
<delete dir="${app.bundle.dir}"/>
</target>
<!-- Debug one test method (Netbeans IDE) -->
<target name="debug-test-method" depends="compile-tests">
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
<delete dir="${test.result.dir}"/>
<mkdir dir="${test.result.dir}"/>
<mkdir dir="${test.result.dir}/raw/"/>
<nbjpdastart addressproperty="jpda.address" name="ffdec" transport="dt_socket">
<classpath>
<pathelement path="${compile.dir}"/>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="${test.lib.dir}" includes="**/*.jar"/>
</classpath>
</nbjpdastart>
<testng
outputDir="${test.result.dir}"
haltOnFailure="false" verbose="2" workingDir="${basedir}" methods="${test.class}.${test.method}">
<classpath>
<pathelement path="${compile.test.dir}"/>
<pathelement path="${compile.dir}"/>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="${test.lib.dir}" includes="**/*.jar"/>
</classpath>
<jvmarg value="-noverify" />
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
<classfileset dir="${compile.test.dir}" includes="**/*.class" />
</testng>
</target>
<target name="git-pull" depends="-git-required">
<exec executable="git" failonerror="true">
<arg value="pull"/>
</exec>
</target>
<target name="git-push">
<!-- NOTHING -->
</target>
<target name="-git-commit-versioninfo">
<exec executable="git" failonerror="true">
<arg value="add"/>
<arg value="version.properties"/>
</exec>
<exec executable="git" failonerror="true">
<arg value="commit"/>
<arg value="-m"/>
<arg value="version changed to ${newversion.major}.${newversion.minor}.${newversion.release} build ${newversion.build}"/>
</exec>
</target>
<target name="-loadoldversion">
<loadproperties srcfile="version.properties" prefix="oldversion" />
</target>
<target name="-inc-major">
<property name="newversion.type" value="major"/>
</target>
<target name="-inc-minor">
<property name="newversion.type" value="minor"/>
</target>
<target name="-inc-release">
<property name="newversion.type" value="release"/>
</target>
<target name="-inc-nightlybuild">
<property name="newversion.type" value="nightly"/>
</target>
<target name="-save-version-info-file">
<propertyfile file="version.properties"
comment="DO NOT MODIFY - it is updated automatically with the build script">
<entry key="major" value="${newversion.major}"/>
<entry key="minor" value="${newversion.minor}"/>
<entry key="release" value="${newversion.release}"/>
<entry key="build" value="${newversion.build}"/>
<entry key="debug" value="${newversion.debug}"/>
</propertyfile>
</target>
<target name="-save-version-info" depends="-save-version-info-file,-git-commit-versioninfo">
</target>
<target name="-new-version-set">
<property name="new.version" value="1" />
</target>
<target name="new-version-major" depends="git-pull,-new-version-set,-inc-major,-check-version-online,all,-upload,git-push">
</target>
<target name="new-version-minor" depends="git-pull,-new-version-set,-inc-minor,-check-version-online,all,-upload,git-push">
</target>
<target name="new-version-release" depends="git-pull,-new-version-set,-inc-release,-check-version-online,all,-upload,git-push">
</target>
<target name="new-version-nightlybuild" depends="git-pull,-new-version-set,-inc-nightlybuild,-check-version-online,all,-upload,git-push">
</target>
<target name="upload-last" depends="all,-upload">
</target>
</project>