Commit 473cec87 authored by akwizgran's avatar akwizgran

Moved desktop-specific code into a separate project (other task #34).

parent 26d25cdb
......@@ -3,19 +3,13 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="lib" path="libs/commons-io-2.0.1.jar"/>
<classpathentry kind="lib" path="libs/jnotify-0.93.jar"/>
<classpathentry kind="lib" path="libs/jssc-0.9-briar.jar" sourcepath="libs/source/jssc-0.9-briar-source.jar"/>
<classpathentry kind="lib" path="libs/sc-light-jdk15on-1.47.0.3-SNAPSHOT.jar" sourcepath="libs/source/sc-light-jdk15on-1.47.0.3-SNAPSHOT-source.jar"/>
<classpathentry kind="lib" path="libs/weupnp-0.1.1.jar"/>
<classpathentry kind="lib" path="libs/bluecove-2.1.1-SNAPSHOT-briar.jar"/>
<classpathentry kind="lib" path="libs/bluecove-gpl-2.1.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="libs/javax.inject.jar"/>
<classpathentry kind="lib" path="libs/jsocks.jar" sourcepath="libs/source/jsocks-source.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
<classpathentry kind="lib" path="/briar-api/libs/android.jar"/>
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry kind="lib" path="libs/jna-3.5.2-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="libs/platform-3.5.2-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="libs/jtorctl-briar.jar"/>
<classpathentry kind="lib" path="libs/h2small-1.3.170.jar"/>
<classpathentry kind="output" path="bin"/>
......
......@@ -2,7 +2,6 @@ package net.sf.briar.lifecycle;
import net.sf.briar.api.lifecycle.LifecycleManager;
import net.sf.briar.api.lifecycle.ShutdownManager;
import net.sf.briar.util.OsUtils;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
......@@ -12,8 +11,7 @@ public class LifecycleModule extends AbstractModule {
protected void configure() {
bind(LifecycleManager.class).to(
LifecycleManagerImpl.class).in(Singleton.class);
if(OsUtils.isWindows())
bind(ShutdownManager.class).to(WindowsShutdownManagerImpl.class);
else bind(ShutdownManager.class).to(ShutdownManagerImpl.class);
bind(ShutdownManager.class).to(
ShutdownManagerImpl.class).in(Singleton.class);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="lib" path="libs/jnotify-0.93.jar"/>
<classpathentry kind="lib" path="libs/jssc-0.9-briar.jar" sourcepath="libs/source/jssc-0.9-briar-source.jar"/>
<classpathentry kind="lib" path="libs/bluecove-2.1.1-SNAPSHOT-briar.jar"/>
<classpathentry kind="lib" path="libs/bluecove-gpl-2.1.1-SNAPSHOT.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
<classpathentry kind="lib" path="/briar-api/libs/android.jar"/>
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry kind="lib" path="libs/jna-3.5.2-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="libs/platform-3.5.2-SNAPSHOT.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-core"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>briar-desktop</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
#Wed Dec 05 20:57:54 GMT 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
<project name='briar-core' default='compile'>
<fileset id='api-jars' dir='../briar-api/libs'>
<include name='*.jar'/>
</fileset>
<fileset id='core-jars' dir='../briar-core/libs'>
<include name='*.jar'/>
</fileset>
<fileset id='desktop-jars' dir='libs'>
<include name='*.jar'/>
</fileset>
<path id='api-classes'>
<pathelement location='../briar-api/build'/>
</path>
<path id='core-classes'>
<pathelement location='../briar-core/build'/>
</path>
<target name='clean'>
<delete dir='../briar-api/build'/>
<delete dir='../briar-core/build'/>
<delete dir='build'/>
</target>
<target name='compile'>
<mkdir dir='../briar-api/build'/>
<javac srcdir='../briar-api/src'
destdir='../briar-api/build' source='1.5' target='1.5'
includeantruntime='false' debug='off'>
<classpath>
<fileset refid='api-jars'/>
</classpath>
</javac>
<mkdir dir='../briar-core/build'/>
<javac srcdir='../briar-core/src'
destdir='../briar-core/build' source='1.5' target='1.5'
includeantruntime='false' debug='off'>
<classpath>
<fileset refid='core-jars'/>
<fileset refid='api-jars'/>
<path refid='api-classes'/>
</classpath>
</javac>
<mkdir dir='build'/>
<javac srcdir='src' destdir='build' source='1.5' target='1.5'
includeantruntime='false' debug='off'>
<classpath>
<fileset refid='desktop-jars'/>
<fileset refid='core-jars'/>
<fileset refid='api-jars'/>
<path refid='core-classes'/>
<path refid='api-classes'/>
</classpath>
</javac>
</target>
</project>
package net.sf.briar.lifecycle;
import net.sf.briar.api.lifecycle.LifecycleManager;
import net.sf.briar.api.lifecycle.ShutdownManager;
import net.sf.briar.util.OsUtils;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
public class DesktopLifecycleModule extends AbstractModule {
protected void configure() {
bind(LifecycleManager.class).to(
LifecycleManagerImpl.class).in(Singleton.class);
if(OsUtils.isWindows()) {
bind(ShutdownManager.class).to(
WindowsShutdownManagerImpl.class).in(
Singleton.class);
} else {
bind(ShutdownManager.class).to(
ShutdownManagerImpl.class).in(Singleton.class);
}
}
}
......@@ -21,7 +21,7 @@ import net.sf.briar.plugins.tcp.WanTcpPluginFactory;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
public class JavaSePluginsModule extends AbstractModule {
public class DesktopPluginsModule extends AbstractModule {
public void configure() {}
......
......@@ -11,7 +11,8 @@
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-core"/>
<classpathentry kind="lib" path="/briar-core/libs/commons-io-2.0.1.jar"/>
<classpathentry kind="lib" path="/briar-core/libs/jnotify-0.93.jar"/>
<classpathentry kind="lib" path="/briar-core/libs/jssc-0.9-briar.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-desktop"/>
<classpathentry kind="lib" path="/briar-desktop/libs/jnotify-0.93.jar"/>
<classpathentry kind="lib" path="/briar-desktop/libs/jssc-0.9-briar.jar" sourcepath="/briar-desktop/libs/source/jssc-0.9-briar-source.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -5,6 +5,9 @@
<fileset id='core-jars' dir='../briar-core/libs'>
<include name='*.jar'/>
</fileset>
<fileset id='desktop-jars' dir='../briar-desktop/libs'>
<include name='*.jar'/>
</fileset>
<fileset id='test-jars' dir='libs'>
<include name='*.jar'/>
</fileset>
......@@ -14,12 +17,16 @@
<path id='core-classes'>
<pathelement location='../briar-core/build'/>
</path>
<path id='desktop-classes'>
<pathelement location='../briar-desktop/build'/>
</path>
<path id='test-classes'>
<pathelement location='build'/>
</path>
<target name='clean'>
<delete dir='../briar-api/build'/>
<delete dir='../briar-core/build'/>
<delete dir='../briar-desktop/build'/>
<delete dir='build'/>
<delete dir='test.tmp'/>
</target>
......@@ -42,13 +49,27 @@
<path refid='api-classes'/>
</classpath>
</javac>
<mkdir dir='../briar-desktop/build'/>
<javac srcdir='../briar-desktop/src'
destdir='../briar-desktop/build' source='1.5' target='1.5'
includeantruntime='false' debug='off'>
<classpath>
<fileset refid='desktop-jars'/>
<fileset refid='core-jars'/>
<fileset refid='api-jars'/>
<path refid='core-classes'/>
<path refid='api-classes'/>
</classpath>
</javac>
<mkdir dir='build'/>
<javac srcdir='src' destdir='build' source='1.5' target='1.5'
includeantruntime='false' debug='off'>
<classpath>
<fileset refid='test-jars'/>
<fileset refid='desktop-jars'/>
<fileset refid='core-jars'/>
<fileset refid='api-jars'/>
<path refid='desktop-classes'/>
<path refid='core-classes'/>
<path refid='api-classes'/>
</classpath>
......@@ -61,13 +82,15 @@
</assertions>
<classpath>
<fileset refid='test-jars'/>
<fileset refid='desktop-jars'/>
<fileset refid='core-jars'/>
<fileset refid='api-jars'/>
<path refid='test-classes'/>
<path refid='desktop-classes'/>
<path refid='core-classes'/>
<path refid='api-classes'/>
</classpath>
<jvmarg value='-Djava.library.path=../briar-core/libs'/>
<jvmarg value='-Djava.library.path=../briar-desktop/libs'/>
<test name='net.sf.briar.LockFairnessTest'/>
<test name='net.sf.briar.ProtocolIntegrationTest'/>
<test name='net.sf.briar.crypto.KeyAgreementTest'/>
......@@ -121,13 +144,15 @@
</assertions>
<classpath>
<fileset refid='test-jars'/>
<fileset refid='desktop-jars'/>
<fileset refid='core-jars'/>
<fileset refid='api-jars'/>
<path refid='test-classes'/>
<path refid='desktop-classes'/>
<path refid='core-classes'/>
<path refid='api-classes'/>
</classpath>
<jvmarg value='-Djava.library.path=../briar-core/libs'/>
<jvmarg value='-Djava.library.path=../briar-desktop/libs'/>
<test name='net.sf.briar.db.H2DatabaseTest'/>
</junit>
</target>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment