Integrating latest 47acbe8
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/ProjectManager/ProjectManager.h>
|
||||
#include <AzCore/PlatformIncl.h>
|
||||
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
namespace ProjectManager
|
||||
{
|
||||
bool LaunchProjectManager()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} // ProjectManager
|
||||
} // AzFramework
|
||||
|
||||
@@ -15,6 +15,7 @@ set(FILES
|
||||
AzFramework/API/ApplicationAPI_Platform.h
|
||||
AzFramework/API/ApplicationAPI_Android.h
|
||||
AzFramework/Application/Application_Android.cpp
|
||||
AzFramework/ProjectManager/ProjectManager_Android.cpp
|
||||
../Common/Unimplemented/AzFramework/Asset/AssetSystemComponentHelper_Unimplemented.cpp
|
||||
AzFramework/IO/LocalFileIO_Android.cpp
|
||||
../Common/Default/AzFramework/Network/AssetProcessorConnection_Default.cpp
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/ProjectManager/ProjectManager.h>
|
||||
#include <AzCore/PlatformIncl.h>
|
||||
|
||||
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
namespace ProjectManager
|
||||
{
|
||||
bool LaunchProjectManager()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} // ProjectManager
|
||||
} // AzFramework
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/ProjectManager/ProjectManager.h>
|
||||
#include <AzCore/PlatformIncl.h>
|
||||
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
namespace ProjectManager
|
||||
{
|
||||
bool LaunchProjectManager()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} // ProjectManager
|
||||
} // AzFramework
|
||||
|
||||
@@ -16,6 +16,7 @@ set(FILES
|
||||
AzFramework/API/ApplicationAPI_Linux.h
|
||||
AzFramework/Application/Application_Linux.cpp
|
||||
AzFramework/Asset/AssetSystemComponentHelper_Linux.cpp
|
||||
AzFramework/ProjectManager/ProjectManager_Linux.cpp
|
||||
../Common/UnixLike/AzFramework/IO/LocalFileIO_UnixLike.cpp
|
||||
../Common/Default/AzFramework/Network/AssetProcessorConnection_Default.cpp
|
||||
../Common/Unimplemented/AzFramework/StreamingInstall/StreamingInstall_Unimplemented.cpp
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/ProjectManager/ProjectManager.h>
|
||||
#include <AzCore/PlatformIncl.h>
|
||||
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
namespace ProjectManager
|
||||
{
|
||||
bool LaunchProjectManager()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} // ProjectManager
|
||||
} // AzFramework
|
||||
|
||||
@@ -61,8 +61,6 @@ namespace AzFramework
|
||||
const WindowGeometry& geometry,
|
||||
const WindowStyleMasks& styleMasks)
|
||||
{
|
||||
AZ_UNUSED(windowType);
|
||||
|
||||
m_width = geometry.m_width;
|
||||
m_height = geometry.m_height;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ set(FILES
|
||||
AzFramework/API/ApplicationAPI_Mac.h
|
||||
AzFramework/Application/Application_Mac.mm
|
||||
AzFramework/Asset/AssetSystemComponentHelper_Mac.cpp
|
||||
AzFramework/ProjectManager/ProjectManager_Mac.cpp
|
||||
../Common/UnixLike/AzFramework/IO/LocalFileIO_UnixLike.cpp
|
||||
../Common/Default/AzFramework/Network/AssetProcessorConnection_Default.cpp
|
||||
../Common/Unimplemented/AzFramework/StreamingInstall/StreamingInstall_Unimplemented.cpp
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/ProjectManager/ProjectManager.h>
|
||||
#include <AzCore/PlatformIncl.h>
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
#include <AzCore/IO/SystemFile.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
#include <AzFramework/Engine/Engine.h>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
namespace ProjectManager
|
||||
{
|
||||
bool LaunchProjectManager()
|
||||
{
|
||||
const char projectsScript[] = "projects.py";
|
||||
|
||||
AZ_Warning("ProjectManager", false, "No project provided - launching project selector.");
|
||||
|
||||
AZ::IO::FixedMaxPath enginePath = Engine::FindEngineRoot();
|
||||
if (enginePath.empty())
|
||||
{
|
||||
AZ_Warning("ProjectManager", false, "Couldn't find engine root");
|
||||
return false;
|
||||
}
|
||||
auto projectManagerPath = enginePath / "scripts" / "project_manager";
|
||||
|
||||
if (!AZ::IO::SystemFile::Exists((projectManagerPath / projectsScript).c_str()))
|
||||
{
|
||||
AZ_Warning("ProjectManager", false, "%s not found at %s!", projectsScript, projectManagerPath.c_str());
|
||||
}
|
||||
char executablePath[AZ_MAX_PATH_LEN];
|
||||
AZ::Utils::GetExecutablePathReturnType result = AZ::Utils::GetExecutablePath(executablePath, AZ_MAX_PATH_LEN);
|
||||
auto exeFolder = AZ::IO::PathView(executablePath).ParentPath().Filename().Native();
|
||||
AZStd::fixed_string<10> debugOption{ " " };
|
||||
if (exeFolder == "debug")
|
||||
{
|
||||
// We need to use the debug version of the python interpreter to load up our debug version of our libraries which work with the debug version of QT living in this folder
|
||||
debugOption = " debug ";
|
||||
}
|
||||
AZ::IO::FixedMaxPath pythonPath = enginePath / "python" / "python.cmd";
|
||||
auto cmdPath = AZ::IO::FixedMaxPathString::format("%s%s%s --executable_path=%s", pythonPath.Native().c_str(), debugOption.c_str(), (projectManagerPath / projectsScript).c_str(), executablePath);
|
||||
|
||||
|
||||
STARTUPINFO si;
|
||||
ZeroMemory(&si, sizeof(si));
|
||||
si.cb = sizeof(si);
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_HIDE;
|
||||
PROCESS_INFORMATION pi;
|
||||
|
||||
auto workingPath = AZ::IO::FixedMaxPath{ executablePath }.ParentPath().Native();
|
||||
bool launchSuccess = ::CreateProcessA(nullptr, cmdPath.data(), nullptr, nullptr, FALSE, 0, nullptr, projectManagerPath.c_str(), &si, &pi) != 0;
|
||||
if (launchSuccess)
|
||||
{
|
||||
AZ_TracePrintf("ProjectManagerSystemComponent", "Launched Project Manager successfully, shutting down.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
auto someError = GetLastError();
|
||||
AZ_Warning("ProjectManagerSystemComponent", false, "Failed to launch project manager with error %d", someError);
|
||||
}
|
||||
return launchSuccess;
|
||||
}
|
||||
} // ProjectManager
|
||||
} // AzFramework
|
||||
|
||||
+19
@@ -223,6 +223,25 @@ namespace AzFramework
|
||||
AzFramework::RawInputNotificationBusWindows::Broadcast(&AzFramework::RawInputNotificationsWindows::OnRawInputCodeUnitUTF16Event, codeUnitUTF16);
|
||||
break;
|
||||
}
|
||||
case WM_SYSKEYDOWN:
|
||||
{
|
||||
// Handle ALT+ENTER to toggle full screen unless exclsuive full screen
|
||||
// mode is preferred, in which case this will be handled by the system.
|
||||
if ((wParam == VK_RETURN) && (lParam & (1 << 29)))
|
||||
{
|
||||
bool isExclusiveFullScreenPreferred = false;
|
||||
ExclusiveFullScreenRequestBus::EventResult(isExclusiveFullScreenPreferred,
|
||||
nativeWindowImpl->GetWindowHandle(),
|
||||
&ExclusiveFullScreenRequests::IsExclusiveFullScreenPreferred);
|
||||
if (!isExclusiveFullScreenPreferred)
|
||||
{
|
||||
WindowRequestBus::Event(nativeWindowImpl->GetWindowHandle(), &WindowRequests::ToggleFullScreenState);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
// Send all other WM_SYSKEYDOWN messages to the default WndProc.
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
break;
|
||||
|
||||
@@ -16,6 +16,7 @@ set(FILES
|
||||
AzFramework/API/ApplicationAPI_Windows.h
|
||||
AzFramework/Application/Application_Windows.cpp
|
||||
AzFramework/Asset/AssetSystemComponentHelper_Windows.cpp
|
||||
AzFramework/ProjectManager/ProjectManager_Windows.cpp
|
||||
../Common/WinAPI/AzFramework/IO/LocalFileIO_WinAPI.cpp
|
||||
AzFramework/IO/LocalFileIO_Windows.cpp
|
||||
../Common/WinAPI/AzFramework/Network/AssetProcessorConnection_WinAPI.cpp
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/ProjectManager/ProjectManager.h>
|
||||
#include <AzCore/PlatformIncl.h>
|
||||
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
namespace ProjectManager
|
||||
{
|
||||
bool LaunchProjectManager()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} // ProjectManager
|
||||
} // AzFramework
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ set(FILES
|
||||
AzFramework/API/ApplicationAPI_Platform.h
|
||||
AzFramework/API/ApplicationAPI_iOS.h
|
||||
AzFramework/Application/Application_iOS.mm
|
||||
AzFramework/ProjectManager/ProjectManager_iOS.cpp
|
||||
../Common/Unimplemented/AzFramework/Asset/AssetSystemComponentHelper_Unimplemented.cpp
|
||||
../Common/UnixLike/AzFramework/IO/LocalFileIO_UnixLike.cpp
|
||||
../Common/Default/AzFramework/Network/AssetProcessorConnection_Default.cpp
|
||||
|
||||
Reference in New Issue
Block a user