markus / Wix / replaceVersion.ps1 @ f5d5b1ea
이력 | 보기 | 이력해설 | 다운로드 (587 Bytes)
1 |
$TargetPath=$args[0] |
---|---|
2 |
$WixProjectPath=$args[1] |
3 |
$outputPath=$args[2] |
4 |
|
5 |
$KcomPath = join-path -path $TargetPath -childpath 'KCOM.exe' |
6 |
|
7 |
$version=(get-item $KcomPath).VersionInfo.FileVersion |
8 |
|
9 |
(get-content $WixProjectPath) | % { |
10 |
$_ -replace '\$VERSION',$version |
11 |
$_ -replace '$(var.KCOM.TargetDir)',$TargetPath |
12 |
$_ -replace '$(var.IKCOM.TargetDir)',$TargetPath |
13 |
$_ -replace '$(var.MarkupToPDF.TargetDir)',$TargetPath |
14 |
$_ -replace '$(var.KCOMDataModel.TargetDir)',$TargetPath |
15 |
$_ -replace '$(var.CommonLib.TargetDir)',$TargetPath |
16 |
|
17 |
} | Out-File $outputPath -Encoding ASCII |