From: <chr...@us...> - 2007-10-30 19:57:45
|
Revision: 1016 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1016&view=rev Author: chreekar Date: 2007-10-30 12:57:43 -0700 (Tue, 30 Oct 2007) Log Message: ----------- Changed the paths of thumbs and DB file to the absolute path gotten from Assemby info instead of just using the working folder Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/Options.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-10-29 21:28:42 UTC (rev 1015) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-10-30 19:57:43 UTC (rev 1016) @@ -38,7 +38,9 @@ public static void launch() { - String path = "database\\" + dbName; + //String path = System.Reflection.Assembly.GetExecutingAssembly().Location; + //path = new FileInfo(path).Directory.Parent.Parent.FullName + @"\database\" + dbName; + String path = Options.getMainFolder() + @"\database\" + dbName; if (!File.Exists(path)) { File.Create(path); Modified: trunk/plugins/MyEmulators/myEmulators/Options.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Options.cs 2007-10-29 21:28:42 UTC (rev 1015) +++ trunk/plugins/MyEmulators/myEmulators/Options.cs 2007-10-30 19:57:43 UTC (rev 1016) @@ -12,10 +12,10 @@ public const int STRING = 2; //Static options - public static String thumb_main = "thumbs\\myEmulators"; - public static String thumb_emulators = "thumbs\\myEmulators\\emulators"; - public static String thumb_previews = "thumbs\\myEmulators\\previews"; - public static String thumb_games = "thumbs\\myEmulators\\games"; + 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"; //Dynamic options private static List<String> bool_names = new List<String>(); @@ -25,6 +25,13 @@ private static List<String> string_names = new List<String>(); private static List<String> string_values = new List<String>(); + public static String getMainFolder() + { + String path = System.Reflection.Assembly.GetExecutingAssembly().Location; + path = new System.IO.FileInfo(path).Directory.Parent.Parent.FullName; + return path; + } + // // ADD OPTION // 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. |