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