当前位置: 首页>>代码示例>>C++>>正文


C++ IDesktopPlatform::OpenLauncher方法代码示例

本文整理汇总了C++中IDesktopPlatform::OpenLauncher方法的典型用法代码示例。如果您正苦于以下问题:C++ IDesktopPlatform::OpenLauncher方法的具体用法?C++ IDesktopPlatform::OpenLauncher怎么用?C++ IDesktopPlatform::OpenLauncher使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDesktopPlatform的用法示例。


在下文中一共展示了IDesktopPlatform::OpenLauncher方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ShowStorePageForPlugin

void SAuthorizingPlugin::ShowStorePageForPlugin()
{
	IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();

	if ( DesktopPlatform != nullptr )
	{
		FOpenLauncherOptions StorePageOpen(FString(TEXT("/ue/marketplace/content/")) + PluginOfferId);
		DesktopPlatform->OpenLauncher(StorePageOpen);
	}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:10,代码来源:SAuthorizingPlugin.cpp

示例2: SubmitAndRestart

FReply FCrashReportClient::SubmitAndRestart()
{
	Submit();

	// Check for processes that were started from the Launcher using -EpicPortal on the command line
	bool bRunFromLauncher = FParse::Param(*FPrimaryCrashProperties::Get()->RestartCommandLine, TEXT("EPICPORTAL"));
	const FString CrashedAppPath = ErrorReport.FindCrashedAppPath();

	bool bLauncherRestarted = false;
	if (bRunFromLauncher)
	{
		// We'll restart Launcher-run processes by having the installed Launcher handle it
		IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();

		if (DesktopPlatform != nullptr)
		{
			// Split the path so we can format it as a URI
			TArray<FString> PathArray;
			CrashedAppPath.Replace(TEXT("//"), TEXT("/")).ParseIntoArray(PathArray, TEXT("/"), false);	// WER saves this out on Windows with double slashes as the separator for some reason.
			FString CrashedAppPathUri;

			// Exclude the last item (the filename). The Launcher currently expects an installed application folder.
			for (int32 ItemIndex = 0; ItemIndex < PathArray.Num() - 1; ItemIndex++)
			{
				FString& PathItem = PathArray[ItemIndex];
				CrashedAppPathUri += FPlatformHttp::UrlEncode(PathItem);
				CrashedAppPathUri += TEXT("/");
			}
			CrashedAppPathUri.RemoveAt(CrashedAppPathUri.Len() - 1);

			// Re-run the application via the Launcher
			FOpenLauncherOptions OpenOptions(FString::Printf(TEXT("apps/%s"), *CrashedAppPathUri));
			OpenOptions.bSilent = true;
			if (DesktopPlatform->OpenLauncher(OpenOptions))
			{
				bLauncherRestarted = true;
			}
		}
	}

	if (!bLauncherRestarted)
	{
		// Launcher didn't restart the process so start it ourselves
		const FString CommandLineArguments = FPrimaryCrashProperties::Get()->RestartCommandLine;
		FPlatformProcess::CreateProc(*CrashedAppPath, *CommandLineArguments, true, false, false, NULL, 0, NULL, NULL);
	}

	return FReply::Handled();
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:49,代码来源:CrashReportClient.cpp

示例3: RunLauncher

	virtual bool RunLauncher(ELauncherAction Action) const override
	{
		IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();
		if (DesktopPlatform != nullptr)
		{
			// Construct a url to tell the launcher of this app and what we want to do with it
			FOpenLauncherOptions LauncherOptions;
			LauncherOptions.LauncherRelativeUrl = TEXT("apps");
			LauncherOptions.LauncherRelativeUrl /= GetEncodedExePath();
			switch (Action)
			{
			case ELauncherAction::AppLaunch:
				LauncherOptions.LauncherRelativeUrl += TEXT("?action=launch");
				break;
			case ELauncherAction::AppUpdateCheck:
				LauncherOptions.LauncherRelativeUrl += TEXT("?action=updatecheck");
				break;
			};
			return DesktopPlatform->OpenLauncher(LauncherOptions);
		}
		return false;
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:22,代码来源:LauncherCheckModule.cpp

示例4: RefreshStatus

EActiveTimerReturnType SAuthorizingPlugin::RefreshStatus(double InCurrentTime, float InDeltaTime)
{
	// Engine tick isn't running when the modal window is open, so we need to tick any core tickers
	// to as that's what the RPC system uses to update the current state of RPC calls.
	FTaskGraphInterface::Get().ProcessThreadUntilIdle(ENamedThreads::GameThread);
	FTicker::GetCoreTicker().Tick(InDeltaTime);

	switch ( CurrentState )
	{
		case EPluginAuthorizationState::Initializing:
		{
			WaitingTime = 0;
			if ( PortalWindowService->IsAvailable() && PortalUserService->IsAvailable() )
			{
				CurrentState = EPluginAuthorizationState::AuthorizePlugin;
			}
			else
			{
				CurrentState = EPluginAuthorizationState::StartLauncher;
			}
			break;
		}
		case EPluginAuthorizationState::StartLauncher:
		{
			WaitingTime = 0;
			IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();

			if ( DesktopPlatform != nullptr )
			{
				if ( !FPlatformProcess::IsApplicationRunning(TEXT("EpicGamesLauncher")) &&
					 !FPlatformProcess::IsApplicationRunning(TEXT("EpicGamesLauncher-Mac-Shipping")) )
				{
					FOpenLauncherOptions SilentOpen;
					if ( DesktopPlatform->OpenLauncher(SilentOpen) )
					{
						CurrentState = EPluginAuthorizationState::StartLauncher_Waiting;
					}
					else
					{
						CurrentState = EPluginAuthorizationState::LauncherStartFailed;
					}
				}
				else
				{
					// If the process is found to be running already, move into the next state.
					CurrentState = EPluginAuthorizationState::StartLauncher_Waiting;
				}
			}
			else
			{
				CurrentState = EPluginAuthorizationState::LauncherStartFailed;
			}
			break;
		}
		case EPluginAuthorizationState::StartLauncher_Waiting:
		{
			if ( PortalWindowService->IsAvailable() && PortalUserService->IsAvailable() )
			{
				CurrentState = EPluginAuthorizationState::AuthorizePlugin;
			}
			else
			{
				WaitingTime += InDeltaTime;
			}
			break;
		}
		case EPluginAuthorizationState::AuthorizePlugin:
		{
			WaitingTime = 0;
			EntitlementResult = PortalUserService->IsEntitledToItem(PluginItemId, EEntitlementCacheLevelRequest::Memory);
			CurrentState = EPluginAuthorizationState::AuthorizePlugin_Waiting;
			break;
		}
		case EPluginAuthorizationState::AuthorizePlugin_Waiting:
		{
			WaitingTime += InDeltaTime;
			
			check(EntitlementResult.GetFuture().IsValid());
			if ( EntitlementResult.GetFuture().IsReady() )
			{
				FPortalUserIsEntitledToItemResult Entitlement = EntitlementResult.GetFuture().Get();
				if ( Entitlement.IsEntitled )
				{
					CurrentState = EPluginAuthorizationState::Authorized;
				}
				else
				{
					CurrentState = EPluginAuthorizationState::IsUserSignedIn;
				}
			}

			break;
		}
		case EPluginAuthorizationState::IsUserSignedIn:
		{
			WaitingTime = 0;
			UserDetailsResult = PortalUserService->GetUserDetails();
			CurrentState = EPluginAuthorizationState::IsUserSignedIn_Waiting;
			break;
		}
//.........这里部分代码省略.........
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:101,代码来源:SAuthorizingPlugin.cpp


注:本文中的IDesktopPlatform::OpenLauncher方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。