4 Commits

Author SHA1 Message Date
6e61233a7b _rider improvement
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-10-29 23:03:01 +02:00
bf59455412 _zed macos final
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-10-29 21:13:20 +02:00
a016b9d47b _rider macos
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-10-29 20:44:34 +02:00
7bdc08f8be _macos? 2025-10-29 20:43:50 +02:00
3 changed files with 34 additions and 12 deletions

View File

@@ -14,6 +14,9 @@
#if PLATFORM_WINDOWS
#include "Engine/Platform/Win32/IncludeWindowsHeaders.h"
#elif PLATFORM_MAC
#include "Engine/Platform/Apple/AppleUtils.h"
#include <AppKit/AppKit.h>
#endif
namespace
@@ -218,6 +221,15 @@ void RiderCodeEditor::FindEditors(Array<CodeEditor*>* output)
#endif
#if PLATFORM_MAC
// System installed app
NSURL* AppURL = [[NSWorkspace sharedWorkspace]URLForApplicationWithBundleIdentifier:@"com.jetbrains.rider"];
if (AppURL != nullptr)
{
const String path = AppleUtils::ToString((CFStringRef)[AppURL path]);
SearchDirectory(&installations, path / TEXT("/Contents/Resources"));
}
// JetBrains Toolbox installations
String applicationSupportFolder;
FileSystem::GetSpecialFolderPath(SpecialFolder::ProgramData, applicationSupportFolder);
@@ -232,6 +244,7 @@ void RiderCodeEditor::FindEditors(Array<CodeEditor*>* output)
// Check the local installer version
SearchDirectory(&installations, TEXT("/Applications/Rider.app/Contents/Resources"));
SearchDirectory(&installations, TEXT("/Applications/Rider EAP.app/Contents/Resources"));
#endif
for (const String& directory : subDirectories)

View File

@@ -51,7 +51,7 @@ void ZedEditor::FindEditors(Array<CodeEditor*>* output)
}
#elif PLATFORM_LINUX
char buffer[128];
FILE* pipe = popen("/bin/bash -c \"type -p code\"", "r");
FILE* pipe = popen("/bin/bash -c \"type -p zed\"", "r");
if (pipe)
{
StringAnsi pathAnsi;
@@ -66,7 +66,7 @@ void ZedEditor::FindEditors(Array<CodeEditor*>* output)
}
}
{
const String path(TEXT("/usr/bin/code"));
const String path(TEXT("/usr/bin/zed"));
if (FileSystem::FileExists(path))
{
output->Add(New<VisualStudioCodeEditor>(path, false));
@@ -77,22 +77,31 @@ void ZedEditor::FindEditors(Array<CodeEditor*>* output)
// Detect Flatpak installations
{
CreateProcessSettings procSettings;
procSettings.FileName = TEXT("/bin/bash -c \"flatpak list --app --columns=application | grep com.visualstudio.code -c\"");
procSettings.FileName = TEXT("/bin/bash -c \"flatpak list --app --columns=application | grep dev.zed.Zed -c\"");
procSettings.HiddenWindow = true;
if (Platform::CreateProcess(procSettings) == 0)
{
const String runPath(TEXT("flatpak run com.visualstudio.code"));
output->Add(New<VisualStudioCodeEditor>(runPath, false));
const String runPath(TEXT("flatpak run dev.zed.Zed"));
output->Add(New<VisualStudioCodeEditor>(runPath));
return;
}
}
#elif PLATFORM_MAC
// Prefer the Zed CLI application over bundled app, as this handles opening files in existing instance better.
// The bundle also contains the CLI application under Zed.app/Contents/MacOS/zed, but using this doesn't make any difference.
const String cliPath(TEXT("/usr/local/bin/zed"));
if (FileSystem::FileExists(cliPath))
{
output->Add(New<ZedEditor>(cliPath));
return;;
}
// System installed app
NSURL* AppURL = [[NSWorkspace sharedWorkspace]URLForApplicationWithBundleIdentifier:@"com.microsoft.VSCode"];
NSURL* AppURL = [[NSWorkspace sharedWorkspace]URLForApplicationWithBundleIdentifier:@"dev.zed.Zed"];
if (AppURL != nullptr)
{
const String path = AppleUtils::ToString((CFStringRef)[AppURL path]);
output->Add(New<VisualStudioCodeEditor>(path, false));
output->Add(New<ZedEditor>(path));
return;
}
@@ -101,15 +110,15 @@ void ZedEditor::FindEditors(Array<CodeEditor*>* output)
FileSystem::GetSpecialFolderPath(SpecialFolder::Documents, userFolder);
String paths[3] =
{
TEXT("/Applications/Visual Studio Code.app"),
userFolder + TEXT("/../Visual Studio Code.app"),
userFolder + TEXT("/../Downloads/Visual Studio Code.app"),
TEXT("/Applications/Zed.app"),
userFolder + TEXT("/../Zed.app"),
userFolder + TEXT("/../Downloads/Zed.app"),
};
for (const String& path : paths)
{
if (FileSystem::DirectoryExists(path))
{
output->Add(New<VisualStudioCodeEditor>(path, false));
output->Add(New<ZedEditor>(path));
break;
}
}

View File

@@ -114,7 +114,7 @@ namespace Flax.Build.Projects.VisualStudio
vcProjectFileContent.AppendLine(" <Keyword>MakeFileProj</Keyword>");
if (Version >= VisualStudioVersion.VisualStudio2022)
vcProjectFileContent.AppendLine(" <ResolveNuGetPackages>false</ResolveNuGetPackages>");
vcProjectFileContent.AppendLine(" <VCTargetsPath Condition=\"$(Configuration.Contains('Linux'))\">./</VCTargetsPath>");
vcProjectFileContent.AppendLine(" <VCTargetsPath Condition=\"$(Configuration.Contains('Linux')) or $(Configuration.Contains('Mac'))\">./</VCTargetsPath>");
vcProjectFileContent.AppendLine(" </PropertyGroup>");
// Default properties