示例#1
0
        private void PackCooked()
        {
            EventManager.Send(new ProgressEvent("Packing files..."));

            var arguments = $"pack -dir=\"{cookedPath}\" -outdir=\"{outPath}\"";

            WCC.Start(modKitPath, arguments);
        }
示例#2
0
        private void Metadata()
        {
            EventManager.Send(new ProgressEvent("Generating metadata..."));

            var arguments = $"metadatastore -path=\"{outPath}\"";

            WCC.Start(modKitPath, arguments);
        }
示例#3
0
        private void Cook()
        {
            EventManager.Send(new ProgressEvent("Cooking..."));

            var arguments = $"cook -platform=pc -mod=\"{uncookedPath}\" -basedir=\"{uncookedPath}\" -outdir=\"{cookedPath}\"";

            WCC.Start(modKitPath, arguments);
        }
示例#4
0
        private void BuildCacheTexture()
        {
            EventManager.Send(new ProgressEvent("Building texture cache..."));

            var arguments = $"buildcache textures -basedir=\"{uncookedPath}\" -platform=pc -db=\"{Path.Combine(cookedPath, "cook.db")}\" -out=\"{Path.Combine(outPath, "texture.cache")}\"";

            WCC.Start(modKitPath, arguments);
        }
示例#5
0
        public override void Execute()
        {
            EventManager.Send(new ProgressEvent("Uncooking..."));

            var arguments = $"uncook -indir=\"{modPath}\" -outdir=\"{uncookPath}\" -imgfmt={textureFormat}";

            if (dumpSWF)
            {
                arguments += " -dumpswf";
            }

            if (skipErrors)
            {
                arguments += " -skiperrors";
            }

            WCC.Start(modKitPath, arguments);

            Process.Start("explorer.exe", uncookPath);

            EventManager.Send(new DoneEvent());
        }
示例#6
0
        private void Import()
        {
            string depot = witcherPackage != null && witcherPackage.UseLocalDepot ? "local" : tempPath;

            EventManager.Send(new ProgressEvent("Importing textures..."));

            foreach (string texturePath in Directory.EnumerateFiles(contentPath, "*.*", SearchOption.AllDirectories)
                     .Where(m => texturesExtensions.Any(k => Path.GetExtension(m) == k)))
            {
                var arguments = $"import -depot=\"{depot}\" -file=\"{texturePath}\" -out=\"{Path.ChangeExtension(texturePath.Replace(contentPath, uncookedPath), "xbm")}\"";

                WCC.Start(modKitPath, arguments);
            }

            EventManager.Send(new ProgressEvent("Importing meshes..."));

            foreach (string meshPath in Directory.EnumerateFiles(contentPath, "*.*", SearchOption.AllDirectories)
                     .Where(m => meshesExtensions.Any(k => Path.GetExtension(m) == k)))
            {
                var arguments = $"import -depot=\"{depot}\" -file=\"{meshPath}\" -out=\"{Path.ChangeExtension(meshPath.Replace(contentPath, uncookedPath), "w2mesh")}\"";

                WCC.Start(modKitPath, arguments);
            }
        }