// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "SlateFwd.h" #include "Misc/Attribute.h" #include "Input/Reply.h" #include "Widgets/Views/STableViewBase.h" #include "Widgets/Views/STableRow.h" #include "IDetailCustomization.h" #include "ShaderFormatsPropertyDetails.h" #include "TargetPlatformAudioCustomization.h" #include "Containers/Ticker.h" class FMonitoredProcess; class IDetailLayoutBuilder; class IPropertyHandle; class SEditableTextBox; class SErrorText; ////////////////////////////////////////////////////////////////////////// // FProvision structure class FProvision { public: FString Name; FString FileName; FString Status; bool bDistribution; bool bSelected; bool bManuallySelected; }; typedef TSharedPtr ProvisionPtr; typedef TSharedPtr> ProvisionListPtr; ////////////////////////////////////////////////////////////////////////// // FCertificate structure class FCertificate { public: FString Name; FString Status; FString Expires; bool bSelected; bool bManuallySelected; }; typedef TSharedPtr CertificatePtr; typedef TSharedPtr> CertificateListPtr; ////////////////////////////////////////////////////////////////////////// // FIOSTargetSettingsCustomization class FIOSTargetSettingsCustomization : public IDetailCustomization { public: ~FIOSTargetSettingsCustomization(); // Makes a new instance of this detail layout class for a specific detail view requesting it static TSharedRef MakeInstance(); // IDetailCustomization interface virtual void CustomizeDetails(IDetailLayoutBuilder& DetailLayout) override; // End of IDetailCustomization interface EVisibility ShouldShowGenerateButtonForIcon(bool bCannotBeGenerated, FString ImageToCheck) const; private: TArray IconNames; TArray LaunchImageNames; TArray TvOSImageNames; const FString EngineInfoPath; const FString GameInfoPath; const FString EngineGraphicsPath; const FString GameGraphicsPath; const FString TVOSEngineGraphicsPath; const FString TVOSGameGraphicsPath; IDetailLayoutBuilder* SavedLayoutBuilder; // Is the manifest writable? TAttribute SetupForPlatformAttribute; bool bProvisionInstalled; bool bCertificateInstalled; bool bShowAllProvisions; bool bShowAllCertificates; bool bManuallySelected; TSharedPtr IPPProcess; FTSTicker::FDelegateHandle TickerHandle; TSharedPtr> ProvisionList; TArray FilteredProvisionList; TSharedPtr > ProvisionListView; TSharedPtr ProvisionInfoSwitcher; TSharedPtr> CertificateList; TArray FilteredCertificateList; TSharedPtr > CertificateListView; TSharedPtr CertificateInfoSwitcher; TAttribute RunningIPPProcess; TSharedPtr MobileProvisionProperty; TSharedPtr SignCertificateProperty; TSharedPtr ShaderVersionPropertyHandle; TSharedPtr MinOSPropertyHandle; TSharedPtr MRTPropertyHandle; TSharedPtr AutomaticSigningProperty; FString SelectedProvision; FString SelectedFile; FString SelectedCert; private: FIOSTargetSettingsCustomization(); void BuildPListSection(IDetailLayoutBuilder& DetailLayout); void BuildIconSection(IDetailLayoutBuilder& DetailLayout); void BuildRemoteBuildingSection(IDetailLayoutBuilder& DetailLayout); // Navigates to the plist in explorer or finder FReply OpenPlistFolder(); // Copies the setup files for the platform into the project void CopySetupFilesIntoProject(); // Builds an image row void BuildImageRow(class IDetailLayoutBuilder& DetailLayout, class IDetailCategoryBuilder& Category, const struct FPlatformIconInfo& Info, const FVector2D& MaxDisplaySize, bool bIsTVOS = false); // Install the provision FReply OnInstallProvisionClicked(); // Install the provision FReply OnInstallCertificateClicked(); // certificate request FReply OnCertificateRequestClicked(); FReply OnGenerateImageClicked(const FString SourceImagePath, const FString TargetImagePath, FIntPoint IconRequiredSize); // ssh key request FReply OnGenerateSSHKey(); // Get the image to display for the provision status const FSlateBrush* GetProvisionStatus() const; // Get the image to display for the certificate status const FSlateBrush* GetCertificateStatus() const; // find the installed certificates and provisions void FindRequiredFiles(); // Update the provision status void UpdateStatus(); // Update the ssh key status void UpdateSSHStatus(); // status tick delay bool UpdateStatusDelegate(float delay); // handle provision list generate row TSharedRef HandleProvisionListGenerateRow( ProvisionPtr Provision, const TSharedRef& OwnerTable ); // handle certificate list generate row TSharedRef HandleCertificateListGenerateRow( CertificatePtr Certificate, const TSharedRef& OwnerTable ); // handle which set of provisions to view void HandleAllProvisionsHyperlinkNavigate( bool AllProvisions ); // handle which set of provisions to view void HandleAllCertificatesHyperlinkNavigate( bool AllCertificates ); // filter the lists based on the settings void FilterLists(); // returns whether we are importing or not bool IsImportEnabled() const; // returns whether we are importing or not bool IsAutomaticSigningEnabled() const; // updates the bundle identifier if it is valid and checks for a matching provision/certificate void OnBundleIdentifierChanged(const FText& NewText, ETextCommit::Type, TSharedRef InPropertyHandle); // posts an error if the bundle identifier has become invalid void OnBundleIdentifierTextChanged(const FText& NewText, ETextCommit::Type, TSharedRef InPropertyHandle); // posts an error if the bundle identifier has become invalid void OnIOSTeamIDTextChanged(const FText& NewText, ETextCommit::Type, TSharedRef InPropertyHandle); // returns true if the given string is a valid bundle identifier bool IsBundleIdentifierValid(const FString& inIdentifier); // updates the text in the ini file and checks for a valid provision/certificate void OnRemoteServerChanged(const FText& NewText, ETextCommit::Type, TSharedRef InPropertyHandle); void HandleProvisionChanged(FString Provision); void HandleCertificateChanged(FString Certificate); /** Delegate handler to get the list of shader standards */ TSharedRef OnGetShaderVersionContent(); /** Delegate handler to get the description of the shader standard */ FText GetShaderVersionDesc() const; /** Delegate handler to get the list of shader standards */ TSharedRef OnGetMinVersionContent(); /** Delegate handler to get the description of the shader standard */ FText GetMinVersionDesc() const; void SetShaderStandard(int32 Value); void UpdateShaderStandardWarning(); void UpdateOSVersionWarning(); void UpdateMetalMRTWarning(); void UpdateGLVersionWarning(); void SetMinVersion(int32 Value); // FText GetBundleText(TSharedRef InPropertyHandle) const; // FText GetIOSTeamIDText(TSharedRef InPropertyHandle) const; /** Module callback for when the iOS settings tab is selected */ void OnSelect(); TSharedPtr< SEditableTextBox > BundleIdTextBox; TSharedPtr< SEditableTextBox > IOSTeamIDTextBox; /** Reference to the shader version property warning text box. */ TSharedPtr< SErrorText > ShaderVersionWarningTextBox; /** Reference to the shader version property warning text box. */ TSharedPtr< SErrorText > IOSVersionWarningTextBox; /** Reference to the os version property warning text box. */ TSharedPtr< SErrorText > GLVersionWarningTextBox; /** Structure used to manage audio plugin platform settings */ FAudioPluginWidgetManager AudioPluginWidgetManager; };