markus / replaceVersion.ps1 @ d2e0fee3
이력 | 보기 | 이력해설 | 다운로드 (608 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 |
$WixProjectFile = get-content $WixProjectPath |
10 |
|
11 |
$WixProjectFile -creplace'\$VERSION',$version |
12 |
-creplace '$(var.KCOM.TargetDir)',$TargetPath |
13 |
-creplace '$(var.IKCOM.TargetDir)',$TargetPath |
14 |
-creplace '$(var.MarkupToPDF.TargetDir)',$TargetPath |
15 |
-creplace '$(var.KCOMDataModel.TargetDir)',$TargetPath |
16 |
-creplace '$(var.CommonLib.TargetDir)',$TargetPath >> Out-File -Encoding ASCII $outputPath |