Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

35 lignes
1.2KB

  1. [CmdletBinding()]
  2. param(
  3. [string]$ProjectRoot
  4. )
  5. if (-not $ProjectRoot) {
  6. $ProjectRoot = Split-Path -Parent $PSScriptRoot
  7. }
  8. $components = @(
  9. # Framework/ is the only thing genuinely shared between the production
  10. # and test-app sites. Controllers/ is production's own; SelfTestController
  11. # is test-app-specific and lives under test-app/ instead. See
  12. # docs/ARCHITECTURE.md.
  13. (Join-Path $ProjectRoot 'Framework\RequestContext.wsc'),
  14. (Join-Path $ProjectRoot 'Framework\Router.wsc'),
  15. (Join-Path $ProjectRoot 'Framework\ViewRenderer.wsc'),
  16. (Join-Path $ProjectRoot 'Framework\Application.wsc'),
  17. (Join-Path $ProjectRoot 'Controllers\HomeController.wsc'),
  18. (Join-Path $ProjectRoot 'test-app\Controllers\SelfTestController.wsc')
  19. )
  20. foreach ($path in $components) {
  21. if (-not (Test-Path $path)) {
  22. throw "Component not found: $path"
  23. }
  24. Write-Output "Registering $path"
  25. $proc = Start-Process -FilePath 'regsvr32.exe' -ArgumentList "/s `"$path`"" -PassThru -Wait -WindowStyle Hidden
  26. if ($proc.ExitCode -ne 0) {
  27. throw "regsvr32 failed for $path (exit $($proc.ExitCode))"
  28. }
  29. }
  30. Write-Output "All WSC-MVC components registered."

Powered by TurnKey Linux.