Announcement

Collapse
No announcement yet.

Problem packaging plugin containing slate

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem packaging plugin containing slate

    Hi,

    I've built a plugin which adds a new widget to the editor, containing one extention of SCompoundWidget and one of UWidget.
    It currently only packages in C++ projects, but I also want it to package on blueprint-only projects as well and also be able to put it on the marketplace.
    Therefore I need the Edit->Plugins->Package (I think, because it prebuilts the needed files?) but this packager stops and throws back 9 errors (just related to slate macros), here the log:

    Code:
    UATHelper: Package Plugin Task (Windows):   Parsing headers for UE4Editor
    UATHelper: Package Plugin Task (Windows):     Running UnrealHeaderTool UE4Editor "C:\Program Files\Epic Games\UE_4.22\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
    UATHelper: Package Plugin Task (Windows):   Reflection code generated for UE4Editor in 7,018124 seconds
    UATHelper: Package Plugin Task (Windows):   Writing manifest to C:\Users\Patrick\Desktop\RadarChart\HostProject\Saved\Manifest-UE4Editor-Win64-Development.xml
    UATHelper: Package Plugin Task (Windows):   Using Visual Studio 2017 14.16.27023 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023) and Windows 10.0.17763.0 SDK (C:\Program Files (x86)\Windows Kits\10).
    UATHelper: Package Plugin Task (Windows):   Building 7 actions with 16 processes...
    UATHelper: Package Plugin Task (Windows):     [1/7] Default.rc2
    UATHelper: Package Plugin Task (Windows):     [2/7] RadarChart.init.gen.cpp
    UATHelper: Package Plugin Task (Windows):     [3/7] RadarChart.gen.cpp
    UATHelper: Package Plugin Task (Windows):     [4/7] RadarChart.cpp
    UATHelper: Package Plugin Task (Windows):     [5/7] UE4Editor-RadarChart.lib
    UATHelper: Package Plugin Task (Windows):        Bibliothek "C:\Users\Patrick\Desktop\RadarChart\HostProject\Plugins\RadarChart\Intermediate\Build\Win64\UE4Editor\Development\RadarChart\UE4Editor-RadarChart.lib" und Objekt "C:\Users\Patrick\Desktop\RadarChart\HostProject\Plugins\RadarChart\Intermediate\Build\Win64\UE4Editor\Development\RadarChart\UE4Editor-R
    adarChart.exp" werden erstellt.
    UATHelper: Package Plugin Task (Windows):     [6/7] UE4Editor-RadarChart.dll
    UATHelper: Package Plugin Task (Windows):        Bibliothek "C:\Users\Patrick\Desktop\RadarChart\HostProject\Plugins\RadarChart\Intermediate\Build\Win64\UE4Editor\Development\RadarChart\UE4Editor-RadarChart.suppressed.lib" und Objekt "C:\Users\Patrick\Desktop\RadarChart\HostProject\Plugins\RadarChart\Intermediate\Build\Win64\UE4Editor\Development\RadarChart\
    UE4Editor-RadarChart.suppressed.exp" werden erstellt.
    UATHelper: Package Plugin Task (Windows):     [7/7] UE4Editor.target
    UATHelper: Package Plugin Task (Windows):   Total time in Parallel executor: 2,98 seconds
    UATHelper: Package Plugin Task (Windows):   Total execution time: 12,21 seconds
    UATHelper: Package Plugin Task (Windows): Took 12,2861729s to run UnrealBuildTool.exe, ExitCode=0
    UATHelper: Package Plugin Task (Windows): Building plugin for target platforms: Android, IOS, HTML5, Win64, Win32
    UATHelper: Package Plugin Task (Windows): Running: C:\Program Files\Epic Games\UE_4.22\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game Android Development -plugin=C:\Users\Patrick\Desktop\RadarChart\HostProject\Plugins\RadarChart\RadarChart.uplugin -iwyu -noubtmakefiles -manifest=C:\Users\Patrick\Desktop\RadarChart\HostProject\Saved\Manifest-UE4Game-Andro
    id-Development.xml -nohotreload -log="C:\Users\Patrick\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\UBT-UE4Game-Android-Development.txt"
    UATHelper: Package Plugin Task (Windows):   PLATFORM_ANDROID_NDK_VERSION = 140200
    UATHelper: Package Plugin Task (Windows):   NDK toolchain: r14b, NDK version: 23, GccVersion: 4.9, ClangVersion: 3.8.275480
    UATHelper: Package Plugin Task (Windows):   Parsing headers for UE4Game
    UATHelper: Package Plugin Task (Windows):     Running UnrealHeaderTool UE4Game "C:\Program Files\Epic Games\UE_4.22\Engine\Intermediate\Build\Android\UE4\Development\UE4Game.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
    UATHelper: Package Plugin Task (Windows):   Reflection code generated for UE4Game in 4,5968023 seconds
    UATHelper: Package Plugin Task (Windows):   Compiling Native code with NDK API 'android-23'
    UATHelper: Package Plugin Task (Windows):   Writing manifest to C:\Users\Patrick\Desktop\RadarChart\HostProject\Saved\Manifest-UE4Game-Android-Development.xml
    UATHelper: Package Plugin Task (Windows):   Building 3 actions with 16 processes...
    UATHelper: Package Plugin Task (Windows):     [1/3] RadarChart.init.gen.cpp [armv7-es2]
    UATHelper: Package Plugin Task (Windows):     [2/3] RadarChart.gen.cpp [armv7-es2]
    UATHelper: Package Plugin Task (Windows):     In file included from C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Intermediate/Build/Android/UE4/Inc/RadarChart/RadarChart.gen.cpp:8:
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source\RadarChart/Public/RadarChart.h(111,2):  error: unknown type name 'SLATE_BEGIN_ARGS'
    UATHelper: Package Plugin Task (Windows):             SLATE_BEGIN_ARGS(SRadarChart)
    UATHelper: Package Plugin Task (Windows):             ^
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source\RadarChart/Public/RadarChart.h(112,4):  error: expected ';' at end of declaration list
    UATHelper: Package Plugin Task (Windows):             {}
    UATHelper: Package Plugin Task (Windows):               ^
    UATHelper: Package Plugin Task (Windows):               ;
    UATHelper: Package Plugin Task (Windows):     2 errors generated.
    UATHelper: Package Plugin Task (Windows):     [3/3] RadarChart.cpp [armv7-es2]
    UATHelper: Package Plugin Task (Windows):     In file included from C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp:2:
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Public\RadarChart.h(111,2):  error: unknown type name 'SLATE_BEGIN_ARGS'
    UATHelper: Package Plugin Task (Windows):             SLATE_BEGIN_ARGS(SRadarChart)
    UATHelper: Package Plugin Task (Windows):             ^
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Public\RadarChart.h(112,4):  error: expected ';' at end of declaration list
    UATHelper: Package Plugin Task (Windows):             {}
    UATHelper: Package Plugin Task (Windows):               ^
    UATHelper: Package Plugin Task (Windows):               ;
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp(66,35):  error: unknown type name 'FArguments'
    UATHelper: Package Plugin Task (Windows):     void SRadarChart::Construct(const FArguments& InArgs)
    UATHelper: Package Plugin Task (Windows):                                       ^
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp(68,2):  error: cannot initialize object parameter of type 'SWidget' with an expression of type 'SRadarChart'
    UATHelper: Package Plugin Task (Windows):             SetCanTick(false);
    UATHelper: Package Plugin Task (Windows):             ^~~~~~~~~~
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp(371,26):  error: cannot initialize object parameter of type 'const SCompoundWidget' with an expression of type 'const SRadarChart'
    UATHelper: Package Plugin Task (Windows):             return SCompoundWidget::OnPaint(Args, AllottedGeometry, MyClippingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
    UATHelper: Package Plugin Task (Windows):                                     ^~~~~~~
    UATHelper: Package Plugin Task (Windows):     In file included from C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp:4:
    UATHelper: Package Plugin Task (Windows):     In file included from C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/Slate/Public\Framework/Application/SlateApplication.h:20:
    UATHelper: Package Plugin Task (Windows):     In file included from C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/SlateCore/Public\Widgets/SWindow.h:23:
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/SlateCore/Public\Widgets/DeclarativeSyntaxSupport.h(1080,65):  error: no type named 'FArguments' in 'SRadarChart'
    UATHelper: Package Plugin Task (Windows):             TSharedRef<WidgetType> operator<<=( const typename WidgetType::FArguments& InArgs ) const
    UATHelper: Package Plugin Task (Windows):                                                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp(565,21):  note: in instantiation of template class 'TDecl<SRadarChart, RequiredArgs::T0RequiredArgs>' requested here
    UATHelper: Package Plugin Task (Windows):             RadarChartWidget = SNew(SRadarChart);
    UATHelper: Package Plugin Task (Windows):                                ^
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/SlateCore/Public\Widgets/DeclarativeSyntaxSupport.h(33,2):  note: expanded from macro 'SNew'
    UATHelper: Package Plugin Task (Windows):             MakeTDecl<WidgetType>( #WidgetType, __FILE__, __LINE__, RequiredArgs::MakeRequiredArgs(__VA_ARGS__) ) <<= TYPENAME_OUTSIDE_TEMPLATE WidgetType::FArguments()
    UATHelper: Package Plugin Task (Windows):             ^
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp(565,21):  error: no type named 'FArguments' in 'SRadarChart'
    UATHelper: Package Plugin Task (Windows):             RadarChartWidget = SNew(SRadarChart);
    UATHelper: Package Plugin Task (Windows):                                ^~~~~~~~~~~~~~~~~
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/SlateCore/Public\Widgets/DeclarativeSyntaxSupport.h(33,146):  note: expanded from macro 'SNew'
    UATHelper: Package Plugin Task (Windows):             MakeTDecl<WidgetType>( #WidgetType, __FILE__, __LINE__, RequiredArgs::MakeRequiredArgs(__VA_ARGS__) ) <<= TYPENAME_OUTSIDE_TEMPLATE WidgetType::FArguments()
    UATHelper: Package Plugin Task (Windows):                                                                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp(567,9):  error: no viable conversion from returned value of type 'TSharedRef<SRadarChart, [...]>' to function return type 'TSharedRef<SWidget, [...]>'
    UATHelper: Package Plugin Task (Windows):             return RadarChartWidget.ToSharedRef();
    UATHelper: Package Plugin Task (Windows):                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/Core/Public\Templates/SharedPointer.h(285,14):  note: candidate constructor not viable: no known conversion from 'TSharedRef<SRadarChart, (ESPMode)1>' to 'const TSharedRef<SWidget, ESPMode::Fast> &' for 1st argument
    UATHelper: Package Plugin Task (Windows):             FORCEINLINE TSharedRef( TSharedRef const& InSharedRef )
    UATHelper: Package Plugin Task (Windows):                         ^
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/Core/Public\Templates/SharedPointer.h(290,14):  note: candidate constructor not viable: no known conversion from 'TSharedRef<SRadarChart, (ESPMode)1>' to 'TSharedRef<SWidget, ESPMode::Fast> &&' for 1st argument
    UATHelper: Package Plugin Task (Windows):             FORCEINLINE TSharedRef( TSharedRef&& InSharedRef )
    UATHelper: Package Plugin Task (Windows):                         ^
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/Core/Public\Templates/SharedPointer.h(212,14):  note: candidate template ignored: could not match 'FRawPtrProxy' against 'TSharedRef'
    UATHelper: Package Plugin Task (Windows):             FORCEINLINE TSharedRef( SharedPointerInternals::FRawPtrProxy< OtherType > const& InRawPtrProxy )
    UATHelper: Package Plugin Task (Windows):                         ^
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/Core/Public\Templates/SharedPointer.h(235,14):  note: candidate template ignored: substitution failure [with OtherType = SRadarChart]: no type named 'Type' in 'TEnableIf<false, void>'
    UATHelper: Package Plugin Task (Windows):             FORCEINLINE TSharedRef( TSharedRef< OtherType, Mode > const& InSharedRef )
    UATHelper: Package Plugin Task (Windows):                         ^
    UATHelper: Package Plugin Task (Windows):     In file included from C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp:4:
    UATHelper: Package Plugin Task (Windows):     In file included from C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/Slate/Public\Framework/Application/SlateApplication.h:20:
    UATHelper: Package Plugin Task (Windows):     In file included from C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/SlateCore/Public\Widgets/SWindow.h:23:
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/SlateCore/Public\Widgets/DeclarativeSyntaxSupport.h(1037,3):  error: cannot initialize object parameter of type 'SWidget' with an expression of type 'SRadarChart'
    UATHelper: Package Plugin Task (Windows):                     _Widget->SetDebugInfo( InType, InFile, OnLine, sizeof(WidgetType) );
    UATHelper: Package Plugin Task (Windows):                     ^~~~~~~
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/SlateCore/Public\Widgets/DeclarativeSyntaxSupport.h(1111,9):  note: in instantiation of member function 'TDecl<SRadarChart, RequiredArgs::T0RequiredArgs>::TDecl' requested here
    UATHelper: Package Plugin Task (Windows):             return TDecl<WidgetType, RequiredArgsPayloadType>(InType, InFile, OnLine, Forward<RequiredArgsPayloadType>(InRequiredArgs));
    UATHelper: Package Plugin Task (Windows):                    ^
    UATHelper: Package Plugin Task (Windows):     C:/Users/Patrick/Desktop/RadarChart/HostProject/Plugins/RadarChart/Source/RadarChart/Private/RadarChart.cpp(565,21):  note: in instantiation of function template specialization 'MakeTDecl<SRadarChart, RequiredArgs::T0RequiredArgs>' requested here
    UATHelper: Package Plugin Task (Windows):             RadarChartWidget = SNew(SRadarChart);
    UATHelper: Package Plugin Task (Windows):                                ^
    UATHelper: Package Plugin Task (Windows):     C:/Program Files/Epic Games/UE_4.22/Engine/Source/Runtime/SlateCore/Public\Widgets/DeclarativeSyntaxSupport.h(33,2):  note: expanded from macro 'SNew'
    UATHelper: Package Plugin Task (Windows):             MakeTDecl<WidgetType>( #WidgetType, __FILE__, __LINE__, RequiredArgs::MakeRequiredArgs(__VA_ARGS__) ) <<= TYPENAME_OUTSIDE_TEMPLATE WidgetType::FArguments()
    UATHelper: Package Plugin Task (Windows):             ^
    UATHelper: Package Plugin Task (Windows):     9 errors generated.
    UATHelper: Package Plugin Task (Windows): Took 9,5932878s to run UnrealBuildTool.exe, ExitCode=5
    UATHelper: Package Plugin Task (Windows): ERROR: UnrealBuildTool failed. See log for more details. (C:\Users\Patrick\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\UBT-UE4Game-Android-Development.txt)
    UATHelper: Package Plugin Task (Windows):        (see C:\Users\Patrick\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\Log.txt for full exception trace)
    UATHelper: Package Plugin Task (Windows): AutomationTool exiting with ExitCode=5 (5)
    UATHelper: Package Plugin Task (Windows): BUILD FAILED
    As you can see it says error unknown type name "SLATE_BEGIN_ARGS", expected ";" and so on....
    My plugin build.cs looks like this:
    Code:
    using UnrealBuildTool;
    
    public class RadarChart : ModuleRules
    {
        public RadarChart(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
    
            PublicIncludePaths.AddRange(
                new string[] {
                    // ... add public include paths required here ...
                }
                );
    
            PrivateIncludePaths.AddRange(
                new string[] {
            // ... add other private include paths required here ...
        }
                );
    
            PublicDependencyModuleNames.AddRange(
                new string[]
                {
                    // ... add other public dependencies that you statically link with here ...
                    "Core",
                    "CoreUObject",
                    "Engine",
                    "InputCore",
                    "UMG",
                    "Projects",
                }
                );
    
            PrivateDependencyModuleNames.AddRange(
                new string[]
                {
                    // ... add private dependencies that you statically link with here ...    
    
                    "Slate",
                    "SlateCore",
                }
                );
    
            DynamicallyLoadedModuleNames.AddRange(
                new string[]
                {
                    // ... add any modules that your module loads dynamically here ...
                }
                );
        }
    }
    PS. this is my first plugin, so I'm not sure if I'm missing just something basic or messed something up
    btw. Is it posible to prebuilt the plugin for mac/ios if I do not own such device?


    [PLUGIN] Free Radar Chart Widget

    #2
    That kind of error usually means you are missing an #include somewhere.

    Comment


      #3
      Code:
      #include "SlateBasics.h"
      Code:
      #include "SlateExtras.h"
      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

      Comment


        #4
        Hm I thought so, therefore I checked couple times what could be missing.
        For example: before the plugin packager log told me that some headers could not be found (for example IPluginManager) and in thath case I just needed to change it from #include "IPluginManager.h "to "Interfaces/IPluginManager.h".
        But after I fixed that I got these 9 slate related errors and the log doesn't say which header can't be found, I think it must be someone related with the slate macros, but I can't find the right one... Any idea?

        ------

        edit:


        Originally posted by BrUnO XaVIeR View Post
        Code:
        #include "SlateBasics.h"
        Code:
        #include "SlateExtras.h"



        ah now it works, thanks Bruno!

        note: because those two are monolihic headers it throws a warning, but thanks to you I could narrow it down to the specific smaller one I needed, it is: "Framework/Application/SlateApplication.h"
        Last edited by pDunkl; 06-13-2019, 02:28 PM.


        [PLUGIN] Free Radar Chart Widget

        Comment


          #5
          Another problem occured, I've tried now for several hours to fix it, by following a couple posts and Rama's tutorial about a marketplace plugin creation by using RunUAT.bat... but sadly no succes.

          If I try to start the game via Project Launcher this message appears while deploying (for android):
          Code:
          ERROR: Stage Failed. Missing receipt 'D:\UnrealProjects\RadarChartExample\Binaries\Android\RadarChartExample.target'. Check that this target has been built.
          and here for Win64 shipping:
          Code:
          ERROR: Stage Failed. Missing receipt 'D:\UnrealProjects\RadarChartExample\Binaries\Win64\RadarChartExample-Win64-Shipping.target'. Check that this target has been built.
          Only if I package the project (file->desired platform (with desired build config) first, and than I can launch it with the Project Launcher afterwards without problems but only for the same platform with the same build config.
          I think it only happens in a blueprint only project.
          But testing with plugins from other people from the marketplace I don't have to do that, they work at the first place.
          I tried (as mentioned) the RunUAT.bat method, the Edit->Plugins->PackagePlugin method, and build inside Visual Studio with selected project config and platform.
          I do have the precompiled files in the plugin's intermediate folder though.
          Last edited by pDunkl; 06-13-2019, 06:25 PM.


          [PLUGIN] Free Radar Chart Widget

          Comment

          Working...
          X