mirror of
https://git.crafterpika.cc/crafterpika/SplatTool-public.git
synced 2026-08-17 10:42:15 +02:00
initial commit
This commit is contained in:
parent
64b4a24e61
commit
3ab62216aa
31 changed files with 2790 additions and 1 deletions
24
assets/Info.plist
Normal file
24
assets/Info.plist
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>SplatTool</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icon.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>cc.crafterpika.splattool</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>SplatTool</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.2.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>12.7</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
assets/SplatTool@1024x1024-rounded.png
Normal file
BIN
assets/SplatTool@1024x1024-rounded.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 708 KiB |
BIN
assets/SplatTool@1024x1024.png
Normal file
BIN
assets/SplatTool@1024x1024.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 715 KiB |
3
assets/config.json
Normal file
3
assets/config.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"TelemetryUrl": "https://splatpost.spbr.net/post"
|
||||
}
|
||||
BIN
assets/demo.png
Normal file
BIN
assets/demo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2 MiB |
17
assets/entitlements.plist
Normal file
17
assets/entitlements.plist
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- MacOS will whine about the DLLs -->
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
|
||||
<!-- allow task_for_pid() to function -->
|
||||
<key>com.apple.security.cs.debugger</key>
|
||||
<true/>
|
||||
|
||||
<!-- C# Needs JIT for CIL -->
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
assets/icon.icns
Normal file
BIN
assets/icon.icns
Normal file
Binary file not shown.
7
assets/root_helper/build.sh
Executable file
7
assets/root_helper/build.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/zsh
|
||||
clang -target x86_64-apple-macos12.7 -o root_helper_x86 root_helper.c
|
||||
clang -target arm64-apple-macos12.7 -o root_helper_arm64 root_helper.c
|
||||
|
||||
lipo -create root_helper_x86 root_helper_arm64 -output root_helper
|
||||
rm -rf root_helper_x86
|
||||
rm -rf root_helper_arm64
|
||||
BIN
assets/root_helper/root_helper
Executable file
BIN
assets/root_helper/root_helper
Executable file
Binary file not shown.
36
assets/root_helper/root_helper.c
Normal file
36
assets/root_helper/root_helper.c
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <libgen.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
char path[PATH_MAX];
|
||||
char dir[PATH_MAX];
|
||||
char script_path[PATH_MAX];
|
||||
char target_app[PATH_MAX];
|
||||
char command[PATH_MAX * 3];
|
||||
|
||||
realpath(argv[0], path);
|
||||
char *parent_dir = dirname(path);
|
||||
strncpy(dir, parent_dir, sizeof(dir) - 1);
|
||||
|
||||
if (geteuid() != 0) {
|
||||
snprintf(command, sizeof(command), "osascript -e \"do shell script \\\"%s\\\" with prompt \\\"SplatTool needs root for reading Cemu's memory.\\\" with administrator privileges\"", path);
|
||||
|
||||
int status = system(command);
|
||||
return WEXITSTATUS(status);
|
||||
}
|
||||
|
||||
snprintf(target_app, sizeof(target_app), "%s/SplatTool", dir);
|
||||
chdir(dir);
|
||||
|
||||
extern char **environ;
|
||||
char *new_argv[] = { target_app, NULL };
|
||||
|
||||
execve(target_app, new_argv, environ);
|
||||
|
||||
perror("execve failed");
|
||||
return 1;
|
||||
}
|
||||
Loading…
Reference in a new issue