This project is read-only.

Trying to compile from source

Aug 31, 2014 at 12:34 AM

I'm trying to recompile the source under Visual Studio Express 2013, and I have a few questions:
  1. As of the last revision (110020) There seems to be several directories with different branches of the code. Can you explain the difference between all those branches and which one should I use?
  2. I tried compiling one of the branches and it failed due to password-protcted Auxiliary/flickrsync.pfx . I assume this file contains your own API key for flickr. How do I create my own file? I'm not really familiar with C# (I know C++) and Microsoft's tool, but I want to start trying to do my own simple patch.
Aug 31, 2014 at 6:45 AM
Ok, I made some progress:
  1. I managed to bypass the key issue which seems to be due to code signing, using this:
  2. I wanted to implement this patch:
But the code seems to be non working. After some googling, I managed to change it enough so that it compiles and runs as expected:
(I used DevBranch2014/... I hope this is the right one!)
I apologize in advance if the coding style is not OK. I don't really know C#. I know some C++ and know how to google for the C# equivalents I need.
(And above all, the original patch wasn't mine).
-------------------- DevBranch2014/Generics/TreeFolders.cs --------------------
index 1adb069..a186c7b 100644
@@ -7,8 +7,26 @@ using System.Drawing;
 using System.IO;
 using TreeViewMS;
 namespace Common.Controls
+    public class NameComparator : System.Collections.IComparer
+    {
+        int IComparer.Compare(Object dir1, Object dir2)
+        {
+            //parameter are of type Object, so we have to downcast it to Employee objects
+            String dir1Name = ((DirectoryInfo)dir1).Name;
+            String dir2Name = ((DirectoryInfo)dir2).Name;
+            //uses compareTo method of String class to compare names of the employee
+            return dir1Name.CompareTo(dir2Name);
+        }
+    }
     class TreeFolders : TreeViewMS.TreeViewMS
         bool IsEditing = false;
@@ -112,6 +130,8 @@ namespace Common.Controls
             DirectoryInfo dirorg = new DirectoryInfo(path);
             DirectoryInfo[] dirs = dirorg.GetDirectories();
+            System.Array.Sort(dirs, new NameComparator());
             foreach (DirectoryInfo di in dirs)
                 // do not show Hidden System folders or Reparse Points (Junctions)
Aug 31, 2014 at 11:41 PM
That looks good. I have been having a bit more time lately to update flickrsync. I'll try to include that in the next update.