From: <che...@us...> - 2010-01-14 14:28:27
|
Revision: 3353 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3353&view=rev Author: chef_koch Date: 2010-01-14 13:32:58 +0000 (Thu, 14 Jan 2010) Log Message: ----------- added build script fixed some minor issues Modified Paths: -------------- trunk/plugins/MyAlarm/MyAlarm/Alarm.cs trunk/plugins/MyAlarm/MyAlarm/GUIAlarm.cs trunk/plugins/MyAlarm/MyAlarm/Properties/AssemblyInfo.cs Added Paths: ----------- trunk/plugins/MyAlarm/Build/ trunk/plugins/MyAlarm/Build/BUILD_MyAlarm.bat trunk/plugins/MyAlarm/Build/filever.exe Property changes on: trunk/plugins/MyAlarm/Build ___________________________________________________________________ Added: svn:ignore + *.log Added: trunk/plugins/MyAlarm/Build/BUILD_MyAlarm.bat =================================================================== --- trunk/plugins/MyAlarm/Build/BUILD_MyAlarm.bat (rev 0) +++ trunk/plugins/MyAlarm/Build/BUILD_MyAlarm.bat 2010-01-14 13:32:58 UTC (rev 3353) @@ -0,0 +1,54 @@ +@ECHO OFF + +REM set paths +set DeployVersionSVN="..\..\..\..\..\MediaPortal\trunk\Tools\Script & Batch tools\DeployVersionSVN\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" + + +REM Select program path based on current machine environment +set ProgramDir=%ProgramFiles% +if not "%ProgramFiles(x86)%".=="". set ProgramDir=%ProgramFiles(x86)% + + +REM set logfile where the infos are written to, and clear that file +set LOG=build.log +echo. > %LOG% + + +echo. +echo -= MyAlarm =- +echo -=====================- +echo. + + +echo. +echo Writing SVN revision assemblies... +%DeployVersionSVN% /svn=".." >> %LOG% + + +echo. +echo Building MyAlarm... +"%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;AllowUnsafeBlocks=true "..\MyAlarm.sln" >> %LOG% + + +echo. +echo Reverting assemblies... +%DeployVersionSVN% /svn=".." /revert >> %LOG% + + +echo. +echo Reading the version number... +set plugindll=..\MyAlarm\bin\Release\MyAlarm.dll +if not exist "%plugindll%" goto version_error +for /f "Tokens=5" %%a in ('filever "%plugindll%"') do set version=%%a +goto :version_done +:version_error +echo "MyAlarm.dll not found. version could not be read" >> %LOG% +goto :EOF +:version_done + +echo %version% +pause + +echo Building MpeExtension package... +"%ProgramDir%\Team MediaPortal\MediaPortal\MpeMaker.exe" "..\MyAlarm.xmp2" /V=%version% /B >> %LOG% + Added: trunk/plugins/MyAlarm/Build/filever.exe =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyAlarm/Build/filever.exe ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/MyAlarm/MyAlarm/Alarm.cs =================================================================== --- trunk/plugins/MyAlarm/MyAlarm/Alarm.cs 2010-01-14 12:33:22 UTC (rev 3352) +++ trunk/plugins/MyAlarm/MyAlarm/Alarm.cs 2010-01-14 13:32:58 UTC (rev 3353) @@ -76,6 +76,8 @@ LastTriggeredTime = new DateTime(1901, 1, 1); MediaType = MediaType.File; + Sound = String.Empty; + Playlist = String.Empty; playlistPlayer = PlayListPlayer.SingletonPlayer; @@ -567,7 +569,7 @@ if (GUIGraphicsContext.IsFullScreenVideo) return; - string filePath = Path.Combine(Settings.PlaylistPath, Sound); + string filePath = Path.Combine(Settings.PlaylistPath, Playlist); if (!PlayListFactory.IsPlayList(filePath) || !File.Exists(filePath)) { GUIAlarm.ShowErrorDialog(); @@ -665,7 +667,7 @@ //play file again, increment loop counter if (_repeatCount > Settings.RepeatCount) return; - g_Player.Play(Path.Combine(Settings.SoundPath, Sound)); + g_Player.Play(filename); _repeatCount++; } Modified: trunk/plugins/MyAlarm/MyAlarm/GUIAlarm.cs =================================================================== --- trunk/plugins/MyAlarm/MyAlarm/GUIAlarm.cs 2010-01-14 12:33:22 UTC (rev 3352) +++ trunk/plugins/MyAlarm/MyAlarm/GUIAlarm.cs 2010-01-14 13:32:58 UTC (rev 3353) @@ -57,7 +57,6 @@ internal const int WINDOW_ALARM = 5000; - public const string VERSION = "0.3.0.0"; public const string DESCRIPTION = "This plugin plays a file or playlist to wake you up in the morning."; #endregion @@ -148,17 +147,22 @@ base.OnAction(action); } + + protected override void OnPageLoad() + { + ReloadFacade(); + } public override bool OnMessage(GUIMessage message) { switch (message.Message) { - case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: - { - base.OnMessage(message); - ReloadFacade(); - return true; - } + //case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: + // { + // base.OnMessage(message); + // ReloadFacade(); + // return true; + // } case GUIMessage.MessageType.GUI_MSG_CLICKED: { @@ -218,11 +222,11 @@ GUIListItem currItem = new GUIListItem(); currItem.Label = alarm.Name; - //set proper label - if (alarm.Recurring) - currItem.Label2 = alarm.DaysEnabled + " " + alarm.Time.ToShortTimeString(); - else - currItem.Label2 = alarm.Time.ToShortDateString() + " " + alarm.Time.ToShortTimeString(); + ////set proper label + //if (alarm.Recurring) + // currItem.Label2 = alarm.DaysEnabled + " " + alarm.Time.ToShortTimeString(); + //else + // currItem.Label2 = alarm.Time.ToShortDateString() + " " + alarm.Time.ToShortTimeString(); currItem.MusicTag = alarm; //currItem.IconImage = alarm.GetIcon; @@ -275,7 +279,6 @@ if (_facade.SelectedListItem == null) return; _selectedIndex = _facade.SelectedListItemIndex; - LogVerbose("SyncFromFacade() SelectedIndex={0}", _selectedIndex); Alarm selectedAlarmInFacade = _facade.SelectedListItem.MusicTag as Alarm; if (SelectedAlarm != selectedAlarmInFacade) Modified: trunk/plugins/MyAlarm/MyAlarm/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyAlarm/MyAlarm/Properties/AssemblyInfo.cs 2010-01-14 12:33:22 UTC (rev 3352) +++ trunk/plugins/MyAlarm/MyAlarm/Properties/AssemblyInfo.cs 2010-01-14 13:32:58 UTC (rev 3353) @@ -55,5 +55,5 @@ // Revision // -[assembly: AssemblyVersion(GUIAlarm.VERSION)] -[assembly: AssemblyFileVersion(GUIAlarm.VERSION)] \ No newline at end of file +[assembly: AssemblyVersion("0.3.0.0")] +[assembly: AssemblyFileVersion("0.3.0.0")] \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |