Skip to content

Commit

Permalink
Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
Browse files Browse the repository at this point in the history
…elop3d
  • Loading branch information
Alexandre Zollinger Chohfi committed Jan 8, 2013
2 parents 6930dc5 + 8434951 commit cce5918
Show file tree
Hide file tree
Showing 150 changed files with 2,924 additions and 1,043 deletions.
67 changes: 49 additions & 18 deletions Installers/Windows/MonoGame.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SetCompressor /SOLID /FINAL lzma

!define FrameworkPath "C:\Users\Dean\Desktop\MonoGame\"
!define VERSION "3.0"
!define REVISION "0.1"
!define REVISION "0.0"
!define INSTALLERFILENAME "MonoGame"
!define APPNAME "MonoGame"

Expand All @@ -16,16 +16,16 @@ SetCompressor /SOLID /FINAL lzma

!define MUI_UNICON "${FrameworkPath}Installers\monogame.ico"

Name '${APPNAME} ${VERSION} (BETA)'
Name '${APPNAME} ${VERSION}'
OutFile '${INSTALLERFILENAME}Installer-${VERSION}.exe'
InstallDir '$PROGRAMFILES\${APPNAME}\v${VERSION}'
VIProductVersion "${VERSION}.${REVISION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APPNAME} for MonoDevelop"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APPNAME} Development Tools"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "MonoGame"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${APPNAME} Installer"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© Copyright MonoGame 2012"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© Copyright MonoGame 2013"

; Request application privileges for Windows Vista
RequestExecutionLevel admin
Expand Down Expand Up @@ -53,7 +53,7 @@ Section "MonoGame Core Components" ;No components page, name is not important
SectionIn RO
SetOutPath $PROGRAMFILES32\MSBuild\${APPNAME}\v${VERSION}
File '..\monogame.ico'
File /r '..\..\MonoGame.ContentPipeline\ContentProcessors\bin\Release\*.dll'
File /r '..\..\MonoGame.ContentPipeline\ContentProcessors\bin\x86\Release\*.dll'
File '..\..\MonoGame.ContentPipeline\*.targets'
File '..\..\ThirdParty\Libs\NAudio\*.dll'
File '..\..\ThirdParty\Libs\SharpDX\Windows\*.*'
Expand All @@ -64,15 +64,26 @@ Section "MonoGame Core Components" ;No components page, name is not important
File '..\..\ThirdParty\Libs\PVRTexLib\Windows_x86_32\Dll\PVRTexLib.dll'
File /oname=libmojoshader.dll '..\..\ThirdParty\Libs\libmojoshader_32.dll'
File '..\..\ThirdParty\Libs\lame_enc.dll'
File '..\..\ThirdParty\Libs\OUYA\*.dll'

SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies\Android'
File /nonfatal '..\..\MonoGame.Framework\bin\Android\Release\*.dll'
File /nonfatal ' ..\..\MonoGame.Framework\bin\Android\Release\*.xml'

SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies\OUYA'
File /nonfatal '..\..\MonoGame.Framework\bin\OUYA\Release\*.dll'
File /nonfatal ' ..\..\MonoGame.Framework\bin\OUYA\Release\*.xml'
File '..\..\ThirdParty\Libs\OUYA\*.dll'

SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies\WindowsGL'
File /nonfatal '..\..\MonoGame.Framework\bin\WindowsGL\Release\*.dll'
File /nonfatal ' ..\..\MonoGame.Framework\bin\WindowsGL\Release\*.xml'

SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies\Linux'
File /nonfatal '..\..\MonoGame.Framework\bin\Linux\Release\*.dll'
File /nonfatal ' ..\..\MonoGame.Framework\bin\Linux\Release\*.xml'

SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies'
File /x *Windows8.dll '..\..\ThirdParty\Lidgren.Network\bin\Release\*.dll'
File /nonfatal /x *Windows8.xml '..\..\ThirdParty\Lidgren.Network\bin\Release\*.xml'

File /x *Windows8.dll /x *WindowsPhone.dll '..\..\MonoGame.Framework\bin\Release\*.dll'
File /nonfatal /x *Windows8.xml /x *WindowsPhone.xml' ..\..\MonoGame.Framework\bin\Release\*.xml'
File '..\..\ThirdParty\Libs\OpenTK.dll'
File '..\..\ThirdParty\Libs\OpenTK.dll.config'
File '..\..\ThirdParty\Libs\OpenTK_svnversion.txt'
Expand All @@ -81,38 +92,46 @@ Section "MonoGame Core Components" ;No components page, name is not important

SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies\Windows8'

File '..\..\MonoGame.Framework\bin\Release\MonoGame.Framework.Windows8.dll'
File /nonfatal '..\..\MonoGame.Framework\bin\Release\MonoGame.Framework.Windows8.xml'
File '..\..\MonoGame.Framework\bin\Windows8\Release\MonoGame.Framework.dll'
File /nonfatal '..\..\MonoGame.Framework\bin\Windows8\Release\MonoGame.Framework.xml'
File '..\..\ThirdParty\Libs\SharpDX\Windows 8 Metro\*.dll'
File '..\..\ThirdParty\Libs\SharpDX\Windows 8 Metro\*xml'
File '..\..\ThirdParty\Libs\SharpDX\Windows 8 Metro\*.xml'

; Install Windows Phone ARM Assemblies
SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies\WindowsPhone\ARM'

File '..\..\MonoGame.Framework\bin\WindowsPhone\ARM\Release\MonoGame.Framework.WindowsPhone.dll'
File /nonfatal '..\..\MonoGame.Framework\bin\WindowsPhone\ARM\Release\MonoGame.Framework.WindowsPhone.xml'
File '..\..\MonoGame.Framework\bin\WindowsPhone\ARM\Release\MonoGame.Framework.dll'
File /nonfatal '..\..\MonoGame.Framework\bin\WindowsPhone\ARM\Release\MonoGame.Framework.xml'

; Install Windows Phone x86 Assemblies
SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies\WindowsPhone\x86'

File '..\..\MonoGame.Framework\bin\WindowsPhone\x86\Release\MonoGame.Framework.WindowsPhone.dll'
File /nonfatal '..\..\MonoGame.Framework\bin\WindowsPhone\86\Release\MonoGame.Framework.WindowsPhone.xml'
File '..\..\MonoGame.Framework\bin\WindowsPhone\x86\Release\MonoGame.Framework.dll'
File /nonfatal '..\..\MonoGame.Framework\bin\WindowsPhone\86\Release\MonoGame.Framework.xml'

SetOutPath '$PROGRAMFILES\${APPNAME}\v${VERSION}\Assemblies\WindowsPhone'

File /r '..\..\ThirdParty\Libs\SharpDX\Windows Phone\*.dll'
File /r '..\..\ThirdParty\Libs\SharpDX\Windows Phone\*xml'
File /r '..\..\ThirdParty\Libs\SharpDX\Windows Phone\*.xml'

IfFileExists $WINDIR\SYSWOW64\*.* Is64bit Is32bit
Is32bit:
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\WindowsGL'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\Linux'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\Android'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\OUYA'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\Windows8'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\WindowsPhone\ARM'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\WindowsPhone\x86'
GOTO End32Bitvs64BitCheck

Is64bit:
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\WindowsGL'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\Linux'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\Android'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\OUYA'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\Windows8'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\WindowsPhone\ARM'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}' '' '$INSTDIR\Assemblies\WindowsPhone\x86'
Expand Down Expand Up @@ -162,6 +181,18 @@ Section "MonoDevelop Templates"
File /r '..\..\ProjectTemplates\MonoDevelop\MonoDevelop.MonoGame\MonoDevelop.MonoGame\icons\*.*'
SetOutPath "$0AddIns\MonoDevelop.MonoGame\templates"
File /r '..\..\ProjectTemplates\MonoDevelop\MonoDevelop.MonoGame\MonoDevelop.MonoGame\templates\*.*'
SetOutPath "$0AddIns\MonoDevelop.MonoGame\assemblies"
SetOutPath "$0AddIns\MonoDevelop.MonoGame\assemblies\WindowsGL"
File /nonfatal '..\..\MonoGame.Framework\bin\WindowsGL\Release\*.dll'
SetOutPath "$0AddIns\MonoDevelop.MonoGame\assemblies\Android"
File /nonfatal '..\..\MonoGame.Framework\bin\Android\Release\*.dll'
SetOutPath "$0AddIns\MonoDevelop.MonoGame\assemblies\OUYA"
File /nonfatal '..\..\MonoGame.Framework\bin\OUYA\Release\*.dll'
File /nonfatal '..\..\ThirdParty\Libs\OUYA\*.dll'
SetOutPath "$0AddIns\MonoDevelop.MonoGame\assemblies\Linux"
File /nonfatal '..\..\MonoGame.Framework\bin\Linux\Release\*.dll'
SetOutPath "$0AddIns\MonoDevelop.MonoGame\assemblies\MacOS"
SetOutPath "$0AddIns\MonoDevelop.MonoGame\assemblies\iOS"
${EndIf}

SectionEnd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
<Name>MonoGame.Framework.Windows</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.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.
Expand Down
27 changes: 26 additions & 1 deletion MonoGame.Framework/Android/AndroidGameWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ private void Initialize()
this.FocusableInTouchMode = true;

_touchManager = new AndroidTouchEventManager(_game);

#if OUYA
GamePad.Initialize();
#endif
}

protected override void OnLoad (EventArgs e)
Expand All @@ -102,10 +106,17 @@ protected override void OnLoad (EventArgs e)

public override bool OnKeyDown(Keycode keyCode, KeyEvent e)
{
#if OUYA
if (GamePad.OnKeyDown(keyCode, e))
return true;
#endif

Keyboard.KeyDown(keyCode);
// we need to handle the Back key here because it doesnt work any other way
#if !OUYA
if (keyCode == Keycode.Back)
GamePad.Instance.SetBack();
#endif

if (keyCode == Keycode.VolumeUp)
Sound.IncreaseMediaVolume();
Expand All @@ -118,10 +129,24 @@ public override bool OnKeyDown(Keycode keyCode, KeyEvent e)

public override bool OnKeyUp(Keycode keyCode, KeyEvent e)
{
Keyboard.KeyUp(keyCode);
#if OUYA
if (GamePad.OnKeyUp(keyCode, e))
return true;
#endif
Keyboard.KeyUp(keyCode);
return true;
}

#if OUYA
public override bool OnGenericMotionEvent(MotionEvent e)
{
if (GamePad.OnGenericMotionEvent(e))
return true;

return base.OnGenericMotionEvent(e);
}
#endif

protected override void CreateFrameBuffer()
{
Android.Util.Log.Debug("MonoGame", "AndroidGameWindow.CreateFrameBuffer");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void OnSensorChanged(SensorEvent e)
reading.Acceleration = new Vector3(values[0], values[1], values[2]);
reading.Timestamp = DateTime.Now;
}
accelerometer.FireOnCurrentValueChanged(this, new SensorReadingEventArgs<AccelerometerReading>(reading));
accelerometer.CurrentValue = reading;
}
finally
{
Expand Down
2 changes: 1 addition & 1 deletion MonoGame.Framework/Android/Devices/Sensors/Compass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public void OnSensorChanged(SensorEvent e)
// On Android, this is available through Android.Hardware.GeomagneticField, but this requires your geo position.
reading.TrueHeading = reading.MagneticHeading;
reading.Timestamp = DateTime.Now;
compass.FireOnCurrentValueChanged(this, new SensorReadingEventArgs<CompassReading>(reading));
compass.CurrentValue = reading;
}
}
catch (NullReferenceException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public void OnTouchEvent(MotionEvent e)
// CANCEL, OUTSIDE
case MotionEventActions.Cancel:
case MotionEventActions.Outside:
TouchPanel.AddEvent(id, TouchLocationState.Released, position);
for (int i = 0; i < e.PointerCount; i++)
{
id = e.GetPointerId(i);
TouchPanel.AddEvent(id, TouchLocationState.Released, position);
}
break;
}
}
Expand Down
Loading

0 comments on commit cce5918

Please sign in to comment.