Skip to content

Commit e2d37c0

Browse files
Merge pull request #461 from g-maxime/scripts
Build scripts for Windows
2 parents cd98757 + b29566b commit e2d37c0

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

Release/Build_CLI_Windows_x64.ps1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Copyright (c) MediaArea.net SARL. All Rights Reserved.
2+
##
3+
## Use of this source code is governed by a BSD-style license that can
4+
## be found in the License.html file in the root of the source tree.
5+
##
6+
7+
$ErrorActionPreference = "Stop"
8+
9+
#-----------------------------------------------------------------------
10+
# Setup
11+
$release_directory = Split-Path -Parent $MyInvocation.MyCommand.Path
12+
$version = (Get-Content (Join-Path (Split-Path $release_directory -Parent) "Project\version.txt") -Raw).Trim()
13+
14+
#-----------------------------------------------------------------------
15+
# Cleanup
16+
Push-Location (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022\CLI")
17+
MSBuild "/t:Clean"
18+
Pop-Location
19+
20+
#-----------------------------------------------------------------------
21+
# Prepare
22+
Push-Location (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022")
23+
((Get-Content -Path "CLI\RAWcooked_CLI.vcxproj") -Replace "MultiThreadedDLL", "MultiThreaded") | Set-Content -Path "CLI\RAWcooked_CLI.vcxproj"
24+
((Get-Content -Path "Lib\RAWcooked_Lib.vcxproj") -Replace "MultiThreadedDLL", "MultiThreaded") | Set-Content -Path "Lib\RAWcooked_Lib.vcxproj"
25+
Pop-Location
26+
27+
#-----------------------------------------------------------------------
28+
# Build
29+
Push-Location (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022\CLI")
30+
MSBuild "/p:Configuration=Release;Platform=x64"
31+
Pop-Location
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Copyright (c) MediaArea.net SARL. All Rights Reserved.
2+
##
3+
## Use of this source code is governed by a BSD-style license that can
4+
## be found in the License.html file in the root of the source tree.
5+
##
6+
7+
$ErrorActionPreference = "Stop"
8+
9+
#-----------------------------------------------------------------------
10+
# Setup
11+
$release_directory = Split-Path -Parent $MyInvocation.MyCommand.Path
12+
$version = (Get-Content (Join-Path (Split-Path $release_directory -Parent) "Project\version.txt") -Raw).Trim()
13+
14+
#-----------------------------------------------------------------------
15+
# Cleanup
16+
$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64"
17+
if (Test-Path $artifact) {
18+
Remove-Item $artifact -Force -Recurse
19+
}
20+
21+
$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64.zip"
22+
if (Test-Path $artifact) {
23+
Remove-Item $artifact -Force
24+
}
25+
26+
$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64_DebugInfo.zip"
27+
if (Test-Path $artifact) {
28+
Remove-Item $artifact -Force
29+
}
30+
31+
#-----------------------------------------------------------------------
32+
# Package cli
33+
Push-Location $release_directory
34+
New-Item -ItemType Directory -Path "RAWcooked_CLI_${version}_Windows_x64" -Force
35+
36+
Push-Location "RAWcooked_CLI_${version}_Windows_x64"
37+
Copy-Item (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022\CLI\x64\Release\RAWcooked.exe") -Force
38+
Copy-Item (Join-Path (Split-Path $release_directory -Parent) "History_CLI.txt") -Force
39+
Copy-Item (Join-Path (Split-Path $release_directory -Parent) "License.html") -Force
40+
41+
& 7za.exe a -r -tzip "..\RAWcooked_CLI_${version}_Windows_x64.zip" *
42+
Pop-Location
43+
Pop-Location
44+
45+
#-----------------------------------------------------------------------
46+
# Package pdb
47+
Push-Location $release_directory
48+
& 7za.exe a -r -tzip "RAWcooked_CLI_${version}_Windows_x64_DebugInfo.zip" "..\Project\MSVC2022\CLI\x64\Release\RAWcooked.pdb"
49+
Pop-Location

0 commit comments

Comments
 (0)