Mercurial > hg > tc-symbol-server
annotate agent/src/jetbrains/buildServer/symbols/tools/PdbStrExe.java @ 28:646f64aca657
fixed url's to sources
author | Evgeniy.Koshkin |
---|---|
date | Wed, 07 Aug 2013 21:48:39 +0400 |
parents | 76ed2d58c871 |
children | 4c516ddbddf1 |
rev | line source |
---|---|
12 | 1 /* |
2 * Copyright 2000-2013 JetBrains s.r.o. | |
3 * | |
4 * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 * you may not use this file except in compliance with the License. | |
6 * You may obtain a copy of the License at | |
7 * | |
8 * http://www.apache.org/licenses/LICENSE-2.0 | |
9 * | |
10 * Unless required by applicable law or agreed to in writing, software | |
11 * distributed under the License is distributed on an "AS IS" BASIS, | |
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 * See the License for the specific language governing permissions and | |
14 * limitations under the License. | |
15 */ | |
16 | |
27
76ed2d58c871
- reused home path between all srcsrv-related utilities
Evgeniy.Koshkin
parents:
12
diff
changeset
|
17 package jetbrains.buildServer.symbols.tools; |
12 | 18 |
19 import com.intellij.execution.configurations.GeneralCommandLine; | |
20 import jetbrains.buildServer.ExecResult; | |
21 import jetbrains.buildServer.SimpleCommandLineProcessRunner; | |
22 | |
23 import java.io.File; | |
24 | |
25 /** | |
26 * @author Evgeniy.Koshkin | |
27 */ | |
28 public class PdbStrExe { | |
29 | |
30 public static final String SRCSRV_STREAM_NAME = "srcsrv"; | |
31 | |
27
76ed2d58c871
- reused home path between all srcsrv-related utilities
Evgeniy.Koshkin
parents:
12
diff
changeset
|
32 private static final String PDBSTR_EXE = "pdbstr.exe"; |
12 | 33 private static final String STREAM_NAME_SWITCH = "-s"; |
34 private static final String PATH_TO_PDB_FILE_SWITCH = "-p"; | |
35 private static final String PATH_TO_INPUT_FILE_SWITCH = "-i"; | |
36 | |
27
76ed2d58c871
- reused home path between all srcsrv-related utilities
Evgeniy.Koshkin
parents:
12
diff
changeset
|
37 private final File myPath; |
12 | 38 |
27
76ed2d58c871
- reused home path between all srcsrv-related utilities
Evgeniy.Koshkin
parents:
12
diff
changeset
|
39 public PdbStrExe(File homeDir) { |
76ed2d58c871
- reused home path between all srcsrv-related utilities
Evgeniy.Koshkin
parents:
12
diff
changeset
|
40 myPath = new File(homeDir, PDBSTR_EXE); |
76ed2d58c871
- reused home path between all srcsrv-related utilities
Evgeniy.Koshkin
parents:
12
diff
changeset
|
41 } |
76ed2d58c871
- reused home path between all srcsrv-related utilities
Evgeniy.Koshkin
parents:
12
diff
changeset
|
42 |
76ed2d58c871
- reused home path between all srcsrv-related utilities
Evgeniy.Koshkin
parents:
12
diff
changeset
|
43 public ExecResult doCommand(final PdbStrExeCommands cmd, final File pdbFile, final File inputStreamFile, final String streamName){ |
12 | 44 final GeneralCommandLine commandLine = new GeneralCommandLine(); |
45 commandLine.setWorkDirectory(myPath.getParent()); | |
46 commandLine.setExePath(myPath.getPath()); | |
47 commandLine.addParameter(cmd.getCmdSwitch()); | |
48 commandLine.addParameter(String.format("%s:%s", PATH_TO_PDB_FILE_SWITCH, pdbFile.getAbsolutePath())); | |
49 commandLine.addParameter(String.format("%s:%s", PATH_TO_INPUT_FILE_SWITCH, inputStreamFile.getAbsolutePath())); | |
50 commandLine.addParameter(STREAM_NAME_SWITCH + ":" + streamName); | |
51 return SimpleCommandLineProcessRunner.runCommand(commandLine, null); | |
52 } | |
53 } |