mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
* feat(windows): add administrator PowerShell terminal setting * fix(settings): localize administrator terminal search keywords * fix(windows): restrict elevated terminal host to Orca's runtime and requesting account * fix(windows): harden administrator terminal routing, inventory and restore * fix(build): build the Windows agent hook when electron-builder packages Windows * fix(build): build the packaged Windows agent hook for the target architecture * fix(windows): accept the development terminal runtime and test real elevation in CI * feat(windows): show administrator status and restart instructions * fix(settings): localize administrator mode search keywords * test(settings): isolate the desktop permission section in shell picker tests * Add Windows administrator restart and simplify Terminal settings * Keep administrator restart silent and settings actions within narrow panes * Keep Windows shell choices and permission guides usable at minimum width * Prevent later restarts from replaying administrator terminal reset * Fix CI route resolution and transient Windows fixture cleanup
40 lines
1.5 KiB
JavaScript
40 lines
1.5 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
import { dirname, join, resolve } from 'node:path'
|
|
import { pathToFileURL } from 'node:url'
|
|
import { compileWindowsRustExecutable } from './windows-rust-executable-build.mjs'
|
|
|
|
function readArg(name) {
|
|
const index = process.argv.indexOf(name)
|
|
return index !== -1 ? process.argv[index + 1] : undefined
|
|
}
|
|
|
|
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
const repoRoot = resolve(import.meta.dirname, '../..')
|
|
const crateRoot = join(repoRoot, 'native', 'windows-cli-launcher')
|
|
const iconPath = join(repoRoot, 'resources', 'build', 'icon.ico')
|
|
const output = readArg('--output') ?? join(crateRoot, '.build', 'orca.exe')
|
|
for (const binName of ['orca', 'orca-administrator-restart']) {
|
|
compileWindowsRustExecutable({
|
|
repoRoot,
|
|
crateRoot,
|
|
binName,
|
|
label: binName === 'orca' ? 'Windows CLI launcher' : 'Windows administrator restart launcher',
|
|
fingerprintInputs: [
|
|
join(crateRoot, 'src', 'administrator_status.rs'),
|
|
join(crateRoot, 'src', 'administrator_restart.rs'),
|
|
join(crateRoot, 'src', 'administrator_launcher.rs'),
|
|
iconPath,
|
|
join(repoRoot, 'config/scripts/build-windows-cli-launcher.mjs')
|
|
],
|
|
arch: readArg('--arch'),
|
|
outputPath: binName === 'orca' ? output : join(dirname(output), `${binName}.exe`),
|
|
buildEnv: (version) => ({
|
|
ORCA_LAUNCHER_VERSION: version,
|
|
ORCA_LAUNCHER_ICON: iconPath,
|
|
ORCA_LAUNCHER_FILENAME: `${binName}.exe`
|
|
})
|
|
})
|
|
}
|
|
}
|