<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -76,7 +76,6 @@ class HtmlElement
         raise e
       end
     else
-      # TODO: want to do EventHandler.of(HtmlEventArgs) to get proper arguments back
       unless attach_event(m.to_s.to_clr_string, System::EventHandler.of(HtmlEventArgs).new(&amp;block))
         raise e
       end</diff>
      <filename>lib/ruby/lib/helpers/html/patch.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,6 +11,8 @@ class Animation::Base
 end
 
 class BounceAnimation &lt; Animation::Base
+  attr_reader :name
+
   def initialize(scale_transform_element)
     @name = random_name
     # NOTE that we don't need to name the storyboard element anymore! - can 
@@ -30,9 +32,4 @@ class BounceAnimation &lt; Animation::Base
       end
     end
   end
-
-  # TODO: cannot attr_reader :name
-  def name
-    @name
-  end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/ruby/lib/helpers/wpf/animation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,36 +1,11 @@
 module XAP
-  include System
-  include System::IO
-  include System::Windows::Resources
+  include Microsoft::Scripting::Silverlight
   
   def self.get_file_contents(relative_path_or_uri)
-    if relative_path_or_uri.class == String || relative_path_or_uri.class == ClrString
-      get_file_contents(Uri.new(normalize_path(relative_path_or_uri), UriKind.relative))
-    elsif relative_path_or_uri.class == Uri
-      file = get_file(relative_path_or_uri)
-      return nil if file.nil?
-      sr = StreamReader.new(file)
-      result = sr.read_to_end
-      sr.close()
-      return result
-    end
+    Package.get_file_contents(relative_path_or_uri)
   end
   
   def self.get_file(relative_path_or_uri)
-    if relative_path_or_uri.class == String || relative_path_or_uri.class == ClrString
-      get_file(Uri.new(normalize_path(relative_path_or_uri), UriKind.relative))
-    elsif relative_path_or_uri.class == Uri
-      sri = Application.get_resource_stream(relative_path_or_uri)
-      return nil if sri.nil?
-      sri.stream
-    end
+    Package.get_file(relative_path_or_uri)
   end
-  
-  private
-  
-    def self.normalize_path(path)
-      # files are stores in the XAP using forward slashes
-      path.to_clr_string.replace(Path.directory_separator_char.to_string, &quot;/&quot;).to_s
-    end
-  
 end</diff>
      <filename>lib/ruby/lib/helpers/xap.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
-
+#
 # Filling in the holes of IronRuby
+#
 
 # Add the Ruby standard library to the path
 $: &lt;&lt; &quot;lib/std&quot;</diff>
      <filename>lib/ruby/lib/patch.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 include System
 include System::Windows
-require 'lib/helpers/debug'
 
 $PARAMS = {}
 Application.current.init_params.collect do |pair|</diff>
      <filename>lib/ruby/silverlight.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,6 +36,7 @@ namespace Chiron {
         static bool _saveManifest;
         static string _error;
         static string _startPage;
+        static string[] _localPath;
 
         // these properties are lazy loaded so we don't parse the configuration file unless necessary
         static AppManifestTemplate _ManifestTemplate;
@@ -184,6 +185,7 @@ Options:
             _silent = false;
             _nologo = false;
             _help = false;
+            _localPath = new string[]{ };
 
             foreach (string option in args) {
                 if (option[0] != '-' &amp;&amp; option[0] != '/') {
@@ -253,6 +255,9 @@ Options:
                     _browser = true;
                     _webserver = true;
                     break;
+                case &quot;path&quot;:
+                    ParseAndSetLocalPath(val);
+                    break;
                 case &quot;m&quot;: case &quot;manifest&quot;:
                     _saveManifest = true;
                     break;
@@ -282,6 +287,20 @@ Options:
                 _help = true;
         }
 
+        internal static void ParseAndSetLocalPath(string pathString) {
+            var __path = new List&lt;string&gt;();
+            string[] paths = pathString.Split(';');
+            foreach (string path in paths) {
+                var fullPath = path;
+                if (!Path.IsPathRooted(path)) 
+                    fullPath = Path.Combine(ChironPath(), path);
+                if (Directory.Exists(fullPath)) {
+                    __path.Add(fullPath);
+                }
+            }
+            _localPath = __path.ToArray();
+        }
+
         public static void Log(int statusCode, string uri, int byteCount, string message) {
             if (!_silent) {
                 if (string.IsNullOrEmpty(message)) {
@@ -295,6 +314,9 @@ Options:
             }
         }
 
+        internal static string[] LocalPath {
+            get { return _localPath; }
+        }
 
         internal static AppManifestTemplate ManifestTemplate {
             get {
@@ -355,19 +377,22 @@ Options:
             }
         }
 
+        private static string ChironPath() {
+            return Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath);
+        }
+
         // Looks for a DLR/language assembly relative to Chiron.exe
         // The path is set in localAssemblyPath in Chiron.exe.config's appSettings section
         internal static string TryGetAssemblyPath(string name) {
             if (_LocalAssemblyPath == null) {
-                string chironPath = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath);
 
                 _LocalAssemblyPath = ConfigurationManager.AppSettings[&quot;localAssemblyPath&quot;] ?? &quot;&quot;;
                 if (!Path.IsPathRooted(_LocalAssemblyPath)) {
-                    _LocalAssemblyPath = Path.Combine(chironPath, _LocalAssemblyPath);
+                    _LocalAssemblyPath = Path.Combine(ChironPath(), _LocalAssemblyPath);
                 }
                 if (!Directory.Exists(_LocalAssemblyPath)) {
                     // fallback to Chiron install location
-                    _LocalAssemblyPath = chironPath;
+                    _LocalAssemblyPath = ChironPath();
                 }
             }
 </diff>
      <filename>src/Chiron/Chiron.cs</filename>
    </modified>
    <modified>
      <diff>@@ -57,9 +57,15 @@ namespace Chiron {
 
             GenerateLanguagesConfig(zip, langs);
 
+            // add directories that are on Chiron's path
+            foreach (var path in Chiron.LocalPath) {
+                string[] splitPath = path.Split(Path.DirectorySeparatorChar);
+                zip.CopyFromDirectory(path, splitPath[splitPath.Length - 1]);
+            }
+
             // add files on disk last so they always overwrite generated files
             zip.CopyFromDirectory(dir, &quot;&quot;);
-            
+
             zip.Close();
         }
 </diff>
      <filename>src/Chiron/XapBuilder.cs</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/ruby/lib/helpers/debug.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>ccd9ad7894714c567df2f85a290b6e5b78faab55</id>
    </parent>
  </parents>
  <author>
    <name>Jimmy Schementi</name>
    <email>jschementi@gmail.com</email>
  </author>
  <url>http://github.com/jschementi/agdlr/commit/58325facb309d5c69802f8e3325c2eaeeb3ad643</url>
  <id>58325facb309d5c69802f8e3325c2eaeeb3ad643</id>
  <committed-date>2009-03-05T13:25:37-08:00</committed-date>
  <authored-date>2009-03-04T14:52:00-08:00</authored-date>
  <message>Add &quot;/path&quot; option to Chiron for a &quot;;&quot;-separated list of folders to get included into the XAP</message>
  <tree>0f9cf8a1a447f57ae2e2e784ec3a8afe9ba6aa01</tree>
  <committer>
    <name>Jimmy Schementi</name>
    <email>jschementi@gmail.com</email>
  </committer>
</commit>
