Fix missing window icon on macOS
This commit is contained in:
@@ -654,7 +654,7 @@ Window* Editor::CreateMainWindow()
|
|||||||
PROFILE_MEM(Editor);
|
PROFILE_MEM(Editor);
|
||||||
Window* window = Managed->GetMainWindow();
|
Window* window = Managed->GetMainWindow();
|
||||||
|
|
||||||
#if PLATFORM_LINUX
|
#if PLATFORM_LINUX || PLATFORM_MAC
|
||||||
// Set window icon
|
// Set window icon
|
||||||
const String iconPath = Globals::BinariesFolder / TEXT("Logo.png");
|
const String iconPath = Globals::BinariesFolder / TEXT("Logo.png");
|
||||||
if (FileSystem::FileExists(iconPath))
|
if (FileSystem::FileExists(iconPath))
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include "Engine/Input/Mouse.h"
|
#include "Engine/Input/Mouse.h"
|
||||||
#include "Engine/Platform/FileSystem.h"
|
#include "Engine/Platform/FileSystem.h"
|
||||||
#include "Engine/Platform/WindowsManager.h"
|
#include "Engine/Platform/WindowsManager.h"
|
||||||
#if PLATFORM_LINUX
|
#if PLATFORM_LINUX || PLATFORM_MAC
|
||||||
#define COMPILE_WITH_TEXTURE_TOOL 1 // FIXME
|
#define COMPILE_WITH_TEXTURE_TOOL 1 // FIXME
|
||||||
#include "Engine/Tools/TextureTool/TextureTool.h"
|
#include "Engine/Tools/TextureTool/TextureTool.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -243,7 +243,7 @@ SDLWindow::SDLWindow(const CreateWindowSettings& settings)
|
|||||||
SDL_StartTextInput(_window);
|
SDL_StartTextInput(_window);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PLATFORM_LINUX && COMPILE_WITH_TEXTURE_TOOL
|
#if (PLATFORM_LINUX || PLATFORM_MAC) && COMPILE_WITH_TEXTURE_TOOL
|
||||||
// Ensure windows other than the main window have some kind of icon
|
// Ensure windows other than the main window have some kind of icon
|
||||||
static SDL_Surface* surface = nullptr;
|
static SDL_Surface* surface = nullptr;
|
||||||
static Array<Color32> colorData;
|
static Array<Color32> colorData;
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public class FlaxEditor : EngineTarget
|
|||||||
break;
|
break;
|
||||||
case TargetPlatform.Mac:
|
case TargetPlatform.Mac:
|
||||||
options.OutputFolder = Path.Combine(options.WorkingDirectory, "Binaries", "Editor", "Mac", options.Configuration.ToString());
|
options.OutputFolder = Path.Combine(options.WorkingDirectory, "Binaries", "Editor", "Mac", options.Configuration.ToString());
|
||||||
|
options.DependencyFiles.Add(Path.Combine(Globals.EngineRoot, "Source", "Logo.png"));
|
||||||
break;
|
break;
|
||||||
default: throw new InvalidPlatformException(options.Platform.Target, "Not supported Editor platform.");
|
default: throw new InvalidPlatformException(options.Platform.Target, "Not supported Editor platform.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -348,6 +348,7 @@ namespace Flax.Deploy
|
|||||||
DeployFile(src, dst, "MoltenVK_icd.json");
|
DeployFile(src, dst, "MoltenVK_icd.json");
|
||||||
DeployFiles(src, dst, "*.dll");
|
DeployFiles(src, dst, "*.dll");
|
||||||
DeployFiles(src, dst, "*.dylib");
|
DeployFiles(src, dst, "*.dylib");
|
||||||
|
DeployFile(src, dst, "Logo.png");
|
||||||
|
|
||||||
// Optimize package size
|
// Optimize package size
|
||||||
Utilities.Run("strip", "FlaxEditor", null, dst, Utilities.RunOptions.None);
|
Utilities.Run("strip", "FlaxEditor", null, dst, Utilities.RunOptions.None);
|
||||||
|
|||||||
Reference in New Issue
Block a user