From: <Chr...@us...> - 2008-05-26 12:45:38
|
Revision: 1813 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1813&view=rev Author: Chreekar Date: 2008-05-26 05:45:33 -0700 (Mon, 26 May 2008) Log Message: ----------- use of Config.GetFile() instead of Reflection.Assembly to find out where the DB file and Thumbs folder are located Modified Paths: -------------- trunk/plugins/MyEmulators/Readme.txt trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/Options.cs trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt 2008-05-26 05:13:24 UTC (rev 1812) +++ trunk/plugins/MyEmulators/Readme.txt 2008-05-26 12:45:33 UTC (rev 1813) @@ -7,6 +7,7 @@ CHANGELOG ------------------------------------------- v1.9 +-Support for Windows Vista and MP RC1 -Execute PC games, or other programs without arguments. See USAGE below for instructions. -Support for using .bat files as emulators Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-05-26 05:13:24 UTC (rev 1812) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-05-26 12:45:33 UTC (rev 1813) @@ -40,7 +40,7 @@ public static void launch() { - String path = Options.getMainFolder() + @"\database\" + dbName; + String path = Config.GetFile(Config.Dir.Database, dbName); sqlDB = new SQLiteClient(path); createDBs(); try @@ -127,6 +127,7 @@ //Saving version info in DB, even if pressing Cancel saveOptions(DB.SaveInfo.ONLY_VERSION_INFO); } + //Create thumbnail directories if (!Directory.Exists(Options.thumb_main)) { Modified: trunk/plugins/MyEmulators/myEmulators/Options.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Options.cs 2008-05-26 05:13:24 UTC (rev 1812) +++ trunk/plugins/MyEmulators/myEmulators/Options.cs 2008-05-26 12:45:33 UTC (rev 1813) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using MediaPortal.Configuration; namespace myEmulators { @@ -12,10 +13,10 @@ public const int STRING = 2; //Static options - public static String thumb_main = getMainFolder() + @"\thumbs\myEmulators"; - public static String thumb_emulators = getMainFolder() + @"\thumbs\myEmulators\emulators"; - public static String thumb_previews = getMainFolder() + @"\thumbs\myEmulators\previews"; - public static String thumb_games = getMainFolder() + @"\thumbs\myEmulators\games"; + public static String thumb_main = getThumbsFolder() + @"\myEmulators"; + public static String thumb_emulators = getThumbsFolder() + @"\myEmulators\emulators"; + public static String thumb_previews = getThumbsFolder() + @"\myEmulators\previews"; + public static String thumb_games = getThumbsFolder() + @"\myEmulators\games"; //Dynamic options private static List<String> bool_names = new List<String>(); @@ -25,11 +26,10 @@ private static List<String> string_names = new List<String>(); private static List<String> string_values = new List<String>(); - public static String getMainFolder() + //Folder location + public static String getThumbsFolder() { - String path = System.Reflection.Assembly.GetExecutingAssembly().Location; - path = new System.IO.FileInfo(path).Directory.Parent.Parent.FullName; - return path; + return Config.GetFolder(Config.Dir.Thumbs); } // Modified: trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj =================================================================== --- trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2008-05-26 05:13:24 UTC (rev 1812) +++ trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2008-05-26 12:45:33 UTC (rev 1813) @@ -22,7 +22,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>bin\Debug\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |