Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Release/Build_CLI_Windows_x64.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Copyright (c) MediaArea.net SARL. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license that can
## be found in the License.html file in the root of the source tree.
##

$ErrorActionPreference = "Stop"

#-----------------------------------------------------------------------
# Setup
$release_directory = Split-Path -Parent $MyInvocation.MyCommand.Path
$version = (Get-Content (Join-Path (Split-Path $release_directory -Parent) "Project\version.txt") -Raw).Trim()

#-----------------------------------------------------------------------
# Cleanup
Push-Location (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022\CLI")
MSBuild "/t:Clean"
Pop-Location

#-----------------------------------------------------------------------
# Prepare
Push-Location (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022")
((Get-Content -Path "CLI\RAWcooked_CLI.vcxproj") -Replace "MultiThreadedDLL", "MultiThreaded") | Set-Content -Path "CLI\RAWcooked_CLI.vcxproj"
((Get-Content -Path "Lib\RAWcooked_Lib.vcxproj") -Replace "MultiThreadedDLL", "MultiThreaded") | Set-Content -Path "Lib\RAWcooked_Lib.vcxproj"
Pop-Location

#-----------------------------------------------------------------------
# Build
Push-Location (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022\CLI")
MSBuild "/p:Configuration=Release;Platform=x64"
Pop-Location
49 changes: 49 additions & 0 deletions Release/Package_CLI_Windows_x64.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## Copyright (c) MediaArea.net SARL. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license that can
## be found in the License.html file in the root of the source tree.
##

$ErrorActionPreference = "Stop"

#-----------------------------------------------------------------------
# Setup
$release_directory = Split-Path -Parent $MyInvocation.MyCommand.Path
$version = (Get-Content (Join-Path (Split-Path $release_directory -Parent) "Project\version.txt") -Raw).Trim()

#-----------------------------------------------------------------------
# Cleanup
$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64"
if (Test-Path $artifact) {
Remove-Item $artifact -Force -Recurse
}

$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64.zip"
if (Test-Path $artifact) {
Remove-Item $artifact -Force
}

$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64_DebugInfo.zip"
if (Test-Path $artifact) {
Remove-Item $artifact -Force
}

#-----------------------------------------------------------------------
# Package cli
Push-Location $release_directory
New-Item -ItemType Directory -Path "RAWcooked_CLI_${version}_Windows_x64" -Force

Push-Location "RAWcooked_CLI_${version}_Windows_x64"
Copy-Item (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022\CLI\x64\Release\RAWcooked.exe") -Force
Copy-Item (Join-Path (Split-Path $release_directory -Parent) "History_CLI.txt") -Force
Copy-Item (Join-Path (Split-Path $release_directory -Parent) "License.html") -Force

& 7za.exe a -r -tzip "..\RAWcooked_CLI_${version}_Windows_x64.zip" *
Pop-Location
Pop-Location

#-----------------------------------------------------------------------
# Package pdb
Push-Location $release_directory
& 7za.exe a -r -tzip "RAWcooked_CLI_${version}_Windows_x64_DebugInfo.zip" "..\Project\MSVC2022\CLI\x64\Release\RAWcooked.pdb"
Pop-Location