mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-04-21 18:37:12 +00:00
Small fixes to get Mac build working correctly
This commit is contained in:
parent
149c2c8693
commit
e435aa3a7a
@ -46,9 +46,16 @@
|
||||
<plugin>
|
||||
<groupId>com.gluonhq</groupId>
|
||||
<artifactId>gluonfx-maven-plugin</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.22</version>
|
||||
<configuration>
|
||||
<mainClass>jace.LawlessLegends</mainClass>
|
||||
<resourcesList>
|
||||
<resource>.*</resource>
|
||||
</resourcesList>
|
||||
<releaseConfiguration>
|
||||
<vendor>The 8-Bit Bunch</vendor>
|
||||
<skipSigning>true</skipSigning>
|
||||
</releaseConfiguration>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -1,7 +1,7 @@
|
||||
package jace.lawless;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
|
||||
@ -18,10 +18,17 @@ public class Media {
|
||||
long sampleRate = 0;
|
||||
boolean isStereo = true;
|
||||
ShortBuffer sampleBuffer;
|
||||
File tempFile;
|
||||
|
||||
public Media(String resourcePath) throws IOException {
|
||||
// Copy resource to temp file because STBVorbis can't read from jar
|
||||
tempFile = File.createTempFile("temp", ".ogg");
|
||||
tempFile.deleteOnExit();
|
||||
getClass().getResource(resourcePath).openStream().transferTo(new java.io.FileOutputStream(tempFile));
|
||||
String canonicalPath = tempFile.getAbsolutePath();
|
||||
|
||||
// Get caononical file path from relative resource path
|
||||
String canonicalPath = URLDecoder.decode(getClass().getResource(resourcePath).getPath(), "UTF-8");
|
||||
// String canonicalPath = URLDecoder.decode(getClass().getResource(resourcePath).getPath(), "UTF-8");
|
||||
System.out.println("Loading media: " + canonicalPath);
|
||||
|
||||
try (MemoryStack stack = MemoryStack.stackPush()) {
|
||||
@ -97,6 +104,8 @@ public class Media {
|
||||
|
||||
public void close() {
|
||||
MemoryUtil.memFree(sampleBuffer);
|
||||
if (tempFile != null && tempFile.exists())
|
||||
tempFile.delete();
|
||||
}
|
||||
|
||||
public void seekToTime(Duration millis) {
|
||||
|
@ -381,66 +381,11 @@
|
||||
{"name":"skip","parameterTypes":["long"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.DirectAudioDevice",
|
||||
"methods":[
|
||||
{
|
||||
"name":"addFormat",
|
||||
"parameterTypes":[
|
||||
"java.util.Vector",
|
||||
"int",
|
||||
"int",
|
||||
"int",
|
||||
"float",
|
||||
"int",
|
||||
"boolean",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.DirectAudioDeviceProvider$DirectAudioDeviceInfo",
|
||||
"methods":[
|
||||
{
|
||||
"name":"<init>",
|
||||
"parameterTypes":[
|
||||
"int",
|
||||
"int",
|
||||
"int",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.PortMixerProvider$PortMixerInfo",
|
||||
"methods":[
|
||||
{
|
||||
"name":"<init>",
|
||||
"parameterTypes":[
|
||||
"int",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Boolean",
|
||||
"methods":[
|
||||
{
|
||||
"name":"getBoolean",
|
||||
"parameterTypes":[
|
||||
"java.lang.String"
|
||||
]
|
||||
},
|
||||
{"name":"booleanValue","parameterTypes":[] }
|
||||
{"name":"booleanValue","parameterTypes":[] },
|
||||
{"name":"getBoolean","parameterTypes":["java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -410,6 +410,7 @@
|
||||
"queryAllDeclaredMethods":true,
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":[] },
|
||||
{"name":"executeClicked","parameterTypes":["javafx.event.ActionEvent"] },
|
||||
{"name":"initialize","parameterTypes":[] },
|
||||
{"name":"newApplesoftBasicClicked","parameterTypes":["javafx.event.ActionEvent"] },
|
||||
{"name":"newApplesoftBasicFromMemoryClicked","parameterTypes":["javafx.event.ActionEvent"] },
|
||||
@ -509,14 +510,54 @@
|
||||
"name":"java.net.URLConnection",
|
||||
"methods":[{"name":"getContentLengthLong","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.nio.Buffer",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.ByteBuffer",
|
||||
"allDeclaredFields":true,
|
||||
"methods":[{"name":"order","parameterTypes":["java.nio.ByteOrder"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.nio.ByteOrder",
|
||||
"methods":[{"name":"nativeOrder","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectByteBuffer",
|
||||
"allDeclaredFields":true,
|
||||
"unsafeAllocated":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectCharBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectDoubleBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectFloatBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectIntBufferU",
|
||||
"allDeclaredFields":true,
|
||||
"unsafeAllocated":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectLongBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectShortBufferU",
|
||||
"allDeclaredFields":true,
|
||||
"unsafeAllocated":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.MappedByteBuffer",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.security.AlgorithmParametersSpi"
|
||||
},
|
||||
@ -1006,9 +1047,23 @@
|
||||
{
|
||||
"name":"org.ibex.nestedvm.util.Seekable"
|
||||
},
|
||||
{
|
||||
"name":"org.lwjgl.system.CustomBuffer",
|
||||
"fields":[
|
||||
{"name":"capacity"},
|
||||
{"name":"container"},
|
||||
{"name":"limit"},
|
||||
{"name":"mark"},
|
||||
{"name":"position"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"org.lwjgl.system.Pointer$Default",
|
||||
"fields":[{"name":"address"}]
|
||||
},
|
||||
{
|
||||
"name":"sun.misc.Unsafe",
|
||||
"fields":[{"name":"theUnsafe"}]
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"sun.security.pkcs12.PKCS12KeyStore",
|
||||
|
@ -1,30 +1,105 @@
|
||||
{
|
||||
"resources":{
|
||||
"includes":[
|
||||
{"pattern": ".*\\.bin$"},
|
||||
{"pattern": ".*\\.rom$"},
|
||||
{"pattern": ".*\\.mp3$"},
|
||||
{"pattern": ".*\\.png$"},
|
||||
{"pattern": ".*\\.jpg$"},
|
||||
{"pattern": ".*\\.jpeg$"},
|
||||
{"pattern": ".*\\.gif$"},
|
||||
{"pattern": ".*\\.bmp$"},
|
||||
{"pattern": ".*\\.ttf$"},
|
||||
{"pattern": ".*\\.raw$"},
|
||||
{"pattern": ".*\\.xml$"},
|
||||
{"pattern": ".*\\.fxml$"},
|
||||
{"pattern": ".*\\.css$"},
|
||||
{"pattern": ".*\\.gls$"},
|
||||
{"pattern": ".*\\.json$"},
|
||||
{"pattern": ".*\\.dat$"},
|
||||
{"pattern": ".*\\.license$"},
|
||||
{"pattern": ".*\\.frag$"},
|
||||
{"pattern": ".*\\.vert$"},
|
||||
{"pattern": ".*\\.obj$"},
|
||||
{"pattern": ".*\\.mtl$"},
|
||||
{"pattern": ".*\\.js$"},
|
||||
{"pattern": ".*\\.html$"},
|
||||
{"pattern": ".*\\.txt$"}
|
||||
]
|
||||
}
|
||||
}
|
||||
"includes":[
|
||||
{
|
||||
"pattern":".*\\.bin$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.bmp$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.css$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.dat$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.frag$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.fxml$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.gif$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.gls$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.html$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.jpeg$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.jpg$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.js$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.json$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.license$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.ogg$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.mtl$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.obj$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.png$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.raw$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.rom$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.ttf$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.txt$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.vert$"
|
||||
},
|
||||
{
|
||||
"pattern":".*\\.xml$"
|
||||
},
|
||||
{
|
||||
"pattern":"\\QMETA-INF/macos/x64/org/lwjgl/liblwjgl.dylib.sha1\\E"
|
||||
},
|
||||
{
|
||||
"pattern":"\\QMETA-INF/macos/x64/org/lwjgl/openal/libopenal.dylib.sha1\\E"
|
||||
},
|
||||
{
|
||||
"pattern":"\\QMETA-INF/macos/x64/org/lwjgl/stb/liblwjgl_stb.dylib.sha1\\E"
|
||||
},
|
||||
{
|
||||
"pattern":"\\Qmacos/x64/org/lwjgl/liblwjgl.dylib\\E"
|
||||
},
|
||||
{
|
||||
"pattern":"\\Qmacos/x64/org/lwjgl/openal/libopenal.dylib\\E"
|
||||
},
|
||||
{
|
||||
"pattern":"\\Qmacos/x64/org/lwjgl/stb/liblwjgl_stb.dylib\\E"
|
||||
}
|
||||
]},
|
||||
"bundles":[
|
||||
{
|
||||
"name":"com.sun.javafx.tk.quantum.QuantumMessagesBundle",
|
||||
"locales":[""]
|
||||
},
|
||||
{
|
||||
"name":"com/sun/javafx/scene/control/skin/resources/controls",
|
||||
"locales":[""]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user