|
54 | 54 | </target> |
55 | 55 |
|
56 | 56 | <target name="bundled-deps" depends="check-bundled-deps" unless="hasjsyn" description="Download JSyn and (J)PortAudio"> |
57 | | - <get src="https://github.com/philburk/jsyn/releases/download/v17.1.0/jsyn-17.1.0.jar" dest="library/" usetimestamp="true" /> |
58 | | - <get src="https://www.softsynth.com/jsyn/developers/archives/jportaudio_pc_20120904.zip" dest="library/" usetimestamp="true" /> |
| 57 | + <get src="https://github.com/philburk/jsyn/releases/download/v17.1.0/jsyn-17.1.0.jar" dest="${lib}" usetimestamp="true" /> |
| 58 | + <get src="https://www.softsynth.com/jsyn/developers/archives/jportaudio_pc_20120904.zip" dest="${lib}" usetimestamp="true" /> |
| 59 | + <!--get src="https://www.softsynth.com/jsyn/developers/archives/jportaudio_mac_20120904.zip" dest="${lib}" usetimestamp="true" /--> |
59 | 60 | <unzip src="${lib}/jportaudio_pc_20120904.zip" dest="${lib}"> |
60 | 61 | <patternset> |
61 | 62 | <include name="**/*.jar" /> |
|
68 | 69 | </patternset> |
69 | 70 | <mapper type="flatten"/> |
70 | 71 | </unzip> |
71 | | - <delete file="${lib}/jportaudio_pc_20120904.zip" /> |
| 72 | + <!--unzip src="${lib}/jportaudio_mac_20120904.zip" dest="${lib}/mac-x86_64/"> |
| 73 | + <patternset> |
| 74 | + <include name="**/*.jnilib" /> |
| 75 | + </patternset> |
| 76 | + <mapper type="flatten"/> |
| 77 | + </unzip--> |
72 | 78 | </target> |
73 | 79 |
|
74 | 80 | <target name="deps" description="Get library dependencies"> |
|
101 | 107 | </javadoc> |
102 | 108 | </target> |
103 | 109 |
|
| 110 | + <!-- see bottom of https://github.com/processing/processing4/wiki/Supported-Platforms#native-libraries --> |
| 111 | + <target name="prepare-dist" depends="clean,maven-deps,jar"> |
| 112 | + <apply executable="mkdir" ignoremissing="false"> |
| 113 | + <filelist dir="${lib}" files="${native-lib-dirs}" /> |
| 114 | + </apply> |
| 115 | + </target> |
| 116 | + |
104 | 117 | <patternset id="dist.files"> |
105 | 118 | <include name="CONTRIBUTING.md" /> |
106 | 119 | <include name="LICENSE" /> |
107 | 120 | <include name="README.md" /> |
108 | 121 | <include name="examples/**" /> |
109 | | - <include name="library.properties" /> |
110 | | - <include name="library/*.jar" /> |
111 | | - <!-- all files inside per-architecture directories - real dlls and dummy files --> |
112 | | - <include name="library/*-*/*" /> |
| 122 | + <include name="${lib}/.properties" /> |
| 123 | + <include name="${lib}/*.jar" /> |
| 124 | + <!-- all files inside per-architecture native library directories --> |
| 125 | + <include name="${lib}/*-*/*" /> |
113 | 126 |
|
114 | 127 | <exclude name="library/android.jar" /> |
115 | | - <exclude name="library/junit-*" /> |
116 | | - <exclude name="library/hamcrest-*" /> |
| 128 | + <exclude name="${lib}/junit-*" /> |
| 129 | + <exclude name="${lib}/hamcrest-*" /> |
117 | 130 | </patternset> |
118 | 131 |
|
119 | | - <target name="dist" depends="clean,maven-deps,javadoc" description="Build clean Sound library zip"> |
120 | | - <touch mkdirs="true" file="${lib}/linux-aarch64/dummy" /> |
121 | | - <touch mkdirs="true" file="${lib}/linux-amd64/dummy" /> |
122 | | - <touch mkdirs="true" file="${lib}/linux-arm/dummy" /> |
123 | | - <touch mkdirs="true" file="${lib}/macos-x86_64/dummy" /> |
| 132 | + <target name="dist" depends="prepare-dist,javadoc" description="Build clean Sound library zip"> |
124 | 133 | <zip destfile="../sound.zip"> |
125 | 134 | <zipfileset dir="." prefix="sound"> |
126 | 135 | <patternset refid="dist.files" /> |
127 | 136 | <include name="reference/**" /> |
128 | 137 | </zipfileset> |
| 138 | + <!-- explicitly add empty native directories --> |
| 139 | + <zipfileset dir="${lib}" prefix="sound/${lib}" includes="${native-lib-dirs}" /> |
129 | 140 | </zip> |
130 | 141 | <copy file="library.properties" toFile="../sound.txt" /> |
131 | 142 | </target> |
132 | 143 |
|
133 | | - <target name="dist-slim" depends="clean,jar" description="Build a reduced size Sound library zip (omitting javadoc documentation and examples with audio files)"> |
| 144 | + <target name="dist-slim" depends="prepare-dist" description="Build a reduced size Sound library zip (omitting javadoc documentation and examples with audio files)"> |
134 | 145 | <zip destfile="../sound-slim.zip"> |
135 | 146 | <zipfileset dir="." prefix="sound"> |
136 | 147 | <patternset refid="dist.files" /> |
137 | 148 | <exclude name="examples/**/data/*" /> |
138 | 149 | </zipfileset> |
| 150 | + <!-- explicitly add empty native directories --> |
| 151 | + <zipfileset dir="${lib}" prefix="sound/${lib}" includes="${native-lib-dirs}" /> |
139 | 152 | </zip> |
140 | 153 | </target> |
141 | 154 |
|
|
0 commit comments