mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Merge branch 'macos3' into 'master'
macOS support See merge request briar/briar!1790
This commit is contained in:
@@ -18,6 +18,7 @@ import org.briarproject.bramble.api.plugin.duplex.DuplexPluginFactory
|
||||
import org.briarproject.bramble.api.plugin.simplex.SimplexPluginFactory
|
||||
import org.briarproject.bramble.battery.DefaultBatteryManagerModule
|
||||
import org.briarproject.bramble.event.DefaultEventExecutorModule
|
||||
import org.briarproject.bramble.plugin.tor.MacTorPluginFactory
|
||||
import org.briarproject.bramble.plugin.tor.UnixTorPluginFactory
|
||||
import org.briarproject.bramble.plugin.tor.WindowsTorPluginFactory
|
||||
import org.briarproject.bramble.system.ClockModule
|
||||
@@ -92,10 +93,12 @@ internal class HeadlessModule(private val appDir: File) {
|
||||
@Singleton
|
||||
internal fun providePluginConfig(
|
||||
unixTor: UnixTorPluginFactory,
|
||||
macTor: MacTorPluginFactory,
|
||||
winTor: WindowsTorPluginFactory
|
||||
): PluginConfig {
|
||||
val duplex: List<DuplexPluginFactory> = when {
|
||||
isLinux() || isMac() -> listOf(unixTor)
|
||||
isLinux() -> listOf(unixTor)
|
||||
isMac() -> listOf(macTor)
|
||||
isWindows() -> listOf(winTor)
|
||||
else -> emptyList()
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ import java.util.logging.Level.INFO
|
||||
import java.util.logging.Level.WARNING
|
||||
import java.util.logging.LogManager
|
||||
|
||||
private const val DEFAULT_PORT = 7000
|
||||
// On macOS, port 7000 is used by ControlCenter (probably AirPlay), so use a different port
|
||||
private val DEFAULT_PORT = if (isMac()) 7001 else 7000
|
||||
private val DEFAULT_DATA_DIR = getProperty("user.home") + separator + ".briar"
|
||||
|
||||
private class Main : CliktCommand(
|
||||
|
||||
Reference in New Issue
Block a user