Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/lwjgl3
Path: blob/wip/rebase_3.3.3/build.xml
2570 views
1
<!--
2
~ Copyright LWJGL. All rights reserved.
3
~ License terms: https://www.lwjgl.org/license
4
-->
5
<project name="LWJGL" basedir="." default="all" xmlns:if="ant:if" xmlns:unless="ant:unless">
6
7
<property name="build.sysclasspath" value="ignore"/>
8
9
<property name="config" location="config" relative="true"/>
10
11
<import file="${config}/build-definitions.xml"/>
12
<import file="${config}/build-assets.xml"/>
13
<import file="${config}/${platform}/build.xml"/>
14
15
<!-- Initialize build -->
16
<target name="init" description="Initializes the directories required by the build process">
17
<fail message="LWJGL requires Ant version 1.9.3 or higher.">
18
<condition>
19
<not><antversion atleast="1.9.3"/></not>
20
</condition>
21
</fail>
22
23
<echo taskname="override" message="Build type: ${build.type}" if:set="env.LWJGL_BUILD_TYPE"/>
24
<echo taskname="override" message="Build output: ${build.output}" if:set="env.LWJGL_BUILD_OUTPUT"/>
25
<echo taskname="override" message="Build architecture: ${build.arch}" if:set="env.LWJGL_BUILD_ARCH"/>
26
<echo taskname="override" message="Build offline: ${build.offline}" if:set="env.LWJGL_BUILD_OFFLINE"/>
27
28
<mkdir-symlink dir="bin"/>
29
30
<!-- Compile custom Ant tasks -->
31
<mkdir dir="${bin.ant}"/>
32
<lwjgl.javac
33
destdir="${bin.ant}"
34
classpath="${ant.core.lib}"
35
36
srcdir="${src.ant}/java"
37
includes="org/lwjgl/**"
38
39
taskname="javac: Custom Ant Tasks"
40
/>
41
42
<taskdef name="logLevel" classname="org.lwjgl.SetLogLevel" classpath="${bin.ant}"/>
43
<taskdef name="bindingConfig" classname="org.lwjgl.BindingConfig" classpath="${bin.ant}"/>
44
<bindingConfig/>
45
46
<ant antfile="update-dependencies.xml" target="check-dependencies" inheritAll="false"/>
47
48
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlinc}/lib/kotlin-ant.jar"/>
49
<taskdef resource="testngtasks" classpath="${lib}/java/testng.jar;${lib}/java/slf4j-api.jar;${lib}/java/slf4j-jdk14.jar"/>
50
</target>
51
52
<target name="init-wiki" description="Initializes the lwjgl3-wiki git repository in /wiki. [Optional]">
53
<confirm-replace dir="wiki" msg="The wiki directory contents will be replaced with a fresh clone of the lwjgl3-wiki repository. Continue?"/>
54
55
<delete dir="wiki"/>
56
<exec executable="git" failonerror="true">
57
<arg value="clone"/>
58
<arg value="https://github.com/LWJGL/lwjgl3-wiki.wiki.git"/>
59
<arg value="wiki"/>
60
</exec>
61
</target>
62
63
<target name="reset" description="Resets the repository to its initial state.">
64
<local name="input"/>
65
<input
66
message="This action will clean everything and also remove libraries and sub-repositories. Continue?"
67
validargs="y,n"
68
defaultvalue="n"
69
addproperty="input"
70
/>
71
<fail message="Cancelled.">
72
<condition>
73
<equals arg1="n" arg2="${input}"/>
74
</condition>
75
</fail>
76
77
<antcall target="clean"/>
78
79
<delete-symlink dir="bin"/>
80
81
<delete dir=".gradle"/>
82
<delete dir="wiki"/>
83
84
<echo message="Reset successful."/>
85
</target>
86
87
<target name="clean" description="Cleans all directories controlled by this script">
88
<delete includeemptydirs="true">
89
<fileset dir="bin">
90
<include name="**/*"/>
91
<exclude name="libs/**"/>
92
</fileset>
93
</delete>
94
95
<forEachModule>
96
<delete-symlink dir="${module.lwjgl}/${module}/src/generated"/>
97
</forEachModule>
98
<!-- Do not delete /wiki, it may contain the lwjgl3-wiki git repo -->
99
100
<echo message="Cleanup successful."/>
101
</target>
102
103
<target name="clean-kotlin" description="Deletes Kotlin binary files produced by this script">
104
<delete dir="${bin.generator}"/>
105
<delete dir="${bin.templates}"/>
106
</target>
107
108
<target name="clean-java" description="Deletes Java binary files produced by this script">
109
<delete dir="${bin.lwjgl}"/>
110
<delete dir="${bin.samples}"/>
111
<delete dir="${bin.test}"/>
112
</target>
113
114
<target name="clean-native" description="Deletes native binary files produced by this script">
115
<delete dir="${bin.native}" unless:set="module"/>
116
<delete dir="${bin.native}/${module}" if:set="module"/>
117
</target>
118
119
<target name="clean-generated" description="Deletes sources, test results and documentation generated by this script" depends="clean-generated-java,clean-generated-native">
120
<delete dir="${bin.test.html}"/>
121
<delete dir="${bin.javadoc}"/>
122
</target>
123
124
<target name="clean-generated-java" description="Deletes Java sources generated by this script">
125
<delete file="${bin.generator}/generated-touch.txt" quiet="true"/>
126
<forEachModule unless:set="module">
127
<delete dir="${module.lwjgl}/${module}/src/generated/java"/>
128
</forEachModule>
129
<delete dir="${module.lwjgl}/${module}/src/generated/java" if:set="module"/>
130
</target>
131
132
<target name="clean-generated-native" description="Deletes native sources generated by this script">
133
<delete file="${bin.generator}/generated-touch.txt" quiet="true"/>
134
<forEachModule unless:set="module">
135
<delete dir="${module.lwjgl}/${module}/src/generated/c" quiet="true"/>
136
</forEachModule>
137
<delete dir="${module.lwjgl}/${module}/src/generated/c" quiet="true" if:set="module"/>
138
</target>
139
140
<target name="all" description="Builds LWJGL and runs the tests" depends="compile-templates, tests"/>
141
142
<target name="-compile-generator" depends="init">
143
<local name="generator-uptodate"/>
144
<uptodate targetfile="${bin.generator}/touch.txt" property="generator-uptodate">
145
<srcfiles dir="${src.generator}/kotlin" includes="**"/>
146
</uptodate>
147
148
<echo message="Compiling Kotlin generator..." level="info" taskname="Generator" unless:set="generator-uptodate"/>
149
<mkdir dir="${bin.generator}"/>
150
<kotlinc moduleName="generator" output="${bin.generator}" printVersion="true" unless:set="generator-uptodate">
151
<compilerarg value="-progressive"/>
152
<compilerarg value="-Xno-call-assertions"/>
153
<compilerarg value="-Xno-param-assertions"/>
154
<compilerarg value="-Xlambdas=indy"/>
155
<compilerarg value="-Xreport-perf"/>
156
<compilerarg value="-Xbackend-threads=${backend-threads}" if:set="backend-threads"/>
157
<compilerarg line="-jvm-target 1.8"/>
158
159
<src path="${src.generator}/kotlin"/>
160
</kotlinc>
161
<touch file="${bin.generator}/touch.txt" unless:set="generator-uptodate"/>
162
163
<lwjgl.javac
164
destdir="${bin.generator}"
165
166
srcdir="${src.generator}/java"
167
includes="org/lwjgl/**"
168
169
taskname="javac: Generator Tools"
170
/>
171
</target>
172
173
<target name="compile-templates" description="Compiles the Templates module" depends="-compile-generator">
174
<local name="templates-uptodate"/>
175
<uptodate targetfile="${bin.templates}/touch.txt" property="templates-uptodate">
176
<srcfiles dir="${module.lwjgl}" includes="**/kotlin/**/*.kt"/>
177
<srcfiles dir="${bin.generator}" includes="touch.txt"/>
178
</uptodate>
179
180
<local name="egl_types"/>
181
<condition property="egl_types">
182
<and>
183
<isfalse value="${binding.egl}"/>
184
<istrue value="${binding.glfw}"/>
185
<istrue value="${binding.openxr}"/>
186
</and>
187
</condition>
188
189
<local name="opengl_types"/>
190
<condition property="opengl_types">
191
<and>
192
<isfalse value="${binding.opengl}"/>
193
<istrue value="${binding.glfw}"/>
194
<istrue value="${binding.openxr}"/>
195
</and>
196
</condition>
197
198
<local name="vulkan_types"/>
199
<condition property="vulkan_types">
200
<and>
201
<isfalse value="${binding.vulkan}"/>
202
<istrue value="${binding.glfw}"/>
203
<istrue value="${binding.openxr}"/>
204
</and>
205
</condition>
206
207
<local name="core.kotlin.path"/>
208
<property name="core.kotlin.path" value="${module.lwjgl}/core/src/templates/kotlin/core"/>
209
210
<echo message="Compiling Kotlin templates. This will take 1-2 minutes..." level="info" taskname="Templates" unless:set="templates-uptodate"/>
211
<mkdir dir="${bin.templates}"/>
212
<kotlinc moduleName="templates" output="${bin.templates}" printVersion="true" unless:set="templates-uptodate">
213
<classpath>
214
<pathelement location="${bin.generator}"/>
215
</classpath>
216
217
<compilerarg value="-progressive"/>
218
<compilerarg value="-Xno-call-assertions"/>
219
<compilerarg value="-Xno-param-assertions"/>
220
<compilerarg value="-Xlambdas=indy"/>
221
<compilerarg value="-Xreport-perf"/>
222
<compilerarg value="-Xbackend-threads=${backend-threads}" if:set="backend-threads"/>
223
<compilerarg line="-jvm-target 1.8"/>
224
225
<src path="${core.kotlin.path}/jni"/>
226
<src path="${core.kotlin.path}/libc"/>
227
<src path="${core.kotlin.path}/libffi"/>
228
<src path="${core.kotlin.path}/linux"/>
229
<src path="${core.kotlin.path}/macos"/>
230
<src path="${core.kotlin.path}/templates"/>
231
<src path="${core.kotlin.path}/windows"/>
232
233
<src path="${module.templatepath}"/>
234
235
<src path="${module.lwjgl}/egl/src/templates/kotlin/egl/EGLTypes.kt" if:set="egl_types"/>
236
<src path="${module.lwjgl}/opengl/src/templates/kotlin/opengl/GLTypes.kt" if:set="opengl_types"/>
237
<src path="${module.lwjgl}/opengl/src/templates/kotlin/opengl/GLXTypes.kt" if:set="opengl_types"/>
238
<src path="${module.lwjgl}/opengl/src/templates/kotlin/opengl/WGLTypes.kt" if:set="opengl_types"/>
239
<src path="${module.lwjgl}/vulkan/src/templates/kotlin/vulkan/VKBase.kt" if:set="vulkan_types"/>
240
<src path="${module.lwjgl}/vulkan/src/templates/kotlin/vulkan/VKTypes.kt" if:set="vulkan_types"/>
241
<src path="${module.lwjgl}/vulkan/src/templates/kotlin/vulkan/ExtensionTypes.kt" if:set="vulkan_types"/>
242
<src path="${module.lwjgl}/vulkan/src/templates/kotlin/vulkan/VkVideoTypes.kt" if:set="vulkan_types"/>
243
</kotlinc>
244
<touch file="${bin.templates}/touch.txt" unless:set="templates-uptodate"/>
245
</target>
246
247
<target name="touch-kotlinc" description="Used for touching from an IDE">
248
<touch file="${bin.generator}/touch.txt"/>
249
<touch file="${bin.templates}/touch.txt"/>
250
</target>
251
252
<target name="cache-kotlinc" description="Uploads the compiled Kotlin templates to build.lwjgl.org" depends="init">
253
<antcall target="clean-kotlin" unless:set="quick"/>
254
<antcall target="compile-templates" unless:set="quick"/>
255
256
<local name="commit"/>
257
<exec executable="git" failonerror="true" outputproperty="commit" taskname="Git revision">
258
<arg value="log"/>
259
<arg value="--first-parent"/>
260
<arg value="--pretty=format:%H"/>
261
<arg value="${revision}" if:set="revision"/>
262
<arg value="HEAD~1..HEAD" unless:set="revision"/>
263
</exec>
264
265
<jar destfile="templates.jar" level="9" taskname="Building templates.jar">
266
<manifest>
267
<attribute name="Specification-Title" value="LWJGL Kotlin Template Cache"/>
268
<attribute name="Specification-Vendor" value="lwjgl.org"/>
269
<attribute name="Implementation-Version" value="${commit}"/>
270
</manifest>
271
<fileset dir=".">
272
<include name="${bin.generator}/**"/>
273
<include name="${bin.templates}/**"/>
274
<exclude name="**/*.txt"/>
275
</fileset>
276
</jar>
277
278
<apply executable="aws" failonerror="true" relative="true" taskname="S3 upload">
279
<arg value="s3"/>
280
<arg value="mv"/>
281
282
<srcfile/>
283
284
<arg value="s3://lwjgl-build/ci/"/>
285
<arg line='--cache-control "public, must-revalidate, proxy-revalidate, max-age=0"'/>
286
287
<fileset file="templates.jar"/>
288
</apply>
289
</target>
290
291
<target name="hydrate-kotlinc" description="Downloads the compiled Kotlin templates to build.lwjgl.org" depends="init">
292
<!-- Download cache -->
293
<get taskname="Downloading templates.jar" src="https://build.lwjgl.org/ci/templates.jar" dest="."/>
294
295
<!-- Validate commit -->
296
<local name="Implementation-Version"/>
297
<loadproperties taskname="Cache revision">
298
<zipentry zipfile="templates.jar" name="META-INF/MANIFEST.MF"/>
299
<filterchain>
300
<linecontains>
301
<contains value="Implementation-Version"/>
302
</linecontains>
303
</filterchain>
304
</loadproperties>
305
306
<local name="commit_message"/>
307
<exec executable="git" failonerror="true" outputproperty="commit_message" taskname="Git message">
308
<arg value="log"/>
309
<arg value="--first-parent"/>
310
<arg value="--pretty=format:%s"/>
311
<arg value="HEAD~1..HEAD"/>
312
</exec>
313
314
<local name="commit_CI"/>
315
<condition property="commit_CI" value="true" else="false">
316
<equals arg1="${commit_message}" arg2="CI configuration"/>
317
</condition>
318
319
<local name="commit"/>
320
<exec executable="git" failonerror="true" outputproperty="commit" taskname="Git revision">
321
<arg value="log"/>
322
<arg value="--first-parent"/>
323
<arg value="--pretty=format:%H"/>
324
<arg value="HEAD~2..HEAD~1" if:true="${commit_CI}"/>
325
<arg value="HEAD~1..HEAD" unless:true="${commit_CI}"/>
326
</exec>
327
328
<local name="commit_mismatch"/>
329
<local name="fail_on_mismatch"/>
330
<condition property="commit_mismatch" value="true">
331
<not><equals arg1="${Implementation-Version}" arg2="${commit}"/></not>
332
</condition>
333
<condition property="fail_on_mismatch" value="true">
334
<and>
335
<isset property="commit_mismatch"/>
336
<not><isset property="hydrate-kotlinc.force"/></not>
337
</and>
338
</condition>
339
<delete file="templates.jar" taskname="Deleting the compiled Kotlin templates cache" if:set="fail_on_mismatch"/>
340
<fail message="The current commit does not match the Kotlin template cache's commit." if="fail_on_mismatch"/>
341
<echo message="The current commit does not match the Kotlin template cache's commit, but hydration has been forced." taskname="WARNING" if:set="commit_mismatch"/>
342
343
<!-- Hydrate -->
344
<antcall target="clean-kotlin"/>
345
<unzip src="templates.jar" dest="." taskname="Hydrating the compiled Kotlin templates">
346
<patternset>
347
<include name="**/*"/>
348
<exclude name="META-INF"/>
349
<exclude name="META-INF/MANIFEST.MF"/>
350
</patternset>
351
</unzip>
352
<antcall target="touch-kotlinc"/>
353
354
<!-- Cleanup -->
355
<delete file="templates.jar" taskname="Deleting the compiled Kotlin templates cache"/>
356
</target>
357
358
<target name="formatter" description="Runs the template formatter tool" depends="-compile-generator">
359
<java
360
classname="org.lwjgl.generator.util.TemplateFormatter"
361
fork="true"
362
spawn="true"
363
>
364
<classpath>
365
<pathelement path="${bin.generator}"/>
366
<pathelement path="${test.resources}"/>
367
</classpath>
368
</java>
369
</target>
370
371
<target name="urlValidator" description="Runs the URL validator tool" depends="-compile-generator">
372
<java
373
classname="org.lwjgl.generator.util.URLValidator"
374
fork="true"
375
>
376
<classpath>
377
<pathelement path="${bin.generator}"/>
378
<pathelement path="${test.resources}"/>
379
</classpath>
380
<arg line="${args}" if:set="args"/>
381
</java>
382
</target>
383
384
<target name="generate" description="Runs the Generator" depends="init">
385
<local name="has-compiled-templates"/>
386
<available file="${bin.templates}/META-INF" type="dir" property="has-compiled-templates"/>
387
<fail unless="has-compiled-templates" message="Please invoke the compile-templates target first."/>
388
389
<local name="generated-uptodate"/>
390
<uptodate property="generated-uptodate" targetfile="${bin.generator}/generated-touch.txt">
391
<srcfiles dir="${config}" includes="build-bindings.xml"/>
392
<srcfiles dir="${bin.generator}" includes="touch.txt"/>
393
<srcfiles dir="${bin.templates}" includes="touch.txt"/>
394
</uptodate>
395
396
<forEachModule unless:set="generated-uptodate">
397
<local name="linkPath"/>
398
<property name="linkPath" location="${module.lwjgl}/${module}/src/generated" relative="true"/>
399
<mkdir-symlink dir="${linkPath}"/>
400
</forEachModule>
401
402
<java
403
classname="org.lwjgl.generator.GeneratorKt"
404
fork="true"
405
failonerror="true"
406
taskname="Generator"
407
unless:set="generated-uptodate"
408
>
409
<classpath>
410
<pathelement path="${bin.generator}"/>
411
<pathelement path="${bin.templates}"/>
412
<pathelement path="${kotlinc}/lib/kotlin-stdlib.jar"/>
413
</classpath>
414
415
<jvmarg line="${generator.bindings}"/>
416
<jvmarg line="-Dfile.encoding=UTF8 -Dline.separator=&#10;"/>
417
418
<arg value="${module.lwjgl}"/>
419
</java>
420
<touch file="${bin.generator}/generated-touch.txt" verbose="false" unless:set="generated-uptodate"/>
421
</target>
422
423
<macrodef name="compileBinding">
424
<attribute name="binding"/>
425
<element name="body" implicit="yes" optional="yes"/>
426
<sequential>
427
<!-- cleanup in case there was an earlier "release" failure -->
428
<delete dir="${module.lwjgl}/@{binding}/src/generated/java/META-INF" quiet="true"/>
429
430
<local name="hasMain"/>
431
<available file="${module.lwjgl}/@{binding}/src/main/java" type="dir" property="hasMain"/>
432
433
<mkdir dir="${bin.lwjgl}/@{binding}"/>
434
<lwjgl.javac destdir="${bin.lwjgl}/@{binding}" taskname="javac: @{binding}" if:true="${binding.@{binding}}">
435
<classpath>
436
<pathelement path="${bin.lwjgl}/core"/>
437
<pathelement path="${lib}/java/jsr305.jar"/>
438
</classpath>
439
440
<src>
441
<pathelement path="${module.lwjgl}/@{binding}/src/main/java" if:set="hasMain"/>
442
<pathelement path="${module.lwjgl}/@{binding}/src/generated/java"/>
443
</src>
444
<include name="**"/>
445
446
<body/>
447
</lwjgl.javac>
448
</sequential>
449
</macrodef>
450
451
<target name="compile" description="Compiles the Java source code" depends="generate">
452
<mkdir dir="${bin.lwjgl}/core"/>
453
454
<!-- cleanup in case there was an earlier "release" failure -->
455
<delete dir="${module.lwjgl}/core/src/generated/java/META-INF" quiet="true"/>
456
457
<lwjgl.javac destdir="${bin.lwjgl}/core" taskname="javac: core">
458
<classpath><pathelement path="${lib}/java/jsr305.jar"/></classpath>
459
<src>
460
<pathelement path="${module.lwjgl}/core/src/main/java/"/>
461
<pathelement path="${module.lwjgl}/core/src/generated/java/"/>
462
</src>
463
<include name="**"/>
464
</lwjgl.javac>
465
466
<mkdir dir="${bin.lwjgl}/core/META-INF/versions/9" if:set="jdk9"/>
467
<mkdir dir="${bin.lwjgl}/core/META-INF/versions/10" if:set="jdk10"/>
468
<mkdir dir="${bin.lwjgl}/core/META-INF/versions/16" if:set="jdk16"/>
469
<delete file="${bin.lwjgl}/core/META-INF/versions/9/module-info.class" quiet="true" if:set="jdk9"/>
470
<lwjgl.javac9 destdir="${bin.lwjgl}/core/META-INF/versions/9" taskname="javac: Core - Java 9" if:set="jdk9">
471
<classpath>
472
<pathelement path="${bin.lwjgl}/core"/>
473
<pathelement path="${lib}/java/jsr305.jar"/>
474
</classpath>
475
<src>
476
<pathelement path="${module.lwjgl}/core/src/main/java9"/>
477
</src>
478
<include name="**"/>
479
</lwjgl.javac9>
480
<lwjgl.javac10 destdir="${bin.lwjgl}/core/META-INF/versions/10" taskname="javac: Core - Java 10" if:set="jdk10">
481
<classpath>
482
<pathelement path="${bin.lwjgl}/core"/>
483
</classpath>
484
<src>
485
<pathelement path="${module.lwjgl}/core/src/main/java10"/>
486
</src>
487
<include name="**"/>
488
</lwjgl.javac10>
489
<lwjgl.javac16 destdir="${bin.lwjgl}/core/META-INF/versions/16" taskname="javac: Core - Java 16" if:set="jdk16">
490
<classpath>
491
<pathelement path="${bin.lwjgl}/core"/>
492
</classpath>
493
<src>
494
<pathelement path="${module.lwjgl}/core/src/main/java16"/>
495
</src>
496
<include name="**"/>
497
</lwjgl.javac16>
498
499
<parallel threadsPerProcessor="1">
500
<compileBinding binding="assimp"/>
501
<compileBinding binding="bgfx"/>
502
<compileBinding binding="cuda"/>
503
<compileBinding binding="egl"/>
504
<compileBinding binding="fmod"/>
505
<compileBinding binding="freetype"/>
506
<compileBinding binding="harfbuzz"/>
507
<compileBinding binding="hwloc"/>
508
<compileBinding binding="jawt"/>
509
<compileBinding binding="jemalloc"/>
510
<compileBinding binding="libdivide"/>
511
<compileBinding binding="llvm"/>
512
<compileBinding binding="lmdb"/>
513
<compileBinding binding="lz4"/>
514
<compileBinding binding="meow"/>
515
<compileBinding binding="meshoptimizer"/>
516
<compileBinding binding="nanovg"/>
517
<compileBinding binding="nfd"/>
518
<compileBinding binding="nuklear"/>
519
<compileBinding binding="odbc"/>
520
<compileBinding binding="openal"/>
521
<compileBinding binding="opencl"/>
522
<compileBinding binding="opengles"/>
523
<compileBinding binding="openvr"/>
524
<compileBinding binding="opus"/>
525
<compileBinding binding="par"/>
526
<compileBinding binding="remotery"/>
527
<compileBinding binding="rpmalloc"/>
528
<compileBinding binding="shaderc"/>
529
<compileBinding binding="spvc"/>
530
<compileBinding binding="sse"/>
531
<compileBinding binding="stb"/>
532
<compileBinding binding="tinyexr"/>
533
<compileBinding binding="tinyfd"/>
534
<compileBinding binding="tootle"/>
535
<compileBinding binding="vulkan"/>
536
<compileBinding binding="xxhash"/>
537
<compileBinding binding="yoga"/>
538
<compileBinding binding="zstd"/>
539
</parallel>
540
541
<parallel threadsPerProcessor="1">
542
<compileBinding binding="opengl">
543
<classpath><pathelement path="${bin.lwjgl}/opencl"/></classpath>
544
</compileBinding>
545
<compileBinding binding="ovr">
546
<classpath><pathelement path="${bin.lwjgl}/vulkan"/></classpath>
547
</compileBinding>
548
<compileBinding binding="vma">
549
<classpath><pathelement path="${bin.lwjgl}/vulkan"/></classpath>
550
</compileBinding>
551
</parallel>
552
553
<compileBinding binding="glfw">
554
<classpath>
555
<pathelement path="${bin.lwjgl}/egl"/>
556
<pathelement path="${bin.lwjgl}/opengl"/>
557
<pathelement path="${bin.lwjgl}/opengles"/>
558
<pathelement path="${bin.lwjgl}/vulkan"/>
559
</classpath>
560
<exclude name="org/lwjgl/glfw/GLFWNativeEGL.java" unless:true="${binding.egl}"/>
561
<exclude name="org/lwjgl/glfw/GLFWNativeGLX.java" unless:true="${binding.opengl}"/>
562
<exclude name="org/lwjgl/glfw/GLFWNativeNSGL.java" unless:true="${binding.opengl}"/>
563
<exclude name="org/lwjgl/glfw/GLFWNativeWGL.java" unless:true="${binding.opengl}"/>
564
<exclude name="org/lwjgl/glfw/GLFWVulkan.java" unless:true="${binding.vulkan}"/>
565
</compileBinding>
566
567
<compileBinding binding="lwjglx">
568
<classpath>
569
<pathelement path="${bin.lwjgl}/glfw"/>
570
<pathelement path="${bin.lwjgl}/openal"/>
571
<pathelement path="${bin.lwjgl}/opengl"/>
572
</classpath>
573
</compileBinding>
574
575
<compileBinding binding="openxr">
576
<classpath>
577
<pathelement path="${bin.lwjgl}/egl"/>
578
<pathelement path="${bin.lwjgl}/opengl"/>
579
<pathelement path="${bin.lwjgl}/vulkan"/>
580
</classpath>
581
</compileBinding>
582
</target>
583
584
<target name="compile-native" description="Compiles the native source code" depends="init, compile">
585
<mkdir dir="${bin.native}"/>
586
<antcall target="compile-native-platform"/>
587
</target>
588
589
<target name="-compile-extract">
590
<local name="extract-uptodate"/>
591
<uptodate targetfile="${bin.extract}/touch.txt" property="extract-uptodate">
592
<srcfiles dir="${src.extract}/kotlin" includes="**"/>
593
</uptodate>
594
595
<echo message="Compiling LWJGL Template Extraction Tool..." level="info" taskname="extract compilation" unless:set="extract-uptodate"/>
596
<mkdir dir="${bin.extract}"/>
597
<kotlinc moduleName="extract" output="${bin.extract}" printVersion="true" unless:set="extract-uptodate">
598
<classpath>
599
<pathelement path="${bin.lwjgl}/core/META-INF/versions/9" if:set="core.java9"/>
600
<pathelement path="${bin.lwjgl}/core/META-INF/versions/10" if:set="core.java10"/>
601
<pathelement path="${bin.lwjgl}/core/META-INF/versions/16" if:set="core.java16"/>
602
<pathelement path="${module.classpath}"/>
603
<pathelement path="${kotlinc}/lib/kotlin-stdlib.jar"/>
604
<pathelement path="${kotlinc}/lib/kotlin-stdlib-jdk7.jar"/>
605
</classpath>
606
607
<compilerarg line="-jvm-target 1.8"/>
608
<compilerarg value="-Xno-call-assertions"/>
609
<compilerarg value="-Xno-param-assertions"/>
610
<compilerarg value="-Xreport-perf"/>
611
<compilerarg value="-progressive"/>
612
<compilerarg value="-Xuse-experimental=kotlin.Experimental"/>
613
<compilerarg value="-Xuse-experimental=kotlin.contracts.ExperimentalContracts"/>
614
615
<src path="${src.extract}/kotlin"/>
616
</kotlinc>
617
<touch file="${bin.extract}/touch.txt" unless:set="extract-uptodate"/>
618
</target>
619
620
<target name="touch-extract" description="Used for touching from an IDE">
621
<touch file="${bin.extract}/touch.txt"/>
622
</target>
623
624
<target name="extract" description="Runs the LWJGL Template Extraction tool" depends="compile-native, -compile-extract">
625
<java classname="org.lwjgl.extract.MainKt" fork="true" spawn="true" taskname="LWJGL Template Extraction Tool">
626
<classpath>
627
<pathelement path="${bin.lwjgl}/core/META-INF/versions/9" if:set="core.java9"/>
628
<pathelement path="${bin.lwjgl}/core/META-INF/versions/10" if:set="core.java10"/>
629
<pathelement path="${bin.lwjgl}/core/META-INF/versions/16" if:set="core.java16"/>
630
<pathelement path="${module.classpath}"/>
631
<pathelement path="${bin.extract}"/>
632
<pathelement path="${test.resources}"/>
633
<pathelement path="${kotlinc}/lib/kotlin-stdlib.jar"/>
634
<pathelement path="${kotlinc}/lib/kotlin-stdlib-jdk7.jar"/>
635
<pathelement path="${lib}/native"/>
636
</classpath>
637
638
<jvmarg line="${jvmargs}" if:set="jvmargs"/>
639
<arg line="${args}" if:set="args"/>
640
</java>
641
</target>
642
643
<target name="compile-tests" description="Compiles the LWJGL test suite" depends="compile">
644
<mkdir dir="${bin.test}"/>
645
<forEachModule>
646
<local name="hasTests"/>
647
<available property="hasTests" file="${module.lwjgl}/${module}/src/test/java" type="dir"/>
648
649
<lwjgl.javac
650
destdir="${bin.test}"
651
srcdir="${module.lwjgl}/${module}/src/test/java"
652
includes="**"
653
taskname="javac: ${module} tests"
654
if:set="hasTests"
655
>
656
<classpath>
657
<pathelement path="${bin.lwjgl}/core"/>
658
<pathelement path="${bin.lwjgl}/${module}"/>
659
<pathelement path="${lib}/java/jsr305.jar"/>
660
<pathelement path="${lib}/java/testng.jar"/>
661
</classpath>
662
</lwjgl.javac>
663
</forEachModule>
664
665
<local name="test.bgfx"/>
666
<condition property="test.bgfx">
667
<and>
668
<istrue value="${binding.bgfx}"/>
669
<istrue value="${binding.glfw}"/>
670
</and>
671
</condition>
672
673
<local name="test.egl"/>
674
<condition property="test.egl">
675
<and>
676
<istrue value="${binding.egl}"/>
677
<istrue value="${binding.glfw}"/>
678
<istrue value="${binding.opengles}"/>
679
</and>
680
</condition>
681
682
<local name="test.glfw"/>
683
<condition property="test.glfw">
684
<and>
685
<istrue value="${binding.glfw}"/>
686
<istrue value="${binding.opengl}"/>
687
</and>
688
</condition>
689
690
<local name="test.jawt"/>
691
<condition property="test.jawt">
692
<and>
693
<istrue value="${binding.jawt}"/>
694
<istrue value="${binding.opengl}"/>
695
</and>
696
</condition>
697
698
<local name="test.nanovg"/>
699
<condition property="test.nanovg">
700
<and>
701
<istrue value="${test.glfw}"/>
702
<istrue value="${binding.nanovg}"/>
703
</and>
704
</condition>
705
706
<local name="test.nuklear"/>
707
<condition property="test.nuklear">
708
<and>
709
<istrue value="${test.glfw}"/>
710
<istrue value="${binding.nuklear}"/>
711
</and>
712
</condition>
713
714
<local name="test.nfd"/>
715
<condition property="test.nfd">
716
<and>
717
<istrue value="${test.glfw}"/>
718
<istrue value="${binding.nfd}"/>
719
</and>
720
</condition>
721
722
<local name="test.openal"/>
723
<condition property="test.openal">
724
<and>
725
<istrue value="${binding.openal}"/>
726
<istrue value="${binding.stb}"/>
727
</and>
728
</condition>
729
730
<local name="test.opencl"/>
731
<condition property="test.opencl">
732
<and>
733
<istrue value="${binding.glfw}"/>
734
<istrue value="${binding.opencl}"/>
735
</and>
736
</condition>
737
738
<local name="test.openxr"/>
739
<condition property="test.openxr">
740
<and>
741
<istrue value="${binding.glfw}"/>
742
<istrue value="${binding.opengl}"/>
743
<istrue value="${binding.vulkan}"/>
744
</and>
745
</condition>
746
747
<local name="test.par"/>
748
<condition property="test.par">
749
<and>
750
<istrue value="${binding.glfw}"/>
751
<istrue value="${binding.nfd}"/>
752
<istrue value="${binding.par}"/>
753
<istrue value="${binding.stb}"/>
754
</and>
755
</condition>
756
757
<local name="test.stb"/>
758
<condition property="test.stb">
759
<and>
760
<istrue value="${binding.stb}"/>
761
<istrue value="${binding.glfw}"/>
762
</and>
763
</condition>
764
765
<local name="test.tinyexr"/>
766
<condition property="test.tinyexr">
767
<and>
768
<istrue value="${test.glfw}"/>
769
<istrue value="${binding.tinyexr}"/>
770
<istrue value="${binding.tinyfd}"/>
771
</and>
772
</condition>
773
774
<local name="test.tinyfd"/>
775
<condition property="test.tinyfd">
776
<and>
777
<istrue value="${test.glfw}"/>
778
<istrue value="${binding.tinyfd}"/>
779
</and>
780
</condition>
781
782
<local name="test.tootle"/>
783
<condition property="test.tootle">
784
<and>
785
<istrue value="${binding.assimp}"/>
786
<istrue value="${binding.par}"/>
787
<istrue value="${binding.tootle}"/>
788
</and>
789
</condition>
790
791
<local name="test.vulkan"/>
792
<condition property="test.vulkan">
793
<and>
794
<istrue value="${binding.glfw}"/>
795
<istrue value="${binding.vulkan}"/>
796
</and>
797
</condition>
798
799
<local name="test.yoga"/>
800
<condition property="test.yoga">
801
<and>
802
<istrue value="${test.glfw}"/>
803
<istrue value="${binding.stb}"/>
804
<istrue value="${binding.yoga}"/>
805
</and>
806
</condition>
807
808
<local name="test.hashing"/>
809
<condition property="test.hashing">
810
<and>
811
<istrue value="${binding.xxhash}"/>
812
<istrue value="${binding.meow}"/>
813
</and>
814
</condition>
815
816
<mkdir dir="${bin.samples}"/>
817
<lwjgl.javac srcdir="modules/samples/src/test/java" destdir="${bin.samples}" taskname="javac: Samples">
818
<classpath>
819
<pathelement path="${module.classpath}"/>
820
<pathelement path="${bin.test}"/>
821
<pathelement path="${lib}/java/jsr305.jar"/>
822
<pathelement path="${lib}/java/jmh-core.jar"/>
823
<pathelement path="${lib}/java/jmh-generator-annprocess.jar"/>
824
<pathelement path="${lib}/java/joml.jar"/>
825
<pathelement path="${lib}/java/testng.jar"/>
826
</classpath>
827
828
<!-- Demos -->
829
<include name="org/lwjgl/demo/assimp/**" if:true="${binding.assimp}"/>
830
<include name="org/lwjgl/demo/bgfx/**" if:set="test.bgfx"/>
831
<include name="org/lwjgl/demo/cuda/**" if:true="${binding.cuda}"/>
832
<include name="org/lwjgl/demo/egl/**" if:set="test.egl"/>
833
<include name="org/lwjgl/demo/glfw/**" if:set="test.glfw"/>
834
<include name="org/lwjgl/demo/llvm/**" if:true="${binding.llvm}"/>
835
<include name="org/lwjgl/demo/nanovg/**" if:set="test.nanovg"/>
836
<include name="org/lwjgl/demo/nuklear/**" if:set="test.nuklear"/>
837
838
<include name="org/lwjgl/demo/openal/**" if:true="${binding.openal}"/>
839
<exclude name="org/lwjgl/demo/openal/ALCDemo.java" unless:set="test.openal"/>
840
<exclude name="org/lwjgl/demo/openal/EFXTest.java" unless:set="test.openal"/>
841
<exclude name="org/lwjgl/demo/openal/HRTFDemo.java" unless:set="test.openal"/>
842
843
<include name="org/lwjgl/demo/opencl/**" if:set="test.opencl"/>
844
<include name="org/lwjgl/demo/opencl/CLDemo.java" if:true="${binding.opencl}"/>
845
846
<include name="org/lwjgl/demo/opengl/**" if:true="${binding.opengl}"/>
847
848
<include name="org/lwjgl/demo/openvr/**" if:true="${binding.openvr}"/>
849
<include name="org/lwjgl/demo/openxr/**" if:set="test.openxr"/>
850
<include name="org/lwjgl/demo/ovr/**" if:true="${binding.ovr}"/>
851
<include name="org/lwjgl/demo/stb/**" if:set="test.stb"/>
852
853
<include name="org/lwjgl/demo/system/jawt/**" if:set="test.jawt"/>
854
<include name="org/lwjgl/demo/system/linux/liburing/**" if:set="platform.linux"/>
855
856
<include name="org/lwjgl/demo/util/*.java"/>
857
<include name="org/lwjgl/demo/util/freetype/**" if:true="${binding.freetype}"/>
858
<include name="org/lwjgl/demo/util/harfbuzz/**" if:true="${binding.harfbuzz}"/>
859
<include name="org/lwjgl/demo/util/hwloc/**" if:true="${binding.hwloc}"/>
860
861
<include name="org/lwjgl/demo/util/lmdb/**" if:true="${binding.lmdb}"/>
862
<include name="org/lwjgl/demo/util/lz4/**" if:true="${binding.lz4}"/>
863
<include name="org/lwjgl/demo/util/meow/**" if:true="${binding.meow}"/>
864
<include name="org/lwjgl/demo/util/meshoptimizer/**" if:true="${binding.meshoptimizer}"/>
865
<include name="org/lwjgl/demo/util/nfd/**" if:set="test.nfd"/>
866
<include name="org/lwjgl/demo/util/par/**" if:set="test.par"/>
867
<include name="org/lwjgl/demo/util/remotery/**" if:true="${binding.remotery}"/>
868
<include name="org/lwjgl/demo/util/tinyexr/**" if:set="test.tinyexr"/>
869
<include name="org/lwjgl/demo/util/tinyfd/**" if:set="test.tinyfd"/>
870
<include name="org/lwjgl/demo/util/tootle/**" if:set="test.tootle"/>
871
<include name="org/lwjgl/demo/util/xxhash/**" if:true="${binding.xxhash}"/>
872
<include name="org/lwjgl/demo/util/yoga/**" if:set="test.yoga"/>
873
<include name="org/lwjgl/demo/util/zstd/**" if:true="${binding.zstd}"/>
874
875
<include name="org/lwjgl/demo/vulkan/**" if:set="test.vulkan"/>
876
877
<!-- Benchmarks -->
878
<include name="org/lwjgl/jmh/**"/>
879
<exclude name="org/lwjgl/jmh/Hashing*" unless:true="${test.hashing}"/>
880
<exclude name="org/lwjgl/jmh/VarHandle*" unless:set="jdk9"/>
881
</lwjgl.javac>
882
</target>
883
884
<target name="tests" description="Runs the LWJGL test suite" depends="compile-tests, compile-native">
885
<testng haltonfailure="true" outputDir="${bin.test.html}" taskname="Tests">
886
<classpath>
887
<pathelement path="${bin.lwjgl}/core/META-INF/versions/9" if:set="core.java9"/>
888
<pathelement path="${bin.lwjgl}/core/META-INF/versions/10" if:set="core.java10"/>
889
<pathelement path="${bin.lwjgl}/core/META-INF/versions/16" if:set="core.java16"/>
890
<pathelement path="${module.classpath}"/>
891
<pathelement path="${bin.test}"/>
892
<pathelement path="${lib}/java/jcommander.jar"/>
893
<pathelement path="${lib}/java/jquery.jar"/>
894
<pathelement path="${lib}/java/slf4j-api.jar"/>
895
<pathelement path="${lib}/java/slf4j-jdk14.jar"/>
896
<pathelement path="${lib}/native"/>
897
</classpath>
898
899
<!--<jvmarg value="-Xcheck:jni"/>--> <!-- SIMD fails with this (see -XX:+RestoreMXCSROnJNICall) -->
900
<jvmarg value="-server"/>
901
<jvmarg value="-ea"/>
902
<jvmarg value="-Dorg.lwjgl.util.Debug=true"/>
903
<jvmarg value="-Dorg.lwjgl.util.DebugAllocator=true"/>
904
<jvmarg value="-XstartOnFirstThread" if:set="platform.macos"/>
905
<jvmarg value="-Xss256k" unless:set="build.arch.arm"/> <!-- for StackTest::testSOE -->
906
<jvmarg line="${jvmargs}" if:set="jvmargs"/>
907
908
<xmlfileset dir="${config}" includes="tests.xml,tests_${platform}.xml"/>
909
</testng>
910
</target>
911
912
<target name="demo" description="Runs an LWJGL demo" depends="compile-tests, compile-native, -update-assets">
913
<fail message="Please use -Dclass=&lt;class&gt; to specify the demo main class to run." unless="class"/>
914
915
<local name="spawn"/>
916
<condition property="spawn" value="true" else="false">
917
<isset property="jitwatch"/>
918
</condition>
919
920
<local name="failonerror"/>
921
<condition property="failonerror" value="false" else="true">
922
<istrue value="${spawn}"/>
923
</condition>
924
925
<java classname="${class}" fork="true" failonerror="${failonerror}" spawn="${spawn}" taskname="Demo">
926
<classpath>
927
<pathelement path="${bin.lwjgl}/core/META-INF/versions/9" if:set="core.java9"/>
928
<pathelement path="${bin.lwjgl}/core/META-INF/versions/10" if:set="core.java10"/>
929
<pathelement path="${bin.lwjgl}/core/META-INF/versions/16" if:set="core.java16"/>
930
<pathelement path="${module.classpath}"/>
931
<pathelement path="${bin.test}"/>
932
<pathelement path="${bin.samples}"/>
933
<pathelement path="${test.resources}"/>
934
<pathelement path="${lib}/java/testng.jar"/>
935
<pathelement path="${lib}/java/joml.jar"/>
936
<pathelement path="${lib}/java/jmh-core.jar"/>
937
<pathelement path="${lib}/java/commons-math3.jar"/>
938
<pathelement path="${lib}/java/jopt-simple.jar"/>
939
<pathelement path="${lib}/native"/>
940
</classpath>
941
942
<jvmarg value="-server"/>
943
<jvmarg value="-XstartOnFirstThread" if:set="platform.macos"/>
944
<!--<jvmarg value="-Xcheck:jni"/>-->
945
946
<jvmarg line="-XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation" if:set="jitwatch"/>
947
<jvmarg line="-XX:+PrintAssembly -XX:PrintAssemblyOptions=intel -XX:-TieredCompilation -XX:-UseCompressedOops" if:set="jitwatch"/>
948
<jvmarg line="-XX:LogFile=${jitwatch}" if:set="jitwatch"/>
949
950
<!--<jvmarg line="-agentlib:native-image-agent=config-output-dir=META-INF/native-image"/>-->
951
952
<jvmarg line="${jvmargs}" if:set="jvmargs"/>
953
954
<arg line="${args}" if:set="args"/>
955
</java>
956
</target>
957
958
<target name="-build-version" depends="compile">
959
<!-- -Dbuild.version is manually specified only when building a release -->
960
<condition property="build.release" value="true" else="false">
961
<isset property="build.version"/>
962
</condition>
963
964
<java classname="org.lwjgl.Version" fork="true" failonerror="true" outputproperty="build.version" errorproperty="build.version.plain" unless:set="build.version">
965
<classpath>
966
<pathelement path="${bin.lwjgl}/core"/>
967
<pathelement path="${lib}/native"/>
968
</classpath>
969
</java>
970
</target>
971
972
<target name="-check-AWS-credentials">
973
<fail message="AWS credentials not configured.">
974
<condition>
975
<not>
976
<or>
977
<and>
978
<isset property="env.AWS_ACCESS_KEY_ID"/>
979
<isset property="env.AWS_SECRET_ACCESS_KEY"/>
980
</and>
981
<isset property="env.AWS_CONFIG_FILE"/>
982
</or>
983
</not>
984
</condition>
985
</fail>
986
</target>
987
988
<!-- Includes all modules for javadoc.lwjgl.org -->
989
<target name="javadoc" description="Generates the LWJGL JavaDoc" depends="-compile-generator,-build-version">
990
<echo message="It is recommended to generate JavaDoc on JDK 10 or higher." unless:set="jdk10" taskname="Warning"/>
991
<delete dir="${bin.javadoc}"/>
992
993
<path id="javadoc.sources">
994
<pathelement path="${module.javadocsourcepath}"/>
995
</path>
996
997
<javadoc
998
destdir="${bin.javadoc}"
999
sourcepathref="javadoc.sources"
1000
source="9"
1001
windowtitle="LWJGL ${build.version}"
1002
encoding="UTF-8"
1003
docencoding="UTF-8"
1004
charset="UTF-8"
1005
useexternalfile="true"
1006
nohelp="true"
1007
notree="true"
1008
public="true"
1009
Splitindex="true"
1010
failonerror="true"
1011
verbose="true"
1012
>
1013
<doctitle><![CDATA[<h1>Lightweight Java Game Library</h1>]]></doctitle>
1014
<bottom><![CDATA[<i>Copyright LWJGL. All Rights Reserved. <a href="https://www.lwjgl.org/license">License terms</a>.</i>]]></bottom>
1015
1016
<classpath>
1017
<pathelement path="${lib}/java/jsr305.jar"/>
1018
</classpath>
1019
1020
<arg value="-XDignore.symbol.file"/> <!-- Suppresses internal API (e.g. Unsafe) usage warnings -->
1021
1022
<arg line="-Xdoclint:none" if:set="nodoclint"/>
1023
<arg line="-Xdoclint:html,reference,syntax" unless:set="nodoclint"/>
1024
<arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
1025
<arg line="-notimestamp"/>
1026
<arg value="-html5" if:set="jdk9"/>
1027
<arg line="-J-Dfile.encoding=UTF8 -J-Dline.separator=&#10;"/>
1028
<arg line="--add-exports jdk.javadoc/com.sun.tools.doclets=ALL-UNNAMED" if:set="jdk9"/>
1029
</javadoc>
1030
<get-quiet name="favicon" url="https://www.lwjgl.org/favicon.ico" dest="${bin.javadoc}"/>
1031
1032
<java classname="org.lwjgl.system.JavadocPostProcess" failonerror="true">
1033
<classpath path="${bin.generator}"/>
1034
1035
<arg value="${bin.javadoc}"/>
1036
</java>
1037
</target>
1038
1039
<target name="upload-native" description="Uploads native build artifacts to build.lwjgl.org" depends="compile-native,-check-AWS-credentials">
1040
<local name="revision"/>
1041
<property name="revision" value="liblwjgl.so.git" if:set="platform.linux"/>
1042
<property name="revision" value="liblwjgl.dylib.git" if:set="platform.macos"/>
1043
<property name="revision" value="lwjgl.dll.git" if:set="platform.windows"/>
1044
1045
<exec executable="git" failonerror="true" output="${lib.native}/org/lwjgl/${revision}" taskname="Git revision">
1046
<arg value="log"/>
1047
<arg value="--first-parent"/>
1048
<arg value="--pretty=format:%H"/>
1049
<arg value="HEAD~2..HEAD~1"/> <!-- Skip the CI commit -->
1050
</exec>
1051
1052
<apply executable="aws" failonerror="true" relative="true" taskname="S3 upload">
1053
<arg value="s3"/>
1054
<arg value="cp"/>
1055
1056
<srcfile/>
1057
1058
<arg value="s3://lwjgl-build/${build.type}/${platform.remote}/${build.arch}/"/>
1059
<arg line='--cache-control "public, must-revalidate, proxy-revalidate, max-age=0"'/>
1060
1061
<fileset dir=".">
1062
<and>
1063
<filename name="${lib.native}/**"/>
1064
<filename regex="\${file.separator}(?:lib)?lwjgl.*?\.(?:dll|dylib|so)(?:\.git)?$"/>
1065
</and>
1066
</fileset>
1067
</apply>
1068
</target>
1069
1070
<macrodef name="get-release">
1071
<attribute name="platform"/>
1072
<attribute name="arch"/>
1073
<attribute name="file"/>
1074
1075
<sequential>
1076
<!-- Skip .git files in offline mode -->
1077
<local name="skip.git"/>
1078
<condition property="skip.git">
1079
<and>
1080
<istrue value="${build.offline}"/>
1081
<matches string="@{file}" pattern="^.+\.git$"/>
1082
</and>
1083
</condition>
1084
1085
<sequential unless:set="skip.git">
1086
<local name="destination"/>
1087
<condition property="destination"
1088
value="${release}/${module}/META-INF/@{platform}/@{arch}/${module.path}"
1089
else="${release}/${module}/native/@{platform}/@{arch}/${module.path}"
1090
>
1091
<matches string="@{file}" pattern="^.+\.git$"/>
1092
</condition>
1093
1094
<!-- Online build -->
1095
<sequential unless:true="${build.offline}">
1096
<quiet>
1097
<mkdir dir="${destination}"/>
1098
</quiet>
1099
<get
1100
src="https://build.lwjgl.org/${build.type}/${platform.@{platform}.remote}/@{arch}/@{file}"
1101
dest="${destination}"
1102
usetimestamp="true"
1103
/>
1104
</sequential>
1105
1106
<!-- Offline build -->
1107
<sequential if:true="${build.offline}">
1108
<local name="source"/>
1109
<property name="source" value="${lib}/native/@{platform}/@{arch}/${module.path}/@{file}"/>
1110
1111
<local name="available"/>
1112
<available file="${source}" property="available"/>
1113
1114
<echo message="Missing offline artifact: ${source}" level="warning" unless:set="available"/>
1115
<quiet if:set="available">
1116
<mkdir dir="${destination}"/>
1117
<copy file="${source}" todir="${destination}"/>
1118
</quiet>
1119
</sequential>
1120
</sequential>
1121
</sequential>
1122
</macrodef>
1123
1124
<macrodef name="lwjgl-jar">
1125
<attribute name="destfile"/>
1126
<attribute name="title"/>
1127
<attribute name="platform" default=""/>
1128
<element name="content" optional="true" implicit="true"/>
1129
<sequential>
1130
<local name="platform-attrib"/>
1131
<condition property="platform-attrib" value="true" else="false"><not><length string="@{platform}" length="0"/></not></condition>
1132
1133
<jar destfile="@{destfile}" level="9" index="true" indexmetainf="true" whenmanifestonly="skip">
1134
<manifest>
1135
<attribute name="Specification-Title" value="Lightweight Java Game Library - @{title}"/>
1136
<attribute name="Specification-Version" value="${build.version}"/>
1137
<attribute name="Specification-Vendor" value="lwjgl.org"/>
1138
<attribute name="Implementation-Title" value="${module}"/>
1139
<attribute name="Implementation-Version" value="${revision}"/>
1140
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
1141
<attribute name="LWJGL-Platform" value="@{platform}" if:true="${platform-attrib}"/>
1142
<attribute name="Multi-Release" value="true" if:set="jdk9"/>
1143
</manifest>
1144
<content/>
1145
</jar>
1146
</sequential>
1147
</macrodef>
1148
1149
<macrodef name="natives-jar">
1150
<attribute name="name"/>
1151
<attribute name="title"/>
1152
<attribute name="platform"/>
1153
<attribute name="path"/>
1154
<attribute name="type"/>
1155
<element name="content" optional="true" implicit="true"/>
1156
<sequential>
1157
<local name="platform.skip"/>
1158
<condition property="platform.skip">
1159
<resourcecount when="eq" count="0">
1160
<fileset dir="${release}/${module}" includes="native/@{path}/${module.path}/*.@{type}"/>
1161
</resourcecount>
1162
</condition>
1163
1164
<lwjgl-jar destfile="${release}/${module}/${module}-natives-@{platform}.jar" platform="@{path}" title="@{title}" unless:set="platform.skip">
1165
<fileset dir="${release}/${module}" includes="META-INF/@{path}/${module.path}/*.@{type}*"/>
1166
<fileset dir="${release}/${module}/native" includes="@{path}/${module.path}/*.@{type}*"/>
1167
<fileset dir="${release}/${module}/native/@{path}" includes="META-INF/versions/9/module-info.class" if:set="jdk9"/>
1168
<content/>
1169
</lwjgl-jar>
1170
</sequential>
1171
</macrodef>
1172
1173
<macrodef name="release-natives">
1174
<attribute name="name"/>
1175
<attribute name="title"/>
1176
<attribute name="native-library"/>
1177
<element name="content" optional="true"/>
1178
<element name="linux-content" optional="true"/>
1179
<element name="linux-arm64-content" optional="true"/>
1180
<element name="linux-arm32-content" optional="true"/>
1181
<element name="macos-content" optional="true"/>
1182
<element name="macos-arm64-content" optional="true"/>
1183
<element name="windows-content" optional="true"/>
1184
<element name="windows-x86-content" optional="true"/>
1185
<element name="windows-arm64-content" optional="true"/>
1186
<sequential>
1187
<local name="auto-natives"/>
1188
<condition property="auto-natives">
1189
<not>
1190
<length string="@{native-library}" length="0"/>
1191
</not>
1192
</condition>
1193
1194
<local name="git-revision"/>
1195
<condition property="git-revision" if:set="auto-natives">
1196
<not>
1197
<matches pattern="^lwjgl_.+" string="@{native-library}"/>
1198
</not>
1199
</condition>
1200
1201
<parallel threadsPerProcessor="4" failonany="true">
1202
<get-release platform="linux" arch="x64" file="lib@{native-library}.so" if:set="auto-natives"/>
1203
<get-release platform="linux" arch="x64" file="lib@{native-library}.so.git" if:set="git-revision"/>
1204
1205
<get-release platform="linux" arch="arm64" file="lib@{native-library}.so" if:set="auto-natives"/>
1206
<get-release platform="linux" arch="arm64" file="lib@{native-library}.so.git" if:set="git-revision"/>
1207
1208
<get-release platform="linux" arch="arm32" file="lib@{native-library}.so" if:set="auto-natives"/>
1209
<get-release platform="linux" arch="arm32" file="lib@{native-library}.so.git" if:set="git-revision"/>
1210
1211
<get-release platform="macos" arch="x64" file="lib@{native-library}.dylib" if:set="auto-natives"/>
1212
<get-release platform="macos" arch="x64" file="lib@{native-library}.dylib.git" if:set="git-revision"/>
1213
1214
<get-release platform="macos" arch="arm64" file="lib@{native-library}.dylib" if:set="auto-natives"/>
1215
<get-release platform="macos" arch="arm64" file="lib@{native-library}.dylib.git" if:set="git-revision"/>
1216
1217
<get-release platform="windows" arch="x64" file="@{native-library}.dll" if:set="auto-natives"/>
1218
<get-release platform="windows" arch="x64" file="@{native-library}.dll.git" if:set="git-revision"/>
1219
1220
<get-release platform="windows" arch="x86" file="@{native-library}.dll" if:set="auto-natives"/>
1221
<get-release platform="windows" arch="x86" file="@{native-library}.dll.git" if:set="git-revision"/>
1222
1223
<get-release platform="windows" arch="arm64" file="@{native-library}.dll" if:set="auto-natives"/>
1224
<get-release platform="windows" arch="arm64" file="@{native-library}.dll.git" if:set="git-revision"/>
1225
1226
<content/>
1227
</parallel>
1228
1229
<local name="missing-natives"/>
1230
<condition property="missing-natives">
1231
<and>
1232
<istrue value="${build.offline}"/>
1233
<resourcecount when="eq" count="0">
1234
<fileset dir="${release}/${module}">
1235
<include name="native/**/*.dll"/>
1236
<include name="native/**/*.dylib"/>
1237
<include name="native/**/*.so"/>
1238
</fileset>
1239
</resourcecount>
1240
</and>
1241
</condition>
1242
1243
<sequential unless:set="missing-natives">
1244
<mkdir dir="${release}/${module}/META-INF"/>
1245
<checksum algorithm="SHA-1" fileext=".sha1" todir="${release}/${module}/META-INF">
1246
<fileset dir="${release}/${module}/native">
1247
<include name="**/*.dll"/>
1248
<include name="**/*.dylib"/>
1249
<include name="**/*.so"/>
1250
</fileset>
1251
</checksum>
1252
1253
<!-- Generate module-info classes -->
1254
<java
1255
classpath="bin/classes/generator"
1256
classname="org.lwjgl.generator.util.ModuleInfoGen"
1257
fork="true"
1258
failonerror="true"
1259
taskname="module-info-gen :: native :: ${module}"
1260
if:set="jdk9"
1261
>
1262
<jvmarg value="-Dmodule.name.source=${module.name}"/>
1263
<jvmarg value="-Dmodule.name.release=${module}"/>
1264
<jvmarg value="-Dmodule.version=${module.version}"/>
1265
</java>
1266
1267
<!-- Create native jar files -->
1268
<parallel threadsPerProcessor="1" failonany="true">
1269
<natives-jar name="@{name}" title="@{title}" platform="linux" path="linux/x64" type="so">
1270
<linux-content/>
1271
</natives-jar>
1272
<natives-jar name="@{name}" title="@{title}" platform="linux-arm64" path="linux/arm64" type="so">
1273
<linux-arm64-content/>
1274
</natives-jar>
1275
<natives-jar name="@{name}" title="@{title}" platform="linux-arm32" path="linux/arm32" type="so">
1276
<linux-arm32-content/>
1277
</natives-jar>
1278
<natives-jar name="@{name}" title="@{title}" platform="macos" path="macos/x64" type="dylib">
1279
<macos-content/>
1280
</natives-jar>
1281
<natives-jar name="@{name}" title="@{title}" platform="macos-arm64" path="macos/arm64" type="dylib">
1282
<macos-arm64-content/>
1283
</natives-jar>
1284
<natives-jar name="@{name}" title="@{title}" platform="windows" path="windows/x64" type="dll">
1285
<windows-content/>
1286
</natives-jar>
1287
<natives-jar name="@{name}" title="@{title}" platform="windows-x86" path="windows/x86" type="dll">
1288
<windows-x86-content/>
1289
</natives-jar>
1290
<natives-jar name="@{name}" title="@{title}" platform="windows-arm64" path="windows/arm64" type="dll">
1291
<windows-arm64-content/>
1292
</natives-jar>
1293
</parallel>
1294
</sequential>
1295
</sequential>
1296
</macrodef>
1297
1298
<macrodef name="release-module">
1299
<attribute name="name"/>
1300
<attribute name="title"/>
1301
<attribute name="native-library" default=""/>
1302
<element name="natives" optional="true"/>
1303
<element name="linux" optional="true"/>
1304
<element name="linux-arm64" optional="true"/>
1305
<element name="linux-arm32" optional="true"/>
1306
<element name="macos" optional="true"/>
1307
<element name="macos-arm64" optional="true"/>
1308
<element name="windows" optional="true"/>
1309
<element name="windows-x86" optional="true"/>
1310
<element name="windows-arm64" optional="true"/>
1311
<sequential>
1312
<local name="module.name"/>
1313
<property name="module.name" value="@{name}"/>
1314
1315
<local name="module"/>
1316
<condition property="module" value="lwjgl" else="lwjgl-@{name}">
1317
<equals arg1="@{name}" arg2="core"/>
1318
</condition>
1319
1320
<local name="module.path"/>
1321
<property name="module.path" value="${module.@{name}.path}"/>
1322
1323
<quiet>
1324
<mkdir dir="${release}/${module}"/>
1325
</quiet>
1326
1327
<!-- Bundle natives -->
1328
<release-natives name="@{name}" title="@{title}" native-library="@{native-library}" unless:set="java-only.binding.@{name}">
1329
<content><natives/></content>
1330
<linux-content><linux/></linux-content>
1331
<linux-arm64-content><linux-arm64/></linux-arm64-content>
1332
<linux-arm32-content><linux-arm32/></linux-arm32-content>
1333
<macos-content><macos/></macos-content>
1334
<macos-arm64-content><macos-arm64/></macos-arm64-content>
1335
<windows-content><windows/></windows-content>
1336
<windows-x86-content><windows-x86/></windows-x86-content>
1337
<windows-arm64-content><windows-arm64/></windows-arm64-content>
1338
</release-natives>
1339
1340
<!-- Bundle classes -->
1341
<lwjgl-jar destfile="${release}/${module}/${module}.jar" title="@{title}">
1342
<fileset dir="${release}/${module}" includes="META-INF/**/*.sha1" unless:set="java-only.binding.@{name}"/>
1343
<fileset dir="${bin.lwjgl}/@{name}" includes="**"/>
1344
</lwjgl-jar>
1345
<quiet>
1346
<delete dir="${release}/${module}/native" unless:set="java-only.binding.@{name}"/>
1347
<delete dir="${release}/${module}/META-INF" unless:set="java-only.binding.@{name}"/>
1348
</quiet>
1349
1350
<local name="hasMain"/>
1351
<available file="${module.lwjgl}/@{name}/src/main/java" type="dir" property="hasMain"/>
1352
<local name="hasMain.javadoc"/>
1353
<available file="${module.lwjgl}/@{name}/src/main/java/org/lwjgl" type="dir" property="hasMain"/>
1354
1355
<!-- Bundle javadoc -->
1356
<!-- This is slow, use -Djavadoc.skip=true for fast local builds -->
1357
<mkdir dir="${release}/${module}/javadoc" unless:set="javadoc.skip"/>
1358
<javadoc
1359
destdir="${release}/${module}/javadoc"
1360
source="9"
1361
windowtitle="LWJGL ${build.version} - @{title}"
1362
encoding="UTF-8"
1363
docencoding="UTF-8"
1364
charset="UTF-8"
1365
useexternalfile="true"
1366
nohelp="true"
1367
notree="true"
1368
public="true"
1369
failonerror="true"
1370
unless:set="javadoc.skip"
1371
>
1372
<doctitle><![CDATA[<h1>LWJGL - @{title}</h1>]]></doctitle>
1373
<bottom><![CDATA[<i>Copyright LWJGL. All Rights Reserved. <a href="https://www.lwjgl.org/license">License terms</a>.</i>]]></bottom>
1374
1375
<classpath>
1376
<pathelement path="${module.classpath}"/>
1377
<pathelement path="${lib}/java/jsr305.jar"/>
1378
</classpath>
1379
1380
<fileset dir="${module.lwjgl}/@{name}/src/main/java/org/lwjgl" includes="**" if:set="hasMain.javadoc"/>
1381
<fileset dir="${module.lwjgl}/@{name}/src/generated/java" includes="**"/>
1382
1383
<arg value="-XDignore.symbol.file"/> <!-- Suppresses internal API (e.g. Unsafe) usage warnings -->
1384
1385
<arg line="-Xdoclint:html,reference,syntax"/>
1386
<arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
1387
<arg line="-notimestamp"/>
1388
<arg value="-html5" if:set="jdk9"/>
1389
<arg line="-J-Dfile.encoding=UTF8 -J-Dline.separator=&#10;"/>
1390
<arg line="--add-exports jdk.javadoc/com.sun.tools.doclets=ALL-UNNAMED" if:set="jdk9"/>
1391
</javadoc>
1392
<get-quiet name="favicon" url="https://www.lwjgl.org/favicon.ico" dest="${release}/${module}/javadoc" unless:set="javadoc.skip"/>
1393
1394
<java classname="org.lwjgl.system.JavadocPostProcess" failonerror="true" unless:set="javadoc.skip">
1395
<classpath path="${bin.generator}"/>
1396
1397
<arg value="${release}/${module}/javadoc"/>
1398
</java>
1399
<zip destfile="${release}/${module}/${module}-javadoc.jar" basedir="${release}/${module}/javadoc" includes="**" level="9" unless:set="javadoc.skip"/>
1400
<delete dir="${release}/${module}/javadoc" unless:set="javadoc.skip"/>
1401
1402
<!-- Bundle source -->
1403
<quiet>
1404
<copy
1405
file ="${module.lwjgl}/@{name}/src/main/resources/module-info.java"
1406
todir="${module.lwjgl}/@{name}/src/generated/java/META-INF/versions/9"
1407
quiet="true"
1408
if:set="jdk9"
1409
/>
1410
</quiet>
1411
<jar destfile="${release}/${module}/${module}-sources.jar" level="9">
1412
<fileset dir="${module.lwjgl}/@{name}/src/main/java" includes="**" if:set="hasMain"/>
1413
<fileset dir="${module.lwjgl}/@{name}/src/generated/java" includes="**"/>
1414
</jar>
1415
<quiet>
1416
<delete dir="${module.lwjgl}/@{name}/src/generated/java/META-INF" quiet="true"/>
1417
</quiet>
1418
1419
<!-- Copy license -->
1420
<quiet>
1421
<copy todir="${release}/${module}">
1422
<fileset dir="${module.lwjgl}/@{name}" includes="*_license.txt"/>
1423
</copy>
1424
</quiet>
1425
</sequential>
1426
</macrodef>
1427
1428
<target name="-check-release-jdk">
1429
<fail message="The JAVA8_HOME environment variable is not set." if:set="jdk9">
1430
<condition>
1431
<not><isset property="env.JAVA8_HOME"/></not>
1432
</condition>
1433
</fail>
1434
1435
<local name="input"/>
1436
<input
1437
message="It is recommended to build LWJGL releases on JDK 16 or higher. Continue with current JDK?"
1438
validargs="y,n"
1439
defaultvalue="n"
1440
addproperty="input"
1441
unless:set="jdk16"
1442
/>
1443
<fail message="Cancelled" unless:set="jdk16">
1444
<condition>
1445
<equals arg1="n" arg2="${input}"/>
1446
</condition>
1447
</fail>
1448
</target>
1449
1450
<!-- Set the LWJGL_BUILD_OFFLINE=true environment variable for local builds. -->
1451
<target name="release" depends="-check-release-jdk,compile,-compile-generator,-build-version">
1452
<!--
1453
CUSTOM BUILD (LOCAL):
1454
* build.version="M.m.r SNAPSHOT"
1455
* build.revision=
1456
* revision="SNAPSHOT"
1457
* module.version="M.m.r-snapshot"
1458
SNAPSHOT BUILD (CI): -Dbuild.revision=R
1459
* build.version="M.m.r SNAPSHOT"
1460
* build.revision="R"
1461
* revision="build R"
1462
* module.version="M.m.r-snapshot+R"
1463
RELEASE BUILD (LOCAL): -Dbuild.version=M.m.r -Dbuild.revision=R
1464
* build.version="M.m.r"
1465
* build.revision="R"
1466
* revision="build R"
1467
* module.version="M.m.r+R"
1468
-->
1469
<local name="revision"/>
1470
<condition property="revision" value="build ${build.revision}" else="SNAPSHOT">
1471
<isset property="build.revision"/>
1472
</condition>
1473
1474
<property name="module.version" value="${build.version}+${build.revision}" if:true="${build.release}"/>
1475
<condition property="module.version" value="${build.version.plain}-snapshot+${build.revision}" else="${build.version.plain}-snapshot" unless:true="${build.release}">
1476
<isset property="build.revision"/>
1477
</condition>
1478
1479
<delete dir="${release}"/>
1480
<mkdir dir="${release}"/>
1481
1482
<!-- Copy license -->
1483
<quiet>
1484
<copy file="LICENSE.md" tofile="${release}/LICENSE"/>
1485
</quiet>
1486
1487
<!-- Generate build.txt -->
1488
<echo file="${release}/build.txt" if:set="build.revision">LWJGL ${build.version} ${revision}</echo>
1489
<echo file="${release}/build.txt" unless:set="build.revision">LWJGL ${build.version}</echo>
1490
1491
<!-- Generate module-info classes -->
1492
<java
1493
classpath="bin/classes/generator"
1494
classname="org.lwjgl.generator.util.ModuleInfoGen"
1495
fork="true"
1496
failonerror="true"
1497
taskname="module-info-gen :: java"
1498
if:set="jdk9"
1499
>
1500
<jvmarg value="-Dmodule.name.list=${module.list}"/>
1501
<jvmarg value="-Dmodule.version=${module.version}"/>
1502
</java>
1503
1504
<parallel threadcount="4" failonany="true">
1505
1506
<!-- CORE -->
1507
<sequential>
1508
<quiet>
1509
<copy todir="${module.lwjgl}/core/src/generated/java/META-INF/versions/9" if:set="jdk9">
1510
<fileset dir="${module.lwjgl}/core/src/main/java9" includes="**"/>
1511
</copy>
1512
<copy todir="${module.lwjgl}/core/src/generated/java/META-INF/versions/10" if:set="jdk10">
1513
<fileset dir="${module.lwjgl}/core/src/main/java10" includes="**"/>
1514
</copy>
1515
<copy todir="${module.lwjgl}/core/src/generated/java/META-INF/versions/16" if:set="jdk16">
1516
<fileset dir="${module.lwjgl}/core/src/main/java16" includes="**"/>
1517
</copy>
1518
<copy todir="${bin.lwjgl}/core/META-INF/native-image/org.lwjgl/lwjgl">
1519
<fileset dir="config/native-image/META-INF/native-image" includes="**" excludes="resource-config.json"/>
1520
</copy>
1521
</quiet>
1522
1523
<release-module name="core" native-library="lwjgl" title="Core"/>
1524
1525
<delete dir="${bin.lwjgl}/core/META-INF/native-image" quiet="true"/>
1526
</sequential>
1527
1528
<!-- Assimp -->
1529
<release-module name="assimp" title="assimp" if:true="${binding.assimp}">
1530
<natives>
1531
<get-release platform="linux" arch="x64" file="libassimp.so"/>
1532
<get-release platform="linux" arch="x64" file="libassimp.so.git"/>
1533
<get-release platform="linux" arch="x64" file="libdraco.so"/>
1534
1535
<get-release platform="linux" arch="arm64" file="libassimp.so"/>
1536
<get-release platform="linux" arch="arm64" file="libassimp.so.git"/>
1537
<get-release platform="linux" arch="arm64" file="libdraco.so"/>
1538
1539
<get-release platform="linux" arch="arm32" file="libassimp.so"/>
1540
<get-release platform="linux" arch="arm32" file="libassimp.so.git"/>
1541
<get-release platform="linux" arch="arm32" file="libdraco.so"/>
1542
1543
<get-release platform="macos" arch="x64" file="libassimp.dylib"/>
1544
<get-release platform="macos" arch="x64" file="libassimp.dylib.git"/>
1545
<get-release platform="macos" arch="x64" file="libdraco.dylib"/>
1546
1547
<get-release platform="macos" arch="arm64" file="libassimp.dylib"/>
1548
<get-release platform="macos" arch="arm64" file="libassimp.dylib.git"/>
1549
<get-release platform="macos" arch="arm64" file="libdraco.dylib"/>
1550
1551
<get-release platform="windows" arch="x64" file="assimp.dll"/>
1552
<get-release platform="windows" arch="x64" file="assimp.dll.git"/>
1553
<get-release platform="windows" arch="x64" file="draco.dll"/>
1554
1555
<get-release platform="windows" arch="x86" file="assimp.dll"/>
1556
<get-release platform="windows" arch="x86" file="assimp.dll.git"/>
1557
<get-release platform="windows" arch="x86" file="draco.dll"/>
1558
1559
<get-release platform="windows" arch="arm64" file="assimp.dll"/>
1560
<get-release platform="windows" arch="arm64" file="assimp.dll.git"/>
1561
<get-release platform="windows" arch="arm64" file="draco.dll"/>
1562
</natives>
1563
</release-module>
1564
1565
<!-- bgfx -->
1566
<release-module name="bgfx" title="bgfx" if:true="${binding.bgfx}">
1567
<natives>
1568
<get-release platform="linux" arch="x64" file="libbgfx.so"/>
1569
<get-release platform="linux" arch="x64" file="libbgfx.so.git"/>
1570
1571
<get-release platform="linux" arch="arm64" file="libbgfx.so"/>
1572
<get-release platform="linux" arch="arm64" file="libbgfx.so.git"/>
1573
1574
<get-release platform="linux" arch="arm32" file="libbgfx.so"/>
1575
<get-release platform="linux" arch="arm32" file="libbgfx.so.git"/>
1576
1577
<get-release platform="macos" arch="x64" file="libbgfx.dylib"/>
1578
<get-release platform="macos" arch="x64" file="libbgfx.dylib.git"/>
1579
1580
<get-release platform="macos" arch="arm64" file="libbgfx.dylib"/>
1581
<get-release platform="macos" arch="arm64" file="libbgfx.dylib.git"/>
1582
1583
<get-release platform="windows" arch="x64" file="bgfx.dll"/>
1584
<get-release platform="windows" arch="x64" file="bgfx.dll.git"/>
1585
1586
<get-release platform="windows" arch="x86" file="bgfx.dll"/>
1587
<get-release platform="windows" arch="x86" file="bgfx.dll.git"/>
1588
</natives>
1589
</release-module>
1590
1591
<!-- CUDA -->
1592
<release-module name="cuda" title="CUDA" if:true="${binding.cuda}"/>
1593
1594
<!-- EGL -->
1595
<release-module name="egl" title="EGL" if:true="${binding.egl}"/>
1596
1597
<!-- FMOD -->
1598
<release-module name="fmod" title="FMOD" if:true="${binding.fmod}"/>
1599
1600
<!-- FreeType -->
1601
<release-module name="freetype" native-library="freetype" title="FreeType" if:true="${binding.freetype}"/>
1602
1603
<!-- GLFW -->
1604
<release-module name="glfw" title="GLFW" if:true="${binding.glfw}">
1605
<natives>
1606
<get-release platform="linux" arch="x64" file="libglfw.so"/>
1607
<get-release platform="linux" arch="x64" file="libglfw.so.git"/>
1608
1609
<get-release platform="linux" arch="arm64" file="libglfw.so"/>
1610
<get-release platform="linux" arch="arm64" file="libglfw.so.git"/>
1611
1612
<get-release platform="linux" arch="arm32" file="libglfw.so"/>
1613
<get-release platform="linux" arch="arm32" file="libglfw.so.git"/>
1614
1615
<get-release platform="macos" arch="x64" file="libglfw.dylib"/>
1616
<get-release platform="macos" arch="x64" file="libglfw.dylib.git"/>
1617
<get-release platform="macos" arch="x64" file="libglfw_async.dylib"/>
1618
<get-release platform="macos" arch="x64" file="libglfw_async.dylib.git"/>
1619
1620
<get-release platform="macos" arch="arm64" file="libglfw.dylib"/>
1621
<get-release platform="macos" arch="arm64" file="libglfw.dylib.git"/>
1622
<get-release platform="macos" arch="arm64" file="libglfw_async.dylib"/>
1623
<get-release platform="macos" arch="arm64" file="libglfw_async.dylib.git"/>
1624
1625
<get-release platform="windows" arch="x64" file="glfw.dll"/>
1626
<get-release platform="windows" arch="x64" file="glfw.dll.git"/>
1627
1628
<get-release platform="windows" arch="x86" file="glfw.dll"/>
1629
<get-release platform="windows" arch="x86" file="glfw.dll.git"/>
1630
1631
<get-release platform="windows" arch="arm64" file="glfw.dll"/>
1632
<get-release platform="windows" arch="arm64" file="glfw.dll.git"/>
1633
</natives>
1634
</release-module>
1635
1636
<!-- HarfBuzz -->
1637
<release-module name="harfbuzz" native-library="harfbuzz" title="HarfBuzz" if:true="${binding.harfbuzz}"/>
1638
1639
<!-- hwloc -->
1640
<release-module name="hwloc" native-library="hwloc" title="hwloc" if:true="${binding.hwloc}"/>
1641
1642
<!-- JAWT -->
1643
<release-module name="jawt" title="JAWT" if:true="${binding.jawt}"/>
1644
1645
<!-- jemalloc -->
1646
<release-module name="jemalloc" native-library="jemalloc" title="jemalloc" if:true="${binding.jemalloc}"/>
1647
1648
<!-- libdivide -->
1649
<release-module name="libdivide" native-library="lwjgl_libdivide" title="libdivide" if:true="${binding.libdivide}"/>
1650
1651
<!-- LLVM -->
1652
<release-module name="llvm" native-library="lwjgl_llvm" title="LLVM/Clang" if:true="${binding.llvm}"/>
1653
1654
<!-- LMDB -->
1655
<release-module name="lmdb" native-library="lwjgl_lmdb" title="LMDB" if:true="${binding.lmdb}"/>
1656
1657
<!-- LWJGLX -->
1658
<release-module name="lwjglx" title="LWJGLX" if:true="${binding.lwjglx}"/>
1659
1660
<!-- lz4 -->
1661
<release-module name="lz4" native-library="lwjgl_lz4" title="lz4" if:true="${binding.lz4}"/>
1662
1663
<!-- Meow hash -->
1664
<release-module name="meow" title="Meow hash" if:true="${binding.meow}">
1665
<natives>
1666
<get-release platform="linux" arch="x64" file="liblwjgl_meow.so"/>
1667
<get-release platform="linux" arch="arm64" file="liblwjgl_meow.so"/>
1668
<get-release platform="macos" arch="x64" file="liblwjgl_meow.dylib"/>
1669
<get-release platform="macos" arch="arm64" file="liblwjgl_meow.dylib"/>
1670
<get-release platform="windows" arch="x64" file="lwjgl_meow.dll"/>
1671
<get-release platform="windows" arch="x86" file="lwjgl_meow.dll"/>
1672
<get-release platform="windows" arch="arm64" file="lwjgl_meow.dll"/>
1673
</natives>
1674
</release-module>
1675
1676
<!-- meshoptimizer -->
1677
<release-module name="meshoptimizer" native-library="lwjgl_meshoptimizer" title="meshoptimizer" if:true="${binding.meshoptimizer}"/>
1678
1679
<!-- NanoVG -->
1680
<release-module name="nanovg" native-library="lwjgl_nanovg" title="NanoVG" if:true="${binding.nanovg}"/>
1681
1682
<!-- Native File Dialog -->
1683
<release-module name="nfd" native-library="lwjgl_nfd" title="Native File Dialog" if:true="${binding.nfd}">
1684
<natives>
1685
<get-release platform="linux" arch="x64" file="liblwjgl_nfd_portal.so"/>
1686
<get-release platform="linux" arch="arm64" file="liblwjgl_nfd_portal.so"/>
1687
<get-release platform="linux" arch="arm32" file="liblwjgl_nfd_portal.so"/>
1688
</natives>
1689
</release-module>
1690
1691
<!-- Nuklear -->
1692
<release-module name="nuklear" native-library="lwjgl_nuklear" title="Nuklear" if:true="${binding.nuklear}"/>
1693
1694
<!-- ODBC -->
1695
<release-module name="odbc" title="ODBC" if:true="${binding.odbc}"/>
1696
1697
<!-- OpenAL -->
1698
<release-module name="openal" title="OpenAL" if:true="${binding.openal}">
1699
<natives>
1700
<get-release platform="linux" arch="x64" file="libopenal.so"/>
1701
<get-release platform="linux" arch="x64" file="libopenal.so.git"/>
1702
1703
<get-release platform="linux" arch="arm64" file="libopenal.so"/>
1704
<get-release platform="linux" arch="arm64" file="libopenal.so.git"/>
1705
1706
<get-release platform="linux" arch="arm32" file="libopenal.so"/>
1707
<get-release platform="linux" arch="arm32" file="libopenal.so.git"/>
1708
1709
<get-release platform="macos" arch="x64" file="libopenal.dylib"/>
1710
<get-release platform="macos" arch="x64" file="libopenal.dylib.git"/>
1711
1712
<get-release platform="macos" arch="arm64" file="libopenal.dylib"/>
1713
<get-release platform="macos" arch="arm64" file="libopenal.dylib.git"/>
1714
1715
<get-release platform="windows" arch="x64" file="OpenAL.dll"/>
1716
<get-release platform="windows" arch="x64" file="OpenAL.dll.git"/>
1717
1718
<get-release platform="windows" arch="x86" file="OpenAL.dll"/>
1719
<get-release platform="windows" arch="x86" file="OpenAL.dll.git"/>
1720
1721
<get-release platform="windows" arch="arm64" file="OpenAL.dll"/>
1722
<get-release platform="windows" arch="arm64" file="OpenAL.dll.git"/>
1723
</natives>
1724
</release-module>
1725
1726
<!-- OpenCL -->
1727
<release-module name="opencl" title="OpenCL" if:true="${binding.opencl}"/>
1728
1729
<!-- OpenGL -->
1730
<release-module name="opengl" native-library="lwjgl_opengl" title="OpenGL" if:true="${binding.opengl}"/>
1731
1732
<!-- OpenGL ES -->
1733
<release-module name="opengles" native-library="lwjgl_opengles" title="OpenGL ES" if:true="${binding.opengles}"/>
1734
1735
<!-- OpenVR -->
1736
<release-module name="openvr" title="OpenVR" if:true="${binding.openvr}">
1737
<natives>
1738
<get-release platform="linux" arch="x64" file="liblwjgl_openvr.so"/>
1739
<get-release platform="linux" arch="x64" file="libopenvr_api.so"/>
1740
<get-release platform="linux" arch="x64" file="libopenvr_api.so.git"/>
1741
1742
<get-release platform="macos" arch="x64" file="liblwjgl_openvr.dylib"/>
1743
<get-release platform="macos" arch="x64" file="libopenvr_api.dylib"/>
1744
<get-release platform="macos" arch="x64" file="libopenvr_api.dylib.git"/>
1745
1746
<get-release platform="windows" arch="x64" file="lwjgl_openvr.dll"/>
1747
<get-release platform="windows" arch="x64" file="openvr_api.dll"/>
1748
<get-release platform="windows" arch="x64" file="openvr_api.dll.git"/>
1749
1750
<get-release platform="windows" arch="x86" file="lwjgl_openvr.dll"/>
1751
<get-release platform="windows" arch="x86" file="openvr_api.dll"/>
1752
<get-release platform="windows" arch="x86" file="openvr_api.dll.git"/>
1753
</natives>
1754
</release-module>
1755
1756
<!-- OpenXR -->
1757
<release-module name="openxr" title="OpenXR" if:true="${binding.openxr}">
1758
<natives>
1759
<get-release platform="linux" arch="x64" file="libopenxr_loader.so"/>
1760
<get-release platform="linux" arch="x64" file="libopenxr_loader.so.git"/>
1761
1762
<get-release platform="linux" arch="arm64" file="libopenxr_loader.so"/>
1763
<get-release platform="linux" arch="arm64" file="libopenxr_loader.so.git"/>
1764
1765
<get-release platform="linux" arch="arm32" file="libopenxr_loader.so"/>
1766
<get-release platform="linux" arch="arm32" file="libopenxr_loader.so.git"/>
1767
1768
<get-release platform="windows" arch="x64" file="openxr-loader.dll"/>
1769
<get-release platform="windows" arch="x64" file="openxr-loader.dll.git"/>
1770
1771
<get-release platform="windows" arch="x86" file="openxr-loader.dll"/>
1772
<get-release platform="windows" arch="x86" file="openxr-loader.dll.git"/>
1773
1774
<get-release platform="windows" arch="arm64" file="openxr-loader.dll"/>
1775
<get-release platform="windows" arch="arm64" file="openxr-loader.dll.git"/>
1776
</natives>
1777
</release-module>
1778
1779
<!-- Opus -->
1780
<release-module name="opus" native-library="opus" title="Opus" if:true="${binding.opus}"/>
1781
1782
<!-- LibOVR -->
1783
<release-module name="ovr" title="LibOVR" if:true="${binding.ovr}">
1784
<natives>
1785
<get-release platform="windows" arch="x64" file="lwjgl_ovr.dll"/>
1786
<get-release platform="windows" arch="x86" file="lwjgl_ovr.dll"/>
1787
</natives>
1788
</release-module>
1789
1790
<!-- Par -->
1791
<release-module name="par" native-library="lwjgl_par" title="par" if:true="${binding.par}"/>
1792
1793
<!-- Remotery -->
1794
<release-module name="remotery" title="remotery" if:true="${binding.remotery}">
1795
<natives>
1796
<get-release platform="linux" arch="x64" file="liblwjgl_remotery.so"/>
1797
<get-release platform="linux" arch="arm64" file="liblwjgl_remotery.so"/>
1798
<get-release platform="linux" arch="arm32" file="liblwjgl_remotery.so"/>
1799
1800
<get-release platform="macos" arch="x64" file="liblwjgl_remotery.dylib"/>
1801
<get-release platform="macos" arch="arm64" file="liblwjgl_remotery.dylib"/>
1802
1803
<get-release platform="windows" arch="x64" file="lwjgl_remotery.dll"/>
1804
<get-release platform="windows" arch="x86" file="lwjgl_remotery.dll"/>
1805
</natives>
1806
</release-module>
1807
1808
<!-- rpmalloc -->
1809
<release-module name="rpmalloc" native-library="lwjgl_rpmalloc" title="rpmalloc" if:true="${binding.rpmalloc}"/>
1810
1811
<!-- shaderc -->
1812
<release-module name="shaderc" native-library="shaderc" title="Shaderc" if:true="${binding.shaderc}"/>
1813
1814
<!-- SPIRV-Cross -->
1815
<release-module name="spvc" native-library="spirv-cross" title="SPIRV-Cross" if:true="${binding.spvc}"/>
1816
1817
<!-- SSE -->
1818
<release-module name="sse" title="SSE" if:true="${binding.sse}">
1819
<natives>
1820
<get-release platform="linux" arch="x64" file="liblwjgl_sse.so"/>
1821
<get-release platform="macos" arch="x64" file="liblwjgl_sse.dylib"/>
1822
<get-release platform="windows" arch="x64" file="lwjgl_sse.dll"/>
1823
<get-release platform="windows" arch="x86" file="lwjgl_sse.dll"/>
1824
</natives>
1825
</release-module>
1826
1827
<!-- stb -->
1828
<release-module name="stb" native-library="lwjgl_stb" title="stb" if:true="${binding.stb}"/>
1829
1830
<!-- Tiny OpenEXR -->
1831
<release-module name="tinyexr" native-library="lwjgl_tinyexr" title="Tiny OpenEXR" if:true="${binding.tinyexr}"/>
1832
1833
<!-- tiny file dialogs -->
1834
<release-module name="tinyfd" native-library="lwjgl_tinyfd" title="tiny file dialogs" if:true="${binding.tinyfd}"/>
1835
1836
<!-- AMD Tootle -->
1837
<release-module name="tootle" title="tootle" if:true="${binding.tootle}">
1838
<natives>
1839
<get-release platform="linux" arch="x64" file="liblwjgl_tootle.so"/>
1840
<get-release platform="macos" arch="x64" file="liblwjgl_tootle.dylib"/>
1841
<get-release platform="windows" arch="x64" file="lwjgl_tootle.dll"/>
1842
<get-release platform="windows" arch="x86" file="lwjgl_tootle.dll"/>
1843
</natives>
1844
</release-module>
1845
1846
<!-- Vulkan Memory Allocator -->
1847
<release-module name="vma" native-library="lwjgl_vma" title="vma" if:true="${binding.vma}"/>
1848
1849
<!-- Vulkan -->
1850
<release-module name="vulkan" title="Vulkan" if:true="${binding.vulkan}">
1851
<natives>
1852
<get-release platform="macos" arch="x64" file="libMoltenVK.dylib"/>
1853
<get-release platform="macos" arch="x64" file="libMoltenVK.dylib.git"/>
1854
<get-release platform="macos" arch="arm64" file="libMoltenVK.dylib"/>
1855
<get-release platform="macos" arch="arm64" file="libMoltenVK.dylib.git"/>
1856
</natives>
1857
</release-module>
1858
1859
<!-- xxHash -->
1860
<release-module name="xxhash" native-library="lwjgl_xxhash" title="xxHash" if:true="${binding.xxhash}"/>
1861
1862
<!-- yoga -->
1863
<release-module name="yoga" native-library="lwjgl_yoga" title="yoga" if:true="${binding.yoga}"/>
1864
1865
<!-- zstd -->
1866
<release-module name="zstd" native-library="lwjgl_zstd" title="zstd" if:true="${binding.zstd}"/>
1867
1868
</parallel>
1869
</target>
1870
</project>
1871
1872