mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
update AppBundler, use newer macOS SDK, preserve attributes where possible
This commit is contained in:
@@ -33,8 +33,8 @@ questions.
|
||||
version=1.0ea
|
||||
-->
|
||||
<property name="arch64" value="-arch x86_64" />
|
||||
<property name="arch32" value="-arch i386" />
|
||||
<property name="archppc" value="-arch ppc" />
|
||||
<!-- <property name="arch32" value="-arch i386" /> -->
|
||||
<!-- <property name="archppc" value="-arch ppc" /> -->
|
||||
<property name="cc" value="gcc" />
|
||||
|
||||
<property name="folder.src" value="src"/>
|
||||
@@ -73,7 +73,8 @@ questions.
|
||||
</copy>
|
||||
|
||||
<exec executable="${cc}">
|
||||
<arg line="${arch64} ${arch32}"/>
|
||||
<!-- <arg line="${arch64} ${arch32}"/> -->
|
||||
<arg line="${arch64}"/>
|
||||
<arg value="-I"/>
|
||||
<arg value="${env.JAVA_HOME}/include"/>
|
||||
<arg value="-I"/>
|
||||
@@ -87,10 +88,10 @@ questions.
|
||||
<arg value="-isysroot"/>
|
||||
<!--
|
||||
<arg value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"/>
|
||||
<arg value="-mmacosx-version-min=10.7"/>
|
||||
<arg value="-mmacosx-version-min=10.7"/>
|
||||
-->
|
||||
<arg value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"/>
|
||||
<arg value="-mmacosx-version-min=10.8"/>
|
||||
<arg value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"/>
|
||||
<arg value="-mmacosx-version-min=10.8"/>
|
||||
<arg value="native/main.m"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
@@ -458,6 +458,7 @@ public class AppBundlerTask extends Task {
|
||||
} finally {
|
||||
outputStream.close();
|
||||
}
|
||||
file.setLastModified(zipEntry.getTime());
|
||||
}
|
||||
zipEntry = zipInputStream.getNextEntry();
|
||||
}
|
||||
@@ -729,7 +730,9 @@ public class AppBundlerTask extends Task {
|
||||
|
||||
private static void copy(URL location, File file) throws IOException {
|
||||
try (InputStream in = location.openStream()) {
|
||||
Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
Files.copy(in, file.toPath(),
|
||||
// can't do attributes when coming from URL
|
||||
StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,13 +743,15 @@ public class AppBundlerTask extends Task {
|
||||
|
||||
destination.getParentFile().mkdirs();
|
||||
|
||||
Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING, LinkOption.NOFOLLOW_LINKS);
|
||||
Files.copy(sourcePath, destinationPath,
|
||||
StandardCopyOption.REPLACE_EXISTING,
|
||||
StandardCopyOption.COPY_ATTRIBUTES,
|
||||
LinkOption.NOFOLLOW_LINKS);
|
||||
|
||||
if (Files.isDirectory(sourcePath, LinkOption.NOFOLLOW_LINKS)) {
|
||||
String[] files = source.list();
|
||||
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
String file = files[i];
|
||||
for (String file : files) {
|
||||
copy(new File(source, file), new File(destination, file));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user