Ticket #56: insFromWS.diff
File insFromWS.diff, 2.6 KB (added by agustech, 16 years ago) |
---|
international support for install work space |
-
D:/CobraSource/cobra/Source/InstallFromWorkspace.cobra
294 294 CobraCore.runAndCaptureAllOutput(p) 295 295 found = true 296 296 print 'found in system PATH' 297 catch exc as Exception 298 if 'cannot find the file' not in exc.message 299 throw 297 catch exc as FileNotFoundException #Should runAndCaptureAllOutput throw this instead? 298 print exc.message 299 catch exc2 as ComponentModel.Win32Exception # .no-warnings. 300 #print exc2.message 301 pass 302 catch 303 throw 300 304 301 305 if not found 302 306 # try to find the gacutil 303 307 print 'Searching for gacutil...' 304 308 gacutil = 'gacutil.exe' 309 305 310 dirs = [ 306 r'\Program Files\Microsoft.NET\SDK\v2.0\bin', # VS 2005 / SDK .NET 2.0 307 r'\Program Files\Microsoft SDKs\Windows\v6.0A\bin', # VS 2008 311 r'\Microsoft.NET\SDK\v2.0\bin', # VS 2005 / SDK .NET 2.0 312 r'\Microsoft SDKs\Windows\v6.0A\bin', # VS 2008 313 r'\Microsoft Visual Studio 8\SDK\v2.0\Bin', 308 314 ] 315 309 316 for dir in dirs 317 #search drives 310 318 for drive in Directory.getLogicalDrives 311 319 drive = drive[:1] # normalize to just one character 312 320 if drive <= 'B', continue 313 path = '[drive]: [dir][.slash][gacutil]'321 path = '[drive]:\Program Files[dir][.slash][gacutil]' 314 322 if File.exists(path) 315 323 print 'found:', path 316 324 gacutil = path 317 325 found = true 318 326 break 327 #else 328 #print path 319 329 if found, break 330 331 #search international %ProgramFiles% 332 path = Environment.getFolderPath(Environment.SpecialFolder.ProgramFiles) + '[dir][.slash][gacutil]' 333 if File.exists(path) 334 print 'found:', path 335 gacutil = path 336 found = true 337 #else 338 #print path 339 if found, break 320 340 321 341 if not found 322 342 .error('Cannot locate a gacutil. Maybe you can try again using the "Visual Studio Command Prompt" or ".NET SDK Command Prompt".') … … 422 442 print 423 443 424 444 # record "svn info" in the installation directory 425 output = .runCommand('svn', 'info', false) 426 svnInfo = '[versionDir][slash]svn_info.text' 427 print 'writing :', svnInfo 428 print 429 File.writeAllText(svnInfo, output) 445 try 446 output = .runCommand('svn', 'info', false) 447 svnInfo = '[versionDir][slash]svn_info.text' 448 print 'writing :', svnInfo 449 print 450 File.writeAllText(svnInfo, output) 451 catch ex as Exception 452 print 'svn is not installed or it is not in the PATH. ' + ex.message 430 453 431 454 def verifyNewlyInstalledCobra 432 455 .startStage('Verify newly installed Cobra compiler')