Пример #1
0
        protected void CreateDictionaryForMIDs(PublicationInformation projInfo)
        {
            var output = new DictionaryForMIDsStreamWriter(projInfo);

            Debug.Assert(output.Directory != null);

            string assemblyPath = Common.AssemblyPath;

            var DictionaryForMIDsPath = Path.Combine(assemblyPath, "Dic4Mid");

            if (!Directory.Exists(DictionaryForMIDsPath))
            {
                DictionaryForMIDsPath = Path.Combine(Path.GetDirectoryName(assemblyPath), "Dic4Mid");
            }

            var creatorPath = Common.PathCombine(DictionaryForMIDsPath, "DfM-Creator");

            FolderTree.Copy(creatorPath, output.Directory);

            const string prog = "java";

            SubProcess.RedirectOutput = LogName;
            var args1 = string.Format(@"-jar DfM-Creator.jar -DictionaryGeneration .{0}main.txt . .", Path.DirectorySeparatorChar);

            SubProcess.RunCommand(output.Directory, prog, args1, true);
            var args2 = string.Format(@"-jar DfM-Creator.jar -JarCreator .{0}dictionary{0} .{0}Empty_Jar-Jad{0} .", Path.DirectorySeparatorChar);

            SubProcess.RunCommand(output.Directory, prog, args2, true);
        }
Пример #2
0
        /// <summary>
        /// Uses Java to create GoBible application
        /// </summary>
        /// <param name="goBibleCreatorPath"></param>
        public void BuildApplication(string goBibleCreatorPath)
        {
            const string creator         = "GoBibleCreator.jar";
            const string prog            = "java";
            var          creatorFullPath = Common.PathCombine(goBibleCreatorPath, creator);

            //var progFullName = SubProcess.JavaFullName(prog);
            //if (progFullName.EndsWith(".exe"))
            //{
            //    progFullName = progFullName.Substring(0, progFullName.Length - 4);
            //}
            collectionFullName = Common.PathCombine(processFolder, "Collections.txt");
            var args = string.Format(@" -Xmx128m -jar ""{0}""  ""{1}""", creatorFullPath, collectionFullName);

            SubProcess.RedirectOutput = RedirectOutputFileName;
            SubProcess.RunCommand(processFolder, prog, args, true);
        }