mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into master-MC1.7.10
Conflicts: src/main/scala/li/cil/oc/OpenComputers.scala
This commit is contained in:
commit
34bb02566e
@ -932,5 +932,13 @@ opencomputers {
|
||||
# Logs information about malformed glyphs (i.e. glyphs that deviate in
|
||||
# width from what wcwidth says).
|
||||
logUnifontErrors: false
|
||||
|
||||
# Extract the native library with Lua into the system's temporary
|
||||
# directory instead of the game directory (e.g. /tmp on Linux). The
|
||||
# default is to extract into the game directory, to avoid issues when
|
||||
# the temporary directory is mounted as noexec (meaning the lib cannot)
|
||||
# be loaded. There is also less of a chance of conflicts when running
|
||||
# multiple servers or server and client on the same machine.
|
||||
nativeInTmpDir: false
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ object OpenComputers {
|
||||
|
||||
final val Fingerprint = "@FINGERPRINT@"
|
||||
|
||||
val log = LogManager.getLogger("OpenComputers")
|
||||
var log = LogManager.getLogger("OpenComputers")
|
||||
|
||||
@SidedProxy(clientSide = "li.cil.oc.client.Proxy", serverSide = "li.cil.oc.server.Proxy")
|
||||
var proxy: Proxy = null
|
||||
@ -33,7 +33,10 @@ object OpenComputers {
|
||||
// def invalidFingerprint(e: FMLFingerprintViolationEvent) = tampered = Some(e)
|
||||
|
||||
@EventHandler
|
||||
def preInit(e: FMLPreInitializationEvent) = proxy.preInit(e)
|
||||
def preInit(e: FMLPreInitializationEvent) {
|
||||
proxy.preInit(e)
|
||||
log = e.getModLog
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
def init(e: FMLInitializationEvent) = proxy.init(e)
|
||||
|
@ -230,6 +230,7 @@ class Settings(config: Config) {
|
||||
val logUnifontErrors = config.getBoolean("debug.logUnifontErrors")
|
||||
val alwaysTryNative = config.getBoolean("debug.alwaysTryNative")
|
||||
val debugPersistence = config.getBoolean("debug.verbosePersistenceErrors")
|
||||
val nativeInTmpDir = config.getBoolean("debug.nativeInTmpDir")
|
||||
}
|
||||
|
||||
object Settings {
|
||||
|
@ -95,11 +95,15 @@ object LuaStateFactory {
|
||||
return
|
||||
}
|
||||
|
||||
val tmpLibFile = new File({
|
||||
val tmpLibName = "OpenComputersMod-" + OpenComputers.Version + "-" + libraryName
|
||||
val tmpBasePath = if (Settings.get.nativeInTmpDir) {
|
||||
val path = System.getProperty("java.io.tmpdir")
|
||||
if (path.endsWith("/") || path.endsWith("\\")) path
|
||||
if (path == null) ""
|
||||
else if (path.endsWith("/") || path.endsWith("\\")) path
|
||||
else path + "/"
|
||||
} + "OpenComputersMod-" + OpenComputers.Version + "-" + libraryName)
|
||||
}
|
||||
else ""
|
||||
val tmpLibFile = new File(tmpBasePath + tmpLibName)
|
||||
|
||||
// If the file, already exists, make sure it's the same we need, if it's
|
||||
// not disable use of the natives.
|
||||
|
Loading…
x
Reference in New Issue
Block a user