Skip to content

Commit 8374638

Browse files
author
RandomEngy
committed
Upgrading build scripts to ps1. Automating update of version number in .iss file. Changing HandBrakeInterop dll back to 1.0.19.
1 parent 1caa237 commit 8374638

10 files changed

Lines changed: 56 additions & 33 deletions

Lib/x64/HandBrakeInterop.dll

0 Bytes
Binary file not shown.

Lib/x64/HandBrakeInterop.pdb

0 Bytes
Binary file not shown.

Lib/x86/HandBrakeInterop.dll

0 Bytes
Binary file not shown.

Lib/x86/HandBrakeInterop.pdb

0 Bytes
Binary file not shown.

build.cmd

Lines changed: 0 additions & 14 deletions
This file was deleted.

build.ps1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
. ./build_common.ps1
2+
3+
function UpdateIssFile($fileName, $version)
4+
{
5+
$newString = "`${1}" + $version + "`${2}"
6+
7+
$fileContent = Get-Content $fileName
8+
$fileContent = $fileContent -replace "(VidCoder )[\d.]+( \(x\d{2}\))", $newString
9+
$fileContent = $fileContent -replace "(VidCoder-)[\d.]+(-x\d{2})", $newString
10+
Set-Content $fileName $fileContent
11+
}
12+
13+
& $DevEnvExe VidCoder.sln /Rebuild "Release|x86"
14+
& $DevEnvExe VidCoder.sln /Rebuild "Release|x64"
15+
16+
& ($NetToolsFolder + "\sgen.exe") /f /a:"Lib\x86\HandBrakeInterop.dll"
17+
& ($NetToolsFolder + "\x64\sgen.exe") /f /a:"Lib\x64\HandBrakeInterop.dll"
18+
& ($NetToolsFolder + "\sgen.exe") /f /a:"VidCoder\bin\x86\Release\VidCoder.exe"
19+
& ($NetToolsFolder + "\x64\sgen.exe") /f /a:"VidCoder\bin\x64\Release\VidCoder.exe"
20+
21+
$fileVersion = (Get-Command VidCoder\bin\x64\Release\VidCoder.exe).FileVersionInfo.FileVersion
22+
$fileVersion = $fileVersion.Substring(0, $fileVersion.LastIndexOf("."))
23+
24+
UpdateIssFile "Installer\VidCoder-x86.iss" $fileVersion
25+
UpdateIssFile "Installer\VidCoder-x64.iss" $fileVersion
26+
27+
& $InnoSetupExe Installer\VidCoder-x86.iss
28+
& $InnoSetupExe Installer\VidCoder-x64.iss
29+
30+
Write-Host
31+
powershell.exe -noexit

build_common.cmd

Lines changed: 0 additions & 5 deletions
This file was deleted.

build_common.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Common settings for scripts
2+
3+
$DevEnvExe = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com"
4+
$NetToolsFolder = "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools"
5+
$InnoSetupExe = "C:\Program Files (x86)\Inno Setup 5\ISCC.exe"

build_interop.cmd

Lines changed: 0 additions & 14 deletions
This file was deleted.

build_interop.ps1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Builds HandBrakeInterop from the HandBrake source tree and copying the DLLs
2+
# to the VidCoder lib folder.
3+
4+
. ./build_common.ps1
5+
6+
# Change this to the folder containing HandBrakeInterop.sln
7+
$HandBrakeInteropFolder = "..\HandBrakeSVN\win\CS\HandBrake.Interop"
8+
9+
$HandBrakeSolution = $HandBrakeInteropFolder + "\HandBrakeInterop.sln"
10+
11+
& $DevEnvExe $HandBrakeSolution /Rebuild "Release|x86"
12+
& $DevEnvExe $HandBrakeSolution /Rebuild "Release|x64"
13+
copy ($HandBrakeInteropFolder + "\HandBrakeInterop\bin\x86\Release\HandBrakeInterop.dll") Lib\x86 -force
14+
copy ($HandBrakeInteropFolder + "\HandBrakeInterop\bin\x86\Release\HandBrakeInterop.pdb") Lib\x86 -force
15+
copy ($HandBrakeInteropFolder + "\HandBrakeInterop\bin\x64\Release\HandBrakeInterop.dll") Lib\x64 -force
16+
copy ($HandBrakeInteropFolder + "\HandBrakeInterop\bin\x64\Release\HandBrakeInterop.pdb") Lib\x64 -force
17+
"File copy finished."
18+
19+
Write-Host
20+
powershell.exe -noexit

0 commit comments

Comments
 (0)