Skip to content

Commit

Permalink
RPDBFTHREE-1: Initial Windows Phone 7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasbybro committed Nov 28, 2011
1 parent b6fc1d9 commit 086f5f5
Show file tree
Hide file tree
Showing 9 changed files with 157 additions and 0 deletions.
7 changes: 7 additions & 0 deletions com.mobilesorcery.sdk.builder.winmobile.feature/feature.xml
Expand Up @@ -81,4 +81,11 @@ info-zip-license.txt covers Info-Zip.
version="0.0.0"
unpack="false"/>

<plugin
id="com.mobilesorcery.sdk.builder.winmobilecs"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
7 changes: 7 additions & 0 deletions com.mobilesorcery.sdk.builder.winmobilecs/.classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
28 changes: 28 additions & 0 deletions com.mobilesorcery.sdk.builder.winmobilecs/.project
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.mobilesorcery.sdk.builder.winmobilecs</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,8 @@
#Mon Nov 28 14:48:28 CET 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
13 changes: 13 additions & 0 deletions com.mobilesorcery.sdk.builder.winmobilecs/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Winmobilecs
Bundle-SymbolicName: com.mobilesorcery.sdk.builder.winmobilecs;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.mobilesorcery.sdk.builder.winmobilecs.WinMobileCSPlugin
Bundle-Vendor: MOBILESORCERY
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package: com.mobilesorcery.sdk.core,
com.mobilesorcery.sdk.profiles
5 changes: 5 additions & 0 deletions com.mobilesorcery.sdk.builder.winmobilecs/build.properties
@@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
12 changes: 12 additions & 0 deletions com.mobilesorcery.sdk.builder.winmobilecs/plugin.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="com.mobilesorcery.core.packagers">
<packager
implementation="com.mobilesorcery.sdk.builder.winmobilecs.WinMobileCSPackager"
pattern="^profiles[/|\\]runtimes[/|\\]winphone.*">
</packager>
</extension>

</plugin>
@@ -0,0 +1,27 @@
package com.mobilesorcery.sdk.builder.winmobilecs;

import java.io.File;

import com.mobilesorcery.sdk.core.DefaultPackager;
import com.mobilesorcery.sdk.core.IBuildVariant;
import com.mobilesorcery.sdk.core.MoSyncProject;
import com.mobilesorcery.sdk.core.PackageToolPackager;
import com.mobilesorcery.sdk.profiles.IProfile;

public class WinMobileCSPackager extends PackageToolPackager {

@Override
public File computeBuildResult(MoSyncProject project, IBuildVariant variant) {
DefaultPackager internal = new DefaultPackager(project, variant);
File csProjFile = new File(
internal.resolve("%package-output-dir%/project/mosync.csproj"));
// Please note: not a full app yet!
return csProjFile;
}

@Override
public String getGenerateMode(IProfile profile) {
return BUILD_GEN_CS_MODE;
}

}
@@ -0,0 +1,50 @@
package com.mobilesorcery.sdk.builder.winmobilecs;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle
*/
public class WinMobileCSPlugin extends AbstractUIPlugin {

// The plug-in ID
public static final String PLUGIN_ID = "com.mobilesorcery.sdk.builder.winmobilecs"; //$NON-NLS-1$

// The shared instance
private static WinMobileCSPlugin plugin;

/**
* The constructor
*/
public WinMobileCSPlugin() {
}

/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}

/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static WinMobileCSPlugin getDefault() {
return plugin;
}

}

0 comments on commit 086f5f5

Please sign in to comment.