3 using System.Diagnostics;
7 public class Win32Builder : ABuilder
9 public Win32Builder(Config _cfg)
14 public override string CompressPackage(Package pkg)
16 string lpath = null, ltarget = null;
18 pkg.GetCompressBases(ref lpath, ref ltarget);
20 string local_dir = Config.PathFormat("{0}/{1}",
24 string name = PackageBuildName(pkg) + ".zip";
26 ProcessStartInfo info = new ProcessStartInfo();
27 info.FileName = cfg.Compressor;
28 info.WorkingDirectory = local_dir;
29 info.Arguments = "-r \"" + name + "\" \"" + ltarget + "\"";
30 info.UseShellExecute = false;
32 Process p = Process.Start(info);
35 local_dir = Config.PathFormat("{0}/{1}", local_dir, name);
37 if (!File.Exists(local_dir))
45 public override bool BuildLibrary(Package pkg, Library lib, ref string _binName, ref string _binPath)
47 ProcessStartInfo info = new ProcessStartInfo();
49 string path = Config.PathFormat("{0}/{1}/msvc8",
53 /* PlatformExt ignored for us */
54 string binName = lib.Name + (lib.IsExecutable ? ".exe" : ".dll");
56 string binpath = Config.PathFormat("{0}/{1}/{2}",
61 if (File.Exists(binpath))
66 string projectFile = null;
67 if (lib.ProjectFile != null)
69 projectFile = lib.ProjectFile + ".vcproj";
73 projectFile = lib.Name + ".vcproj";
76 info.WorkingDirectory = path;
77 info.FileName = cfg.BuilderPath;
78 info.UseShellExecute = false;
80 if (cfg.BuildOptions != null)
82 info.Arguments = cfg.BuildOptions + " ";
85 info.Arguments += "/rebuild " + lib.ReleaseBuild + " " + projectFile;
87 Process p = Process.Start(info);
91 if (!File.Exists(binpath))