Skip to content

Commit

Permalink
Get sdk-path working on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
bvisness committed Dec 5, 2023
1 parent 3497cd8 commit fb50acf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
3 changes: 3 additions & 0 deletions scripts/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,9 @@ def install(args):
shutil.copy("src/ext/angle/bin/libEGL.dylib", runtime_bin_dir)
shutil.copy("src/ext/angle/bin/libGLESv2.dylib", runtime_bin_dir)

with open(os.path.join(versions_dir, "current"), "w") as f:
f.write(version)

print()
print("The Orca tooling has been installed to the following directory:")
print(tool_bin_dir)
Expand Down
27 changes: 16 additions & 11 deletions src/tool/sdk_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,22 @@
*
**************************************************************************/

#include <combaseapi.h>
#include <knownfolders.h>
#include <stdio.h>
#include <winerror.h>
#include <stdlib.h>

#if OC_PLATFORM_WINDOWS
#include <combaseapi.h>
#include <knownfolders.h>
#include <shlobj_core.h>
#include <winerror.h>
#include "platform/win32_string_helpers.h"
#endif

#include "flag.h"
#include "platform/platform_path.h"
#include "platform/win32_string_helpers.h"
#include "util/lists.h"
#include "util/strings.h"
#include "util/memory.h"
#include "util.h"
#include "system.h"

#if OC_PLATFORM_WINDOWS
#include <knownfolders.h>
#include <shlobj_core.h>
#endif

oc_str8 getOrcaDir(oc_arena* a);
oc_str8 getCurrentVersionDir(oc_arena* a, oc_str8 orcaDir);
Expand Down Expand Up @@ -76,6 +74,13 @@ oc_str8 getOrcaDir(oc_arena* a)
oc_win32_path_normalize_slash_in_place(path);
return path;
}
#elif OC_PLATFORM_MACOS
oc_str8 getOrcaDir(oc_arena* a)
{
oc_str8 path = OC_STR8(getenv("HOME"));
path = oc_path_append(a, path, OC_STR8(".orca"));
return path;
}
#else
#error "Unknown platform for sdk-path"
#endif
Expand Down

0 comments on commit fb50acf

Please sign in to comment.