Merge branch 'development' of https://github.com/o3de/o3de into Network/olexl/nettransform_local_for_children_cr
commit
6e68da9382
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzCore/Task/TaskGraphSystemComponent.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
|
||||
// Create a cvar as a central location for experimentation with switching from the Job system to TaskGraph system.
|
||||
AZ_CVAR(bool, cl_activateTaskGraph, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Flag clients of TaskGraph to switch between jobs/taskgraph (Note does not disable task graph system)");
|
||||
static constexpr uint32_t TaskExecutorServiceCrc = AZ_CRC_CE("TaskExecutorService");
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
void TaskGraphSystemComponent::Activate()
|
||||
{
|
||||
AZ_Assert(m_taskExecutor == nullptr, "Error multiple activation of the TaskGraphSystemComponent");
|
||||
|
||||
if (Interface<TaskGraphActiveInterface>::Get() == nullptr)
|
||||
{
|
||||
Interface<TaskGraphActiveInterface>::Register(this);
|
||||
m_taskExecutor = aznew TaskExecutor();
|
||||
TaskExecutor::SetInstance(m_taskExecutor);
|
||||
}
|
||||
}
|
||||
|
||||
void TaskGraphSystemComponent::Deactivate()
|
||||
{
|
||||
if (&TaskExecutor::Instance() == m_taskExecutor) // check that our instance is the global instance (not always true in unit tests)
|
||||
{
|
||||
m_taskExecutor->SetInstance(nullptr);
|
||||
}
|
||||
if (m_taskExecutor)
|
||||
{
|
||||
azdestroy(m_taskExecutor);
|
||||
m_taskExecutor = nullptr;
|
||||
}
|
||||
if (Interface<TaskGraphActiveInterface>::Get() == this)
|
||||
{
|
||||
Interface<TaskGraphActiveInterface>::Unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
void TaskGraphSystemComponent::GetProvidedServices(ComponentDescriptor::DependencyArrayType& provided)
|
||||
{
|
||||
provided.push_back(TaskExecutorServiceCrc);
|
||||
}
|
||||
|
||||
void TaskGraphSystemComponent::GetIncompatibleServices(ComponentDescriptor::DependencyArrayType& incompatible)
|
||||
{
|
||||
incompatible.push_back(TaskExecutorServiceCrc);
|
||||
}
|
||||
|
||||
void TaskGraphSystemComponent::GetDependentServices([[maybe_unused]] ComponentDescriptor::DependencyArrayType& dependent)
|
||||
{
|
||||
}
|
||||
|
||||
void TaskGraphSystemComponent::Reflect(ReflectContext* context)
|
||||
{
|
||||
if (SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<TaskGraphSystemComponent, AZ::Component>()
|
||||
->Version(1)
|
||||
;
|
||||
|
||||
if (AZ::EditContext* ec = serializeContext->GetEditContext())
|
||||
{
|
||||
ec->Class<TaskGraphSystemComponent>
|
||||
("TaskGraph", "System component to create the default executor")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Category, "Engine")
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool TaskGraphSystemComponent::IsTaskGraphActive() const
|
||||
{
|
||||
return cl_activateTaskGraph;
|
||||
}
|
||||
} // namespace AZ
|
||||
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzCore/Math/Crc.h>
|
||||
#include <AzCore/Task/TaskExecutor.h>
|
||||
#include <AzCore/Task/TaskGraph.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
class TaskGraphSystemComponent
|
||||
: public Component
|
||||
, public TaskGraphActiveInterface
|
||||
{
|
||||
public:
|
||||
AZ_COMPONENT(AZ::TaskGraphSystemComponent, "{5D56B829-1FEB-43D5-A0BD-E33C0497EFE2}")
|
||||
|
||||
TaskGraphSystemComponent() = default;
|
||||
|
||||
// Implement TaskGraphActiveInterface
|
||||
bool IsTaskGraphActive() const override;
|
||||
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Component base
|
||||
void Activate() override;
|
||||
void Deactivate() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// \ref ComponentDescriptor::GetProvidedServices
|
||||
static void GetProvidedServices(ComponentDescriptor::DependencyArrayType& provided);
|
||||
/// \ref ComponentDescriptor::GetIncompatibleServices
|
||||
static void GetIncompatibleServices(ComponentDescriptor::DependencyArrayType& incompatible);
|
||||
/// \ref ComponentDescriptor::GetDependentServices
|
||||
static void GetDependentServices(ComponentDescriptor::DependencyArrayType& dependent);
|
||||
/// \red ComponentDescriptor::Reflect
|
||||
static void Reflect(ReflectContext* reflection);
|
||||
|
||||
AZ::TaskExecutor* m_taskExecutor = nullptr;
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
{
|
||||
"description": "",
|
||||
"materialType": "Materials\\Types\\StandardPBR.materialtype",
|
||||
"materialType": "Materials/Types/StandardPBR.materialtype",
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path)
|
||||
set(_cpack_wix_out_dir ${CPACK_TOPLEVEL_DIRECTORY})
|
||||
file(TO_NATIVE_PATH "${_root_path}/scripts/signer/Platform/Windows/signer.ps1" _sign_script)
|
||||
|
||||
set(_signing_command
|
||||
psexec.exe
|
||||
-accepteula
|
||||
-nobanner
|
||||
-s
|
||||
powershell.exe
|
||||
-NoLogo
|
||||
-ExecutionPolicy Bypass
|
||||
-File ${_sign_script}
|
||||
)
|
||||
|
||||
message(STATUS "Signing executable files in ${_cpack_wix_out_dir}")
|
||||
execute_process(
|
||||
COMMAND ${_signing_command} -exePath ${_cpack_wix_out_dir}
|
||||
RESULT_VARIABLE _signing_result
|
||||
ERROR_VARIABLE _signing_errors
|
||||
OUTPUT_VARIABLE _signing_output
|
||||
ECHO_OUTPUT_VARIABLE
|
||||
)
|
||||
|
||||
if(NOT ${_signing_result} EQUAL 0)
|
||||
message(FATAL_ERROR "An error occurred during signing executable files. ${_signing_errors}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Signing exes complete!")
|
||||
@ -0,0 +1,99 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
param (
|
||||
[String[]] $exePath,
|
||||
[String[]] $packagePath,
|
||||
[String[]] $bootstrapPath,
|
||||
[String[]] $certificate
|
||||
)
|
||||
|
||||
# Get prerequisites, certs, and paths ready
|
||||
$tempPath = [System.IO.Path]::GetTempPath() # Order of operations defined here: https://docs.microsoft.com/en-us/dotnet/api/system.io.path.gettemppath?view=net-5.0&tabs=windows#remarks
|
||||
$certThumbprint = Get-ChildItem -Path Cert:LocalMachine\MY -CodeSigningCert -ErrorAction Stop | Select-Object -ExpandProperty Thumbprint # Grab first certificate from local machine store
|
||||
|
||||
if ($certificate) {
|
||||
Write-Output "Checking certificate thumbprint $certificate"
|
||||
Get-ChildItem -Path Cert:LocalMachine\MY -ErrorAction SilentlyContinue | Where-Object {$_.Thumbprint -eq $certificate} # Prints certificate Thumbprint and Subject if found
|
||||
if($?) {
|
||||
$certThumbprint = $certificate
|
||||
}
|
||||
else {
|
||||
Write-Error "$certificate thumbprint not found, using $certThumbprint thumbprint instead"
|
||||
}
|
||||
}
|
||||
|
||||
Try {
|
||||
$signtoolPath = Resolve-Path "C:\Program Files*\Windows Kits\10\bin\*\x64\signtool.exe" -ErrorAction Stop | Select-Object -Last 1 -ExpandProperty Path
|
||||
$insigniaPath = Resolve-Path "C:\Program Files*\WiX*\bin\insignia.exe" -ErrorAction Stop | Select-Object -Last 1 -ExpandProperty Path
|
||||
}
|
||||
Catch {
|
||||
Write-Error "Signtool or Wix insignia not found! Exiting."
|
||||
}
|
||||
|
||||
function Write-Signature {
|
||||
param (
|
||||
$signtool,
|
||||
$thumbprint,
|
||||
$filename
|
||||
)
|
||||
|
||||
$attempts = 2
|
||||
$sleepSec = 5
|
||||
|
||||
Do {
|
||||
$attempts--
|
||||
Try {
|
||||
& $signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /sha1 $thumbprint /sm $filename
|
||||
& $signtool verify /pa /v $filename
|
||||
return
|
||||
}
|
||||
Catch {
|
||||
Write-Error $_.Exception.InnerException.Message -ErrorAction Continue
|
||||
Start-Sleep -Seconds $sleepSec
|
||||
}
|
||||
} while ($attempts -lt 0)
|
||||
|
||||
throw "Failed to sign $filename" # Bypassed in try block if the command is successful
|
||||
}
|
||||
|
||||
# Looping through each path insteaad of globbing to prevent hitting maximum command string length limit
|
||||
if ($exePath) {
|
||||
Write-Output "### Signing EXE files ###"
|
||||
$files = @(Get-ChildItem $exePath -Recurse *.exe | % { $_.FullName })
|
||||
foreach ($file in $files) {
|
||||
Write-Signature -signtool $signtoolPath -thumbprint $certThumbprint -filename $file
|
||||
}
|
||||
}
|
||||
|
||||
if ($packagePath) {
|
||||
Write-Output "### Signing CAB files ###"
|
||||
$files = @(Get-ChildItem $packagePath -Recurse *.cab | % { $_.FullName })
|
||||
foreach ($file in $files) {
|
||||
Write-Signature -signtool $signtoolPath -thumbprint $certThumbprint -filename $file
|
||||
}
|
||||
|
||||
Write-Output "### Signing MSI files ###"
|
||||
$files = @(Get-ChildItem $packagePath -Recurse *.msi | % { $_.FullName })
|
||||
foreach ($file in $files) {
|
||||
& $insigniaPath -im $files
|
||||
Write-Signature -signtool $signtoolPath -thumbprint $certThumbprint -filename $file
|
||||
}
|
||||
}
|
||||
|
||||
if ($bootstrapPath) {
|
||||
Write-Output "### Signing bootstrapper EXE ###"
|
||||
$files = @(Get-ChildItem $bootstrapPath -Recurse *.exe | % { $_.FullName })
|
||||
foreach ($file in $files) {
|
||||
& $insigniaPath -ib $file -o $tempPath\engine.exe
|
||||
Write-Signature -signtool $signtoolPath -thumbprint $certThumbprint -filename $tempPath\engine.exe
|
||||
& $insigniaPath -ab $tempPath\engine.exe $file -o $file
|
||||
Write-Signature -signtool $signtoolPath -thumbprint $certThumbprint -filename $file
|
||||
Remove-Item -Force $tempPath\engine.exe
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue