From 583020b3ae3e5721f4673c8e940381eda53352fc Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 14 Dec 2021 10:43:31 -0800 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFRemoves=20unused=20files=20from=20Aset?= =?UTF-8?q?Processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Tests/AssetBuilderApplicationTests.cpp | 1 + .../AssetBuilderSDK/AssetBuilderEBusHelper.h | 67 --------- .../assetprocessor_windows_files.cmake | 1 - .../Platform/Windows/native/resource.h | 26 ---- .../assetprocessor_test_files.cmake | 1 - .../native/AssetManager/AssetData.h | 134 ------------------ .../native/AssetManager/assetdata.cpp | 16 --- .../tests/resourcecompiler/RCJobTest.cpp | 2 - .../native/tests/resourcecompiler/RCJobTest.h | 13 -- 9 files changed, 1 insertion(+), 260 deletions(-) delete mode 100644 Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderEBusHelper.h delete mode 100644 Code/Tools/AssetProcessor/Platform/Windows/native/resource.h delete mode 100644 Code/Tools/AssetProcessor/native/AssetManager/AssetData.h delete mode 100644 Code/Tools/AssetProcessor/native/AssetManager/assetdata.cpp delete mode 100644 Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCJobTest.h diff --git a/Code/Tools/AssetProcessor/AssetBuilder/Tests/AssetBuilderApplicationTests.cpp b/Code/Tools/AssetProcessor/AssetBuilder/Tests/AssetBuilderApplicationTests.cpp index 679b4a0a04..1b86c3aa2c 100644 --- a/Code/Tools/AssetProcessor/AssetBuilder/Tests/AssetBuilderApplicationTests.cpp +++ b/Code/Tools/AssetProcessor/AssetBuilder/Tests/AssetBuilderApplicationTests.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderEBusHelper.h b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderEBusHelper.h deleted file mode 100644 index 6a29e0c36a..0000000000 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderEBusHelper.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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 - * - */ -#ifndef ASSETBUILDERUTILEBUSHELPER_H -#define ASSETBUILDERUTILEBUSHELPER_H - -#include -#include -#include -#include -#include - -namespace AssetBuilderSDK -{ - //!This EBUS is used to send commands from the assetprocessor to the builder - class AssetBuilderCommandBusTraits - : public AZ::EBusTraits - { - public: - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - typedef AZ::Uuid BusIdType; - typedef AZStd::recursive_mutex MutexType; - - virtual ~AssetBuilderCommandBusTraits() {} - - //Shutdown the builder. - virtual void ShutDown() {} - }; - - typedef AZ::EBus AssetBuilderCommandBus; - - //!Information that builders will send to the assetprocessor - struct AssetBuilderDesc - { - AZStd::string m_name;//builder name - AZStd::string m_regex;//builder regex - AZ::Uuid m_busId;// builder id - }; - - //!This EBUS is used to send information from the builder to the AssetProcessor - class AssetBuilderBusTraits - : public AZ::EBusTraits - { - public: - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - typedef AZStd::recursive_mutex MutexType; - - virtual ~AssetBuilderBusTraits() {} - - //Use this function to send AssetBuilderDesc info to the assetprocessor - virtual void RegisterBuilderInformation(AssetBuilderDesc builderDesc) {} - - //Use this function to register all the component descriptors - virtual void RegisterComponentDescriptor(AZ::ComponentDescriptor* descriptor) {} - }; - - typedef AZ::EBus AssetBuilderBus; -} - - -#endif //ASSETBUILDERUTILEBUSHELPER_H diff --git a/Code/Tools/AssetProcessor/Platform/Windows/assetprocessor_windows_files.cmake b/Code/Tools/AssetProcessor/Platform/Windows/assetprocessor_windows_files.cmake index 96dd7434c1..39e697bf40 100644 --- a/Code/Tools/AssetProcessor/Platform/Windows/assetprocessor_windows_files.cmake +++ b/Code/Tools/AssetProcessor/Platform/Windows/assetprocessor_windows_files.cmake @@ -10,5 +10,4 @@ set(FILES native/FileWatcher/FileWatcher_platform.h native/FileWatcher/FileWatcher_windows.cpp native/FileWatcher/FileWatcher_windows.h - native/resource.h ) diff --git a/Code/Tools/AssetProcessor/Platform/Windows/native/resource.h b/Code/Tools/AssetProcessor/Platform/Windows/native/resource.h deleted file mode 100644 index 38259ae0f0..0000000000 --- a/Code/Tools/AssetProcessor/Platform/Windows/native/resource.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 - * - */ - -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Editor.rc -// -#define IDI_ICON1 2 -#define IDC_STATIC -1 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 3 -#define _APS_NEXT_COMMAND_VALUE 32769 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 110 -#endif -#endif diff --git a/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake b/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake index a7a46ad62c..20ab4b706d 100644 --- a/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake +++ b/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake @@ -25,7 +25,6 @@ set(FILES native/tests/resourcecompiler/RCControllerTest.cpp native/tests/resourcecompiler/RCControllerTest.h native/tests/resourcecompiler/RCJobTest.cpp - native/tests/resourcecompiler/RCJobTest.h native/tests/assetBuilderSDK/assetBuilderSDKTest.h native/tests/assetBuilderSDK/assetBuilderSDKTest.cpp native/tests/assetBuilderSDK/SerializationDependenciesTests.cpp diff --git a/Code/Tools/AssetProcessor/native/AssetManager/AssetData.h b/Code/Tools/AssetProcessor/native/AssetManager/AssetData.h deleted file mode 100644 index a03d831283..0000000000 --- a/Code/Tools/AssetProcessor/native/AssetManager/AssetData.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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 - * - */ -#ifndef ASSETPROCESSOR_ASSETDATA_H -#define ASSETPROCESSOR_ASSETDATA_H - -#include -#include -#include -#include -#include -#include -#include - -namespace AssetProcessor -{ - using namespace AzToolsFramework::AssetDatabase; - - //Check the extension of all the products - //return true if any one of the product extension matches the input extension, else return false - bool CheckProductsExtension( const ProductDatabseEntryContainer& products, const char* ext ); - - //! this is the interface which we use to speak to the legacy database tables. - // its known as the legacy database interface because the forthcoming tables will completely replace these - // but this layer exits for compatibility with the previous version and allows us to upgrade in place. - class AssetDatabaseInterface - { - public: - - AssetDatabaseInterface() - { - qRegisterMetaType( "SourceEntry" ); - qRegisterMetaType( "ProductEntry" ); - qRegisterMetaType( "SourceEntryContainer" ); - qRegisterMetaType( "ProductEntryContainer" ); - } - - virtual ~AssetDatabaseInterface() - { - } - - //! Returns true if the database or file exists already - virtual bool DataExists() = 0; - - //! Actually connects to the database, loads it, or creates empty database depending on above. - virtual void LoadData() = 0; - - //! Use with care. Resets all data! This causes an immediate commit and save! - virtual void ClearData() = 0; - - //! Retrieve the scan folders - virtual void GetScanFolders(QStringList& scanFolderList) = 0; - - //! Retrieves a specific scan folder by id, return false if not found - virtual bool GetScanFolder(AZ::s64 scanFolderID, QString& scanFolder) = 0; - - //! Adds a scan folder - virtual AZ::s64 AddScanFolder(QString scanFolder) = 0; - - // ! remove a scanfolder - virtual void RemoveScanFolder(AZ::s64 scanFolderID) = 0; - virtual void RemoveScanFolder(QString scanFolder) = 0; - - //! query the scanFolder ID for a given folder, return false if not found - virtual bool GetScanFolderID(QString scanfolder, AZ::s64& scanFolderID) = 0; - - //! query the sourceID of a source - virtual bool GetSourceID(QString sourceName, QString jobDescription, AZ::s64& sourceID) = 0; - - //! Retrieve the fingerprint for a given source name on a given platform for a particular jobDescription - //! This could return zero if its never seen this file before. - virtual bool GetFingerprintForSource(QString sourceName, QString jobDescription, AZ::u32& fingerprint) = 0; - - //! Set the fingerprint for the given source name, platform and jobDescription to the value provided - //! If updating a existing fingerprint you do not have to supply guid or scanfolderid - virtual void SetSource(QString sourceName, QString jobDescription, AZ::u32 fingerprint, AZ::Uuid guid = AZ::Uuid::CreateNull(), AZ::s64 scanFolderID = 0) = 0; - - //! Removing a fingerprint will destroy its entry in the database - //! and any entries that refer to it (products, etc). if you want to merely set it dirty - //! Then instead call SetSource to zero - virtual void RemoveSource(QString sourceName, QString jobDescription) = 0; - virtual void RemoveSource(AZ::s64 sourceID) = 0; - - //! Given a source name, jobDescription, and platform return the list of products by the last compile of that file - //! returns false if it doesn't know about source or if the source did not emitted any products. - virtual bool GetProductsForSource(QString sourceName, QString jobDescription, ProductDatabseEntryContainer& products, QString platform = QString()) = 0; - - //! Given a source name and platform return the list of all jobDescriptions associated with them from the last compile of that file - //! returns false if it doesn't know about any job description for that source and platform. - virtual bool GetJobDescriptionsForSource(QString sourceName, QStringList& jobDescription) = 0; - - //! Given an product file name, compute source file name - //! False is returned if its never heard of that product. - virtual bool GetSourceFromProductName(QString productName, SourceDatabaseEntry& source) = 0; - - //! For a given source, set the list of products for that source. - //! Removes any data that's present and overwrites it with the new list - //! Note that an empty list is acceptable data, it means the source emitted no products - virtual void SetProductsForSource(QString sourceName, QString jobDescription, const ProductDatabseEntryContainer& productList = ProductDatabseEntryContainer(), QString platform = QString()) = 0; - - //! Clear the products for a given source. This removes the entry entirely, not just sets it to empty. - virtual void RemoveProducts(QString sourceName, QString jobDescription, QString platform = QString()) = 0; - virtual void RemoveProduct(AZ::s64 productID) = 0; - - //! GetMatchingProductFiles - checks the database for all products that begin with the given match check - //! Note that the input string is expected to not include the cache folder - //! so it probably starts with platform name. - virtual void GetMatchingProducts(QString matchCheck, ProductDatabseEntryContainer& products, QString platform = QString()) = 0; - - //! GetMatchingSourceFiles - checks the database for all source files that begin with the given match check - //! note that the input string is expected to be the relative path name - //! and the output is the relative name (so to convert it to a full path, you will need to call the appropriate function) - virtual void GetMatchingSources(QString matchCheck, SourceDatabaseEntryContainer& sources) = 0; - - //! Get a giant list of ALL known source files in the database. - virtual void GetSources(SourceDatabaseEntryContainer& sources) = 0; - - //! Get a giant list of ALL known products in the database. - virtual void GetProducts(ProductDatabseEntryContainer& products, QString platform = QString()) = 0; - - //! finds all elements in the database that ends with the given input. (Used to look things up by extensions, in general) - virtual void GetSourcesByExtension(QString extension, SourceDatabaseEntryContainer& sources) = 0; - - //! SetJobLogForSource updates the Job Log table to record the status of a particular job. - //! It also sets all prior jobs that match that job exactly to not be the "latest one" but keeps them in the database. - virtual void SetJobLogForSource(AZ::s64 jobId, const AZStd::string& sourceName, const AZStd::string& platform, const AZ::Uuid& builderUuid, const AZStd::string& jobKey, AzToolsFramework::AssetProcessor::JobStatus status) = 0; - }; -} // namespace AssetProcessor - -#endif // ASSETPROCESSOR_ASSETDATA_H diff --git a/Code/Tools/AssetProcessor/native/AssetManager/assetdata.cpp b/Code/Tools/AssetProcessor/native/AssetManager/assetdata.cpp deleted file mode 100644 index aa433ebb3e..0000000000 --- a/Code/Tools/AssetProcessor/native/AssetManager/assetdata.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 "AssetData.h" -#include -#include - -namespace AssetProcessor -{ - -} - diff --git a/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCJobTest.cpp b/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCJobTest.cpp index e639e75351..aad990ac72 100644 --- a/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCJobTest.cpp +++ b/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCJobTest.cpp @@ -6,8 +6,6 @@ * */ -#include "RCJobTest.h" - #include #include diff --git a/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCJobTest.h b/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCJobTest.h deleted file mode 100644 index cd9c8a108e..0000000000 --- a/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCJobTest.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * 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 - -