mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 06:46:09 +00:00
- Replace all lucide-react imports with @phosphor-icons/react across every component (LaunchWindow, AnnotationSettingsPanel, ExtensionManager, ExtensionIcon, VideoPlayback, AnnotationOverlay, CropControl, TutorialHelp, PlaybackControls, all shadcn ui/ primitives, etc.) - ExtensionIcon: new Phosphor-based resolver with Lucide name alias map for backwards-compatible extension manifests - LaunchWindow / SourceSelector: full redesign — new icon rail layout, updated backgrounds, improved source selection UX, audio/video controls, countdown overlay - VideoPlayback: overhaul playback controls and preview panel layout - Timeline items: border-radius 16px→8px, cyan→blue unification, pill height 85% for breathing room, resize handle vertical centering - shadcn ui/: refresh accordion, dialog, dropdown, select, slider, switch, tabs, toggle, popover, button, card, input, label, sonner, content-clamp, audio-level-meter - App.tsx / index.css / App.css / tailwind.config: global style updates - types.ts, captionLayout.ts, captionStyle.ts, webcamOverlay.ts: data model updates to support new timeline and export features - package.json: add @phosphor-icons/react, bump dependencies - scripts/, .eslintrc, biome, tsconfig, vite.config: tooling alignment - extension-sources: update built-in extension bundles
79 lines
2.0 KiB
JavaScript
79 lines
2.0 KiB
JavaScript
import { spawnSync } from "node:child_process";
|
|
import { chmod, mkdir } from "node:fs/promises";
|
|
import path from "node:path";
|
|
|
|
const projectRoot = process.cwd();
|
|
const nativeRoot = path.join(projectRoot, "electron", "native");
|
|
|
|
if (process.platform !== "darwin") {
|
|
console.log("[build-native-helpers] Skipping: host platform is not macOS.");
|
|
process.exit(0);
|
|
}
|
|
|
|
function getTargetConfigs() {
|
|
return [
|
|
{
|
|
archTag: "darwin-arm64",
|
|
swiftTarget: "arm64-apple-macos14.0",
|
|
},
|
|
{
|
|
archTag: "darwin-x64",
|
|
swiftTarget: "x86_64-apple-macos14.0",
|
|
},
|
|
];
|
|
}
|
|
|
|
const helpers = [
|
|
{
|
|
source: "ScreenCaptureKitRecorder.swift",
|
|
output: "recordly-screencapturekit-helper",
|
|
},
|
|
{
|
|
source: "ScreenCaptureKitWindowList.swift",
|
|
output: "recordly-window-list",
|
|
},
|
|
{
|
|
source: "SystemCursorAssets.swift",
|
|
output: "recordly-system-cursors",
|
|
},
|
|
{
|
|
source: "NativeCursorMonitor.swift",
|
|
output: "recordly-native-cursor-monitor",
|
|
},
|
|
];
|
|
|
|
const swiftcCheck = spawnSync("swiftc", ["--version"], { encoding: "utf8" });
|
|
if (swiftcCheck.status !== 0) {
|
|
const details = [swiftcCheck.stderr, swiftcCheck.stdout].filter(Boolean).join("\n").trim();
|
|
throw new Error(details || "swiftc is unavailable; install Xcode Command Line Tools.");
|
|
}
|
|
|
|
for (const target of getTargetConfigs()) {
|
|
const outputDir = path.join(nativeRoot, "bin", target.archTag);
|
|
await mkdir(outputDir, { recursive: true });
|
|
|
|
for (const helper of helpers) {
|
|
const sourcePath = path.join(nativeRoot, helper.source);
|
|
const outputPath = path.join(outputDir, helper.output);
|
|
|
|
const result = spawnSync(
|
|
"swiftc",
|
|
["-O", "-target", target.swiftTarget, sourcePath, "-o", outputPath],
|
|
{
|
|
encoding: "utf8",
|
|
timeout: 120000,
|
|
},
|
|
);
|
|
|
|
if (result.status !== 0) {
|
|
const details = [result.stderr, result.stdout].filter(Boolean).join("\n").trim();
|
|
throw new Error(details || `Failed to compile ${helper.source} for ${target.archTag}`);
|
|
}
|
|
|
|
await chmod(outputPath, 0o755);
|
|
console.log(
|
|
`[build-native-helpers] Built ${helper.output} (${target.archTag}) -> ${outputPath}`,
|
|
);
|
|
}
|
|
}
|