public static void Assemble(char[] fil, char[] opt, bool hasMain) { int retCode; System.String optNm; System.String suffx; System.String fName = CP_rts.mkStr(fil); if (hasMain) { optNm = "/exe "; suffx = ".exe"; } else { optNm = "/dll "; suffx = ".dll"; } optNm = optNm + CP_rts.mkStr(opt) + ' '; asm.StartInfo.Arguments = optNm + "/nologo /quiet " + fName + ".il"; asm.Start(); asm.WaitForExit(); retCode = asm.ExitCode; if (retCode != 0) { System.Console.WriteLine("#gpcp: ilasm FAILED " + retCode); } else { System.Console.WriteLine("#gpcp: created " + fName + suffx); } }
public static void DoAsm(char[] fil, char[] opt, bool hasMain, bool verbose, ref int rslt) { System.String optNm; System.String suffx; System.String fName = CP_rts.mkStr(fil); if (hasMain) { optNm = "/exe "; suffx = ".exe"; } else { optNm = "/dll "; suffx = ".dll"; } optNm = optNm + CP_rts.mkStr(opt) + ' '; if (verbose) { System.Console.WriteLine("#gpcp: Calling " + asm.StartInfo.FileName); #if BETA2 asm.StartInfo.CreateNoWindow = false; #endif asm.StartInfo.Arguments = optNm + "/nologo " + fName + ".il"; } else { #if BETA2 asm.StartInfo.CreateNoWindow = true; #endif asm.StartInfo.Arguments = optNm + "/nologo /quiet " + fName + ".il"; } asm.Start(); asm.WaitForExit(); rslt = asm.ExitCode; if (rslt == 0) { System.Console.WriteLine("#gpcp: Created " + fName + suffx); } }
public static void GetEnvVar(char[] name, char[] valu) { System.String nam = CP_rts.mkStr(name); System.String val = System.Environment.GetEnvironmentVariable(nam); CP_rts.StrToChF(valu, val); }