Skip to content

Commit 5dc483a

Browse files
author
RandomEngy
committed
Added pretty and error handling to build scripts. Fixed problem with part of some controls on the picture panel getting cut off at the minimum window width.
1 parent 8374638 commit 5dc483a

4 files changed

Lines changed: 28 additions & 10 deletions

File tree

VidCoder/View/Panels/PicturePanel.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
<RowDefinition />
2121
</Grid.RowDefinitions>
2222
<Grid.ColumnDefinitions>
23-
<ColumnDefinition />
24-
<ColumnDefinition />
23+
<ColumnDefinition Width="305" />
24+
<ColumnDefinition Width="*" />
2525
</Grid.ColumnDefinitions>
2626
<Grid Grid.Row="0" Grid.Column="0" Visibility="{Binding HasSourceData, Converter={StaticResource VisibilityConverter}}">
2727
<Border

build.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ function UpdateIssFile($fileName, $version)
1010
Set-Content $fileName $fileContent
1111
}
1212

13-
& $DevEnvExe VidCoder.sln /Rebuild "Release|x86"
14-
& $DevEnvExe VidCoder.sln /Rebuild "Release|x64"
13+
& $DevEnvExe VidCoder.sln /Rebuild "Release|x86"; ExitIfFailed
14+
& $DevEnvExe VidCoder.sln /Rebuild "Release|x64"; ExitIfFailed
1515

1616
& ($NetToolsFolder + "\sgen.exe") /f /a:"Lib\x86\HandBrakeInterop.dll"
1717
& ($NetToolsFolder + "\x64\sgen.exe") /f /a:"Lib\x64\HandBrakeInterop.dll"
@@ -24,8 +24,10 @@ $fileVersion = $fileVersion.Substring(0, $fileVersion.LastIndexOf("."))
2424
UpdateIssFile "Installer\VidCoder-x86.iss" $fileVersion
2525
UpdateIssFile "Installer\VidCoder-x64.iss" $fileVersion
2626

27-
& $InnoSetupExe Installer\VidCoder-x86.iss
28-
& $InnoSetupExe Installer\VidCoder-x64.iss
27+
& $InnoSetupExe Installer\VidCoder-x86.iss; ExitIfFailed
28+
& $InnoSetupExe Installer\VidCoder-x64.iss; ExitIfFailed
29+
30+
WriteSuccess
2931

3032
Write-Host
31-
powershell.exe -noexit
33+
powershell.exe -noexit -nologo

build_common.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Common settings for scripts
22

3+
function ExitIfFailed()
4+
{
5+
if ($LASTEXITCODE -ne 0)
6+
{
7+
Write-Host "An error occurred. Stopping build." -foregroundcolor "red"
8+
exit
9+
}
10+
}
11+
12+
function WriteSuccess()
13+
{
14+
Write-Host "Build succeeded." -foregroundcolor "green"
15+
}
16+
317
$DevEnvExe = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com"
418
$NetToolsFolder = "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools"
519
$InnoSetupExe = "C:\Program Files (x86)\Inno Setup 5\ISCC.exe"

build_interop.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ $HandBrakeInteropFolder = "..\HandBrakeSVN\win\CS\HandBrake.Interop"
88

99
$HandBrakeSolution = $HandBrakeInteropFolder + "\HandBrakeInterop.sln"
1010

11-
& $DevEnvExe $HandBrakeSolution /Rebuild "Release|x86"
12-
& $DevEnvExe $HandBrakeSolution /Rebuild "Release|x64"
11+
& $DevEnvExe $HandBrakeSolution /Rebuild "Release|x86"; ExitIfFailed
12+
& $DevEnvExe $HandBrakeSolution /Rebuild "Release|x64"; ExitIfFailed
1313
copy ($HandBrakeInteropFolder + "\HandBrakeInterop\bin\x86\Release\HandBrakeInterop.dll") Lib\x86 -force
1414
copy ($HandBrakeInteropFolder + "\HandBrakeInterop\bin\x86\Release\HandBrakeInterop.pdb") Lib\x86 -force
1515
copy ($HandBrakeInteropFolder + "\HandBrakeInterop\bin\x64\Release\HandBrakeInterop.dll") Lib\x64 -force
1616
copy ($HandBrakeInteropFolder + "\HandBrakeInterop\bin\x64\Release\HandBrakeInterop.pdb") Lib\x64 -force
1717
"File copy finished."
1818

19+
WriteSuccess
20+
1921
Write-Host
20-
powershell.exe -noexit
22+
powershell.exe -noexit -nologo

0 commit comments

Comments
 (0)