Ejemplo n.º 1
0
        /// <summary>
        /// Creates/Open a directory. This will be the installation directory.
        /// </summary>
        public Dir()
        {
            //Setting path to the NSIS variable '$INSTDIR'.
            this.Path = "$INSTDIR";

            this.Files = new List<File>();

            //Root.
            this.dirinstances = new DirInstance(this);
            //this.instances = new Dictionary<string, Dir>();
            //this.instances.Add("root", this);
        }
Ejemplo n.º 2
0
 private void CheckIfCurrentDirectoryIsNotRoot()
 {
     if (!this.root)
     {
         //Checking if an instance of 'instances' exist.
         //This is not necessary, since root/subdir is already determined, but this will make sure that no weird stuff is happening.
         if (this.dirinstances != null)
         {
             if (this.dirinstances.instances.Count == 0)
             {
                 //Root.
                 this.dirinstances.AddDirectoryInstance(this, true);
             }
             else
             {
                 //Subdirectory.
                 this.dirinstances.AddDirectoryInstance(this, false);
             }
         }
         else
         {
             //Root.
             this.dirinstances = new DirInstance(this);
         }
     }
 }