public static CrcsProject CreateProject(string fileSystemPath, CrcsSolution solution)
        {
            string projectPath = Path.GetDirectoryName(fileSystemPath);

            if (projectPath == null)
            {
                return(null);
            }
            if (!Directory.Exists(projectPath))
            {
                Directory.CreateDirectory(projectPath);
            }
            var rsproj = new CrcsProject(fileSystemPath, solution);

            rsproj.AddFolder(rsproj.ProjectPath);
            string buildPropFile = FileUtility.FindFile(rsproj.ProjectPath, "build.prop");

            if (File.Exists(buildPropFile))
            {
                rsproj.Properties.ApkToolFrameWorkTag = PropFileUtility.GetProp(buildPropFile, "ro.build.version.incremental");
                rsproj.Properties.ApiLevel            = PropFileUtility.GetProp(buildPropFile, "ro.build.version.sdk");
            }
            else
            {
                rsproj.Properties.ApkToolFrameWorkTag = rsproj.Name;
            }
            rsproj.SetFrameWorkFiles();
            rsproj._initialized = true;
            rsproj.AttachToSystem();
            return(rsproj);
        }
예제 #2
0
        public static CrcsSolution CreateSolution(string fileSystemPath)
        {
            var solution = new CrcsSolution(fileSystemPath);

            MessageEngine.AddDebug(solution, "Solution created: " + fileSystemPath);
            solution.Properties.UpdateZipName = solution.FileNameWithoutExtension;
            solution._initialized             = true;
            return(solution);
        }
 public SolutionPropertiesEditor(CrcsSolution solution)
 {
     _solution = solution;
     InitializeComponent();
     TabTitle = _solution.Name;
     TabToolTip = _solution.FileSystemPath;
     _tools.Refresh(CrcsSettings.Current.ToolsFolder);
     RefreshControls();
 }
 private CrcsProject(string fileSystemPath, CrcsSolution solution)
     : base(fileSystemPath, false, null)
 {
     Solution = solution;
     FrameWorkFolder = FindFrameWorkFolder();
     _properties = new ProjectProperties(this);
     _properties.PropertyChanged += ProjectPropertiesPropertyChanged;
     string apkToolFrameWorkFolder = CrcsSettings.Current.ApkToolFrameWorkFolder;
     FolderUtility.DeleteDirectory(apkToolFrameWorkFolder);
     Directory.CreateDirectory(apkToolFrameWorkFolder);
      //           Project = this;
 }
        private CrcsProject(string fileSystemPath, CrcsSolution solution)
            : base(fileSystemPath, false, null)
        {
            Solution                     = solution;
            FrameWorkFolder              = FindFrameWorkFolder();
            _properties                  = new ProjectProperties(this);
            _properties.PropertyChanged += ProjectPropertiesPropertyChanged;
            string apkToolFrameWorkFolder = CrcsSettings.Current.ApkToolFrameWorkFolder;

            FolderUtility.DeleteDirectory(apkToolFrameWorkFolder);
            Directory.CreateDirectory(apkToolFrameWorkFolder);
            //           Project = this;
        }
        public static CrcsProject OpenProject(string fileSystemPath, CrcsSolution solution)
        {
            var rsproj = new CrcsProject(fileSystemPath, solution);

            rsproj.LoadProjectFile();
            if (rsproj.Properties.FrameWorkFiles.Count() == 0)
            {
                rsproj.SetFrameWorkFiles();
            }
            rsproj._initialized = true;
            rsproj.AttachToSystem();
            return(rsproj);
        }
 public SolutionProperties(CrcsSolution solution)
 {
     _solution = solution;
     _javaExists = !string.IsNullOrWhiteSpace(CrcsSettings.Current.JavaFile);
     _tools.Refresh(CrcsSettings.Current.ToolsFolder);
 }
예제 #8
0
 public SolutionProperties(CrcsSolution solution)
 {
     _solution   = solution;
     _javaExists = !string.IsNullOrWhiteSpace(CrcsSettings.Current.JavaFile);
     _tools.Refresh(CrcsSettings.Current.ToolsFolder);
 }
 public static CrcsSolution OpenSolution(string fileSystemPath)
 {
     var solution = new CrcsSolution(fileSystemPath);
     MessageEngine.AddDebug(solution, "Solution opened: " + fileSystemPath);
     solution.Properties.UpdateZipName = solution.FileNameWithoutExtension;
     solution.LoadSolution();
     solution._initialized = true;
     return solution;
 }
 public static CrcsProject OpenProject(string fileSystemPath, CrcsSolution solution)
 {
     var rsproj = new CrcsProject(fileSystemPath, solution);
     rsproj.LoadProjectFile();
     if (rsproj.Properties.FrameWorkFiles.Count() == 0)
     {
         rsproj.SetFrameWorkFiles();
     }
     rsproj._initialized = true;
     rsproj.AttachToSystem();
     return rsproj;
 }
 public static CrcsProject CreateProject(string fileSystemPath, CrcsSolution solution)
 {
     string projectPath = Path.GetDirectoryName(fileSystemPath);
     if (projectPath == null) return null;
     if (!Directory.Exists(projectPath)) Directory.CreateDirectory(projectPath);
     var rsproj = new CrcsProject(fileSystemPath, solution);
     rsproj.AddFolder(rsproj.ProjectPath);
     string buildPropFile = FileUtility.FindFile(rsproj.ProjectPath, "build.prop");
     if (File.Exists(buildPropFile))
     {
         rsproj.Properties.ApkToolFrameWorkTag = PropFileUtility.GetProp(buildPropFile, "ro.build.version.incremental");
         rsproj.Properties.ApiLevel = PropFileUtility.GetProp(buildPropFile, "ro.build.version.sdk");
     }
     else
     {
         rsproj.Properties.ApkToolFrameWorkTag = rsproj.Name;
     }
     rsproj.SetFrameWorkFiles();
     rsproj._initialized = true;
     rsproj.AttachToSystem();
     return rsproj;
 }
 public void SetSolution(CrcsSolution solution)
 {
     treeViewSolution.Nodes.Clear();
     _nodes.Clear();
     _solution = solution;
     if (solution == null)
     {
         _solutionNode = null;
         return;
     }
     _solutionNode = new ProjectTreeNode(_solution);
     _nodes.Add(_solutionNode);
     var propNode = new TreeNode("Properties", 6, 6) {Tag = _solution};
     _solutionNode.Nodes.Add(propNode);
     treeViewSolution.Nodes.Add(_solutionNode);
     _solution.TreeNode = _solutionNode;
 }