Initial commit

This commit is contained in:
2026-06-07 00:35:25 +02:00
parent ea13609f7c
commit b8eca61e20
24 changed files with 4991 additions and 0 deletions

36
cmake/Info.plist.in Normal file
View File

@@ -0,0 +1,36 @@
<?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>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundleDisplayName</key>
<string>OmniMTP</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<!-- USB access via IOKit — no App Store sandbox -->
<key>com.apple.security.app-sandbox</key>
<false/>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

34
cmake/generate_icns.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -ne 2 ]]; then
echo "Usage: $0 <source.png> <output.icns>" >&2
exit 1
fi
SRC="$1"
OUT="$2"
WORKDIR="$(mktemp -d)"
trap 'rm -rf "$WORKDIR"' EXIT
ICONSET="$WORKDIR/AppIcon.iconset"
mkdir -p "$ICONSET"
make_icon() {
local name="$1"
local size="$2"
sips -z "$size" "$size" "$SRC" --out "$ICONSET/$name" >/dev/null
}
make_icon icon_16x16.png 16
make_icon icon_16x16@2x.png 32
make_icon icon_32x32.png 32
make_icon icon_32x32@2x.png 64
make_icon icon_128x128.png 128
make_icon icon_128x128@2x.png 256
make_icon icon_256x256.png 256
make_icon icon_256x256@2x.png 512
make_icon icon_512x512.png 512
make_icon icon_512x512@2x.png 1024
iconutil -c icns "$ICONSET" -o "$OUT"

39
cmake/libusb_config.h Normal file
View File

@@ -0,0 +1,39 @@
/* libusb config.h for macOS (Darwin) — arm64 + x86_64, macOS 12+ */
#pragma once
/* clock_gettime available since macOS 10.12 */
#define HAVE_CLOCK_GETTIME 1
/* pthread_condattr_setclock(CLOCK_MONOTONIC) is NOT available on macOS.
Must be undefined (not 0) so #ifdef checks are false. */
#undef HAVE_PTHREAD_CONDATTR_SETCLOCK
/* timerfd is Linux-only — must be undefined, not 0 */
#undef HAVE_TIMERFD
/* Standard POSIX headers present on macOS */
#define HAVE_SYS_TIME_H 1
#define HAVE_DLFCN_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define STDC_HEADERS 1
#define PLATFORM_POSIX 1
/* Visibility / printf format attributes */
#define DEFAULT_VISIBILITY __attribute__((visibility("default")))
#define PRINTF_FORMAT(a, b) __attribute__((__format__(__printf__, a, b)))
/* 64-bit */
#define SIZEOF_VOID_P 8
/* Logging enabled (not debug) */
#define ENABLE_LOGGING 1
#undef ENABLE_DEBUG_LOGGING