PoshCode Archive  Artifact Content

Artifact 7f2825a25da7e1f20d2ef2a8f99a4f9afbbcf3d392948b29046634ab3e3d2f31:

  • File bullshit.ps1 — part of check-in [d52e664b8e] at 2018-06-10 13:29:49 on branch trunk — bullshit (user: unknown size: 1511)

# encoding: ascii
# api: powershell
# title: 
# description: bullshit
# version: 4.8.3
# type: script
# license: CC0
# x-poshcode-id: 3713
# x-archived: 2012-10-29T05:09:48
#
#
# Environment proprties

[string]$QTDIR = "C:\Qt\4.8.3-msvc2008"
[string]$rootDir = "C:\Build\"
[string]$buildDir = "C:\Build\build_dir\"
[string]$outputDir = "C:\Build\output_dir\"
[string]$svnDir = "C:\Build\build_dir\vacuum"
[string]$svnUrl = "http://vacuum-im.googlecode.com/svn/trunk/"
[string]$qmake = "qmake.exe"

[Environment]::SetEnvironmentVariable("QTDIR", $QTDIR, "User")
$env:Path += ";C:\Qt\4.8.3-msvc2008\bin\"

Import-VisualStudioVars -VisualStudioVersion 2008 -Architecture x86

$currentScriptDirectory = split-path -parent $MyInvocation.MyCommand.Definition

[Reflection.Assembly]::LoadFile(($currentScriptDirectory + ".\SharpSvn\SharpSvn.dll"))
$svnClient = New-Object SharpSvn.SvnClient
$repoUri = New-Object SharpSvn.SvnUriTarget($svnUrl)

Write-Host "Getting source code from subversion repository" $repoUri -ForegroundColor Green
$svnClient.CheckOut($repoUri, $svnDir)
$svnInfo = $null
$svnClient.GetInfo($SvnDir, ([ref]$svnInfo))
$rev = $svnInfo.LastChangeRevision

Set-Location $svnDir

Write-Host "Configuring ..." -ForegroundColor Green
& qmake.exe -r CONFIG-=debug CONFIG+=release INSTALL_PREFIX=C:/Build/output_dir

Write-Host "Building ..." -ForegroundColor Green
& nmake /NOLOGO

Write-Host "Installing ..." -ForegroundColor Green
& nmake install /NOLOGO