Permalink
Browse files

Android specific projects - work in progress

This is the beginnings of the android specific project files.
  • Loading branch information...
1 parent 4595b2e commit 197fd20d47aa3a2a4ac29c9331a7c1e4521831b4 @totallyevil totallyevil committed Aug 23, 2012
Showing with 1,474 additions and 34 deletions.
  1. BIN Android/MonoGame3D/Lidgren.Network.Android.dll
  2. BIN Android/MonoGame3D/MonoGame.Framework.Android.dll
  3. +8 −2 CocosDenshion/CocosDenshion.Android.csproj
  4. +115 −0 HelloCocos2d/HelloCocos2d/HelloCocos2d.Android.csproj
  5. +34 −1 HelloCocos2d/HelloCocos2d/Program.cs
  6. +10 −0 HelloCocos2d/HelloCocos2d/Properties/AndroidManifest.xml
  7. +44 −0 HelloCocos2d/HelloCocos2d/Resources/AboutResources.txt
  8. +65 −0 HelloCocos2d/HelloCocos2d/Resources/Resource.designer.cs
  9. BIN HelloCocos2d/HelloCocos2d/Resources/drawable/ic_launcher.png
  10. BIN HelloCocos2d/HelloCocos2d/Resources/drawable/splash.png
  11. +10 −0 HelloCocos2d/HelloCocos2d/Resources/values/Styles.xml
  12. +4 −0 HelloCocos2d/HelloCocos2d/Resources/values/strings.xml
  13. BIN HelloCocos2d/HelloCocos2dContent/Thumbs.db
  14. +1 −15 cocos2d-xna.Android.sln
  15. +11 −9 cocos2d-xna/cocos2d-xna.Android.csproj
  16. +4 −4 cocos2d.Content.Pipeline.Importers/cocos2d.Content.Pipeline.Importers.Android.csproj
  17. +6 −3 cocos2d.Framework/cocos2d.Framework.Android.csproj
  18. +19 −0 tests/tests/Assets/AboutAssets.txt
  19. BIN tests/tests/Assets/Content/fonts/Arial.xnb
  20. BIN tests/tests/Assets/Content/fonts/fnt/images/verdana24_0.xnb
  21. BIN tests/tests/Assets/Content/fonts/fnt/images/verdana32_0.xnb
  22. BIN tests/tests/Assets/Content/fonts/fnt/verdana24.xnb
  23. BIN tests/tests/Assets/Content/fonts/fnt/verdana32.xnb
  24. +33 −0 tests/tests/Program.cs
  25. +10 −0 tests/tests/Properties/AndroidManifest.xml
  26. +44 −0 tests/tests/Resources/AboutResources.txt
  27. +65 −0 tests/tests/Resources/Resource.designer.cs
  28. BIN tests/tests/Resources/drawable/ic_launcher.png
  29. BIN tests/tests/Resources/drawable/splash.png
  30. +10 −0 tests/tests/Resources/values/Styles.xml
  31. +4 −0 tests/tests/Resources/values/strings.xml
  32. +977 −0 tests/tests/tests.Android.csproj
Binary file not shown.
Binary file not shown.
@@ -21,7 +21,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\AnyCPU\Debug</OutputPath>
+ <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;ANDROID,CC_FONT_LABEL_SUPPORT,CC_DIRECTOR_FAST_FPS,CC_DIRECTOR_MAC_USE_DISPLAY_LINK_THREAD,CC_COCOSNODE_RENDER_SUBPIXEL,CC_SPRITEBATCHNODE_RENDER_SUBPIXEL,CC_USES_VBO,CC_NODE_TRANSFORM_USING_AFFINE_MATRIX,CC_OPTIMIZE_BLEND_FUNC_FOR_PREMULTIPLIED_ALPHA</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -37,6 +37,12 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Lidgren.Network.Android">
+ <HintPath>..\Android\MonoGame3D\Lidgren.Network.Android.dll</HintPath>
+ </Reference>
+ <Reference Include="MonoGame.Framework.Android">
+ <HintPath>..\Android\MonoGame3D\MonoGame.Framework.Android.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="Mono.Android" />
<Reference Include="OpenTK" />
@@ -49,7 +55,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\cocos2d-xna\cocos2d-xna.csproj">
+ <ProjectReference Include="..\cocos2d-xna\cocos2d-xna.Android.csproj">
<Project>{47EE6CE6-493D-4967-944A-5E55B71AA9FD}</Project>
<Name>cocos2d-xna</Name>
</ProjectReference>
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{2076D138-759C-465F-BC67-5BE580C54216}</ProjectGuid>
+ <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>HelloCocos2d</RootNamespace>
+ <AssemblyName>HelloCocos2d</AssemblyName>
+ <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
+ <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+ <AndroidResgenClass>Resource</AndroidResgenClass>
+ <AndroidApplication>True</AndroidApplication>
+ <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
+ <AssemblyName>tests</AssemblyName>
+ <AndroidSupportedAbis>armeabi%3barmeabi-v7a%3bx86</AndroidSupportedAbis>
+ <AndroidStoreUncompressedFileExtensions />
+ <MandroidI18n />
+ <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;TRACE;ANDROID;MONOGAME</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <AndroidLinkMode>None</AndroidLinkMode>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <DefineConstants>TRACE;ANDROID;MONOGAME</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <AndroidLinkMode>SdkOnly</AndroidLinkMode>
+ <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
+ <AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Lidgren.Network.Android">
+ <HintPath>..\..\Android\MonoGame3D\Lidgren.Network.Android.dll</HintPath>
+ </Reference>
+ <Reference Include="MonoGame.Framework.Android">
+ <HintPath>..\..\Android\MonoGame3D\MonoGame.Framework.Android.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="Mono.Android" />
+ <Reference Include="OpenTK" />
+ <Reference Include="ICSharpCode.SharpZipLib">
+ <HintPath>..\..\cocos2d-xna\external lib\ICSharpCode.SharpZipLib.dll</HintPath>
+ </Reference>
+ <Reference Include="zlib.net">
+ <HintPath>..\..\cocos2d-xna\external lib\zlib.net.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Classes\AppDelegate.cs" />
+ <Compile Include="Classes\HelloWorldScene.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="Game1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Properties\AndroidManifest.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="background.png">
+ <Link>Assets\Content\background.png</Link>
+ </AndroidAsset>
+ <AndroidAsset Include="..\HelloCocos2dContent\SpriteFont1.spritefont">
+ <Link>Assets\Content\SpriteFont1.spritefont</Link>
+ </AndroidAsset>
+ <AndroidAsset Include="..\HelloCocos2dContent\fonts\Arial.spritefont">
+ <Link>Assets\Content\fonts\Arial.spritefont</Link>
+ </AndroidAsset>
+ <AndroidAsset Include="..\HelloCocos2dContent\CloseNormal.png">
+ <Link>Assets\Content\CloseNormal.png</Link>
+ </AndroidAsset>
+ <AndroidAsset Include="..\HelloCocos2dContent\CloseSelected.png">
+ <Link>Assets\Content\CloseSelected.png</Link>
+ </AndroidAsset>
+ <AndroidAsset Include="..\HelloCocos2dContent\HelloWorld.png">
+ <Link>Assets\Content\HelloWorld.png</Link>
+ </AndroidAsset>
+ <AndroidResource Include="Resources\values\Styles.xml" />
+ <AndroidResource Include="Resources\drawable\ic_launcher.png" />
+ <AndroidResource Include="Resources\drawable\splash.png" />
+ <AndroidResource Include="Resources\values\strings.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\cocos2d-xna\cocos2d-xna.Android.csproj">
+ <Project>{47EE6CE6-493D-4967-944A-5E55B71AA9FD}</Project>
+ <Name>cocos2d-xna</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+ <!--
+ To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
@@ -1,6 +1,15 @@
using System;
+#if ANDROID
+using Android.App;
+using Android.Content;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+#endif
+using Microsoft.Xna.Framework;
-namespace HelloCocos2d
+namespace tests
{
#if WINDOWS || XBOX
static class Program
@@ -17,5 +26,29 @@ static void Main(string[] args)
}
}
#endif
+#if ANDROID
+ [Activity(Label = "Hello Cocos2d",
+ MainLauncher = true,
+ Icon = "@drawable/ic_launcher",
+ Theme = "@style/Theme.NoTitleBar",
+ ScreenOrientation = Android.Content.PM.ScreenOrientation.Landscape,
+ LaunchMode = Android.Content.PM.LaunchMode.SingleInstance,
+ ConfigurationChanges = Android.Content.PM.ConfigChanges.KeyboardHidden)]
+ public class TestsActivity : AndroidGameActivity
+ {
+ protected override void OnCreate(Bundle bundle)
+ {
+ base.OnCreate(bundle);
+
+ // Create our OpenGL view, and display it
+ Game1.Activity = this;
+ var g = new Game1();
+ SetContentView(g.Window);
+ g.Run();
+ }
+
+ }
+
+#endif
}
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="HelloCocos2d" android:versionCode="1" android:versionName="1.0" android:installLocation="internalOnly">
+ <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
+ <supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" />
+ <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+ <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar">
+ </application>
+</manifest>
@@ -0,0 +1,44 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included
+in your application as resource files. Various Android APIs are designed to
+operate on the resource IDs instead of dealing with images, strings or binary blobs
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.axml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+ drawable/
+ icon.png
+
+ layout/
+ main.axml
+
+ values/
+ strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource". The native Android APIs do not operate directly with filenames, but
+instead operate on resource IDs. When you compile an Android application that uses resources,
+the build system will package the resources for distribution and generate a class called "R"
+(this is an Android convention) that contains the tokens for each one of the resources
+included. For example, for the above Resources layout, this is what the R class would expose:
+
+public class R {
+ public class drawable {
+ public const int icon = 0x123;
+ }
+
+ public class layout {
+ public const int main = 0x456;
+ }
+
+ public class strings {
+ public const int first_string = 0xabc;
+ public const int second_string = 0xbcd;
+ }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
+to reference the layout/main.axml file, or R.strings.first_string to reference the first
+string in the dictionary file values/strings.xml.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="Theme.Splash" parent="android:Theme">
+ <item name="android:windowBackground">@drawable/splash</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+ <style name="Theme.NoTitleBar" parent="android:Theme">
+ <item name="android:windowNoTitle">true</item>
+ </style>
+</resources>
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">hello cocos2d</string>
+</resources>
Binary file not shown.
View
@@ -5,14 +5,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloCocos2d", "HelloCocos2
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cocos2d-xna.Android", "cocos2d-xna\cocos2d-xna.Android.csproj", "{47EE6CE6-493D-4967-944A-5E55B71AA9FD}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "tests\tests\tests.Android.csproj", "{B7642AB5-22DD-4A5F-BF4C-68F8A3BA8525}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests.Android", "tests\tests\tests.Android.csproj", "{B7642AB5-22DD-4A5F-BF4C-68F8A3BA8525}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CocosDenshion.Android", "CocosDenshion\CocosDenshion.Android.csproj", "{F028609A-7A53-4F01-8939-5B823285EC10}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cocos2d.Framework.Android", "cocos2d.Framework\cocos2d.Framework.Android.csproj", "{CC156337-B4A7-479F-9262-9A708B5E1164}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cocos2d.Content.Pipeline.Importers.Android", "cocos2d.Content.Pipeline.Importers\cocos2d.Content.Pipeline.Importers.Android.csproj", "{FBE4633D-00D1-4391-8184-63B91DA28D4B}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -81,18 +79,6 @@ Global
{CC156337-B4A7-479F-9262-9A708B5E1164}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CC156337-B4A7-479F-9262-9A708B5E1164}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CC156337-B4A7-479F-9262-9A708B5E1164}.Release|x86.ActiveCfg = Release|Any CPU
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Debug|Any CPU.ActiveCfg = Debug|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Debug|Any CPU.Build.0 = Debug|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Debug|x86.ActiveCfg = Debug|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Debug|x86.Build.0 = Debug|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|Any CPU.ActiveCfg = Release|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|Any CPU.Build.0 = Release|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|Mixed Platforms.Build.0 = Release|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|x86.ActiveCfg = Release|x86
- {FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Oops, something went wrong.

0 comments on commit 197fd20

Please sign in to comment.