hi,
hoffe, dass ich im richtigen Unterforum poste. Falls nicht, bitte einfach verschieben.
ich versuche dateien via C# über die dcc32.exe von Delphi zu kompelieren, jedoch schaff ich es leider nicht.
hier der code:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33:
| public int Execute(System.IO.FileInfo file) { string args = GetArgs(file.FullName); Process proc = new Process(); proc.StartInfo.FileName = config.Dcc32Path; proc.StartInfo.Arguments = args; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.RedirectStandardError = true; proc.StartInfo.CreateNoWindow = true; proc.StartInfo.UseShellExecute = false; proc.Start(); proc.WaitForExit(); string outPut = proc.StandardOutput.ReadToEnd(); if (!String.IsNullOrEmpty(outPut)) wixInstaller.WriteMessage(outPut, true); string error = proc.StandardError.ReadToEnd(); if (!String.IsNullOrEmpty(error)) wixInstaller.WriteMessage(error, true); int exitCode = proc.ExitCode; proc.Close(); return exitCode; }
private string GetArgs(string dprFile) { string u = @"E:\Development\___\src\Common;E:\Development\___\Packages\Bin;E:\Development\___\Packages\Lib;E:\Development\___\Packages\src;E:\Development\___\Packages\Tnt;E:\Development\___\Packages\greatis\ObjInsp\Source;E:\Development\___\Packages\greatis\FormDes\Source;E:\Development\___\Packages\GR32"; u = u.Replace(";", "\";\""); string r = String.Format(" -CC -B -Q -W- -H+ -U \"{0}\" \"{1}\"", u, dprFile); return r; } |
das prob, welches ich habe ist, dass der dcc32.exe bei mir immer ohne wirkliche fehlermeldung abstürzt.
ich habe es vorher schon anders probiert etc. pp...
ich bekomm es einfach nicht hin, dass das ding meine Datei richtig kompeliert.
"Normale" Dateien, d.h. ohne "-U"-Parameter, schaff ich zu kompelieren, weshalb irgendwo ein fehler beim "-U"-Parameter sein müsste.
jedoch wo?
ich komm nicht mehr weiter, need help.
so far
[Master of dangerous sciolism].