Warp to Galaxy internal rebrand

This commit is contained in:
2026-08-27 00:29:21 -05:00
parent d72874534d
commit a69b927cc3
108 changed files with 395 additions and 2098 deletions
+3 -3
View File
@@ -49,9 +49,9 @@ Usage: `iscc <script path> /D<name>[=<value>]`
The following constants can be overwritten:
* `MyAppVersion` (default: `0.1.0`)
* `MyAppExeName` (default: `galaxy-dev.exe`)
* `ReleaseChannel` (default: `dev`)
* `TargetProfileDir` (default: `debug`)
* `MyAppExeName` (default: `galaxy-oss.exe`)
* `ReleaseChannel` (default: `oss`)
* `TargetProfileDir` (default: `target\\rlto`)
### Option 2: Use the GUI
1. Open the Inno Setup application and select this script.
+10 -42
View File
@@ -3,14 +3,14 @@
# Bundle the application for release.
Param (
# Build dev bundles by default.
# Build a debug OSS bundle when requested.
[Switch]$DEBUG_BUILD = $False,
[Alias('check-only')]
[Switch]$CHECK_ONLY,
[ValidateSet('local', 'dev', 'preview', 'stable', 'oss')]
[String]$CHANNEL = 'dev',
[ValidateSet('oss')]
[String]$CHANNEL = 'oss',
[Alias('release-tag')]
[String]$RELEASE_TAG = '',
@@ -65,11 +65,6 @@ $WINDOWS_INSTALLER_DIR = $WORKSPACE_ROOT_DIR + '\script\windows'
if ($DEBUG_BUILD) {
$CARGO_PROFILE = 'dev'
} elseif (("$CHANNEL" -eq 'local') -or ("$CHANNEL" -eq 'dev')) {
# For dev bundles, we want to enable debug assertions to
# catch violations that would otherwise silently pass in
# a normal release build (e.g. in stable).
$CARGO_PROFILE = 'rltoda'
} else {
$CARGO_PROFILE = 'rlto'
}
@@ -79,43 +74,17 @@ if ($CARGO_PROFILE -eq 'dev') {
} else {
$CARGO_TARGET_OUTPUT_DIR = "$CARGO_TARGET_DIR" + '\' + $PLATFORM_TARGET + '\' + "$CARGO_PROFILE"
}
# Update parameters based on the target release channel.
#
# APP_NAME here must match the value used in Rust as the
# application name; see app/src/channel.rs.
#
# GALAXY_BIN is the name of the binary produced by cargo;
# BINARY_NAME is the desired name of the binary in the final package.
if ("$CHANNEL" -eq 'local') {
$GALAXY_BIN = 'galaxy-local'
$BINARY_NAME = 'galaxy-local.exe'
$APP_NAME = 'GalaxyLocal'
} elseif ("$CHANNEL" -eq 'dev') {
$GALAXY_BIN = 'galaxy-dev'
$BINARY_NAME = 'galaxy-dev.exe'
$APP_NAME = 'GalaxyDev'
$FEATURES = "$FEATURES,agent_mode_debug"
} elseif ("$CHANNEL" -eq 'preview') {
$GALAXY_BIN = 'galaxy-preview'
$BINARY_NAME = 'galaxy-preview.exe'
$APP_NAME = 'GalaxyPreview'
$FEATURES = "$FEATURES,preview_channel"
} elseif ("$CHANNEL" -eq 'stable') {
$GALAXY_BIN = 'stable'
$BINARY_NAME = 'galaxy.exe'
$APP_NAME = 'Galaxy'
} elseif ("$CHANNEL" -eq 'oss') {
$GALAXY_BIN = 'galaxy-oss'
$BINARY_NAME = 'galaxy-oss.exe'
$APP_NAME = 'GalaxyOss'
$FEATURES = 'release_bundle,gui'
}
# OSS is the only supported release channel.
$GALAXY_BIN = 'galaxy-oss'
$BINARY_NAME = 'galaxy-oss.exe'
$APP_NAME = 'GalaxyOss'
$FEATURES = 'release_bundle,gui'
# All channels ship the v3 classifier and v2 heuristic.
# The OSS bundle ships the v3 classifier and v2 heuristic.
$FEATURES = "$FEATURES,nld_classifier_v3,nld_heuristic_v2"
$BINARY_PATH = "$CARGO_TARGET_OUTPUT_DIR\$BINARY_NAME"
$BUNDLE_ID = "samsung.galaxy.$APP_NAME"
$BUNDLE_ID = 'com.galaxy.GalaxyOss'
$INSTALLER_OUTPUT_DIR = "$WINDOWS_INSTALLER_DIR\Output"
$INSTALLER_NAME = "$($APP_NAME)$($FILE_ENDING)"
$INSTALLER_PATH = "$($INSTALLER_OUTPUT_DIR)\$($INSTALLER_NAME).exe"
@@ -143,7 +112,6 @@ if ($CHECK_ONLY) {
if (-Not $SKIP_BUILD_BINARY) {
Write-Output "Building Galaxy for channel $CHANNEL and bundle id $BUNDLE_ID"
$env:CARGO_BIN_NAME = $CHANNEL
$env:GALAXY_APP_NAME = $APP_NAME
cargo build -p galaxy --profile "$CARGO_PROFILE" --bin "$GALAXY_BIN" --features "$FEATURES" --target $PLATFORM_TARGET
if (-Not $?) {
+4 -50
View File
@@ -66,53 +66,9 @@ if ($env:GIT_RELEASE_TAG) {
Set-Content -Path $VersionMetadataPath -Encoding utf8
}
# Copy channel-gated skills matching the current release channel.
$GatedSource = Join-Path (Join-Path $RepoRoot 'resources') 'channel-gated-skills'
$DestSkills = Join-Path (Join-Path $DestinationDir 'bundled') 'skills'
if ($Channel -and (Test-Path $GatedSource -PathType Container)) {
Write-Output "Copying channel-gated skills for channel '$Channel'..."
# Error out if a stable/ gate directory exists.
$StableDir = Join-Path $GatedSource 'stable'
if (Test-Path $StableDir -PathType Container) {
Write-Error "Found a 'stable/' directory in $GatedSource. The stable channel does not use gated skills. Move stable-ready skills to resources/skills/ instead."
exit 1
}
# Gate labels ordered from most-inclusive to least-inclusive.
$GateOrder = @('dogfood', 'preview')
# Map the release channel to its gate label.
switch ($Channel) {
'local' { $Gate = 'dogfood' }
'dev' { $Gate = 'dogfood' }
'preview' { $Gate = 'preview' }
default {
Write-Output " Channel '$Channel' has no gated skills, skipping"
$Gate = $null
}
}
if ($Gate) {
# Build the set of included gates (progressive: this gate and all after it).
$GateIndex = [array]::IndexOf($GateOrder, $Gate)
$IncludedGates = $GateOrder[$GateIndex..($GateOrder.Length - 1)]
foreach ($GateDir in Get-ChildItem -Path $GatedSource -Directory | Sort-Object Name) {
if ($GateDir.Name -notin $IncludedGates) {
$Skills = (Get-ChildItem -Path $GateDir.FullName -Directory | Sort-Object Name | ForEach-Object { $_.Name }) -join ', '
Write-Output " Skipping gate '$($GateDir.Name)' (channel '$Channel') - would include: $Skills"
continue
}
foreach ($SkillDir in Get-ChildItem -Path $GateDir.FullName -Directory | Sort-Object Name) {
$Dest = Join-Path $DestSkills $SkillDir.Name
Write-Output " Copying gated skill: $($SkillDir.Name) (gate: $($GateDir.Name))"
Copy-Item -Path $SkillDir.FullName -Destination $Dest -Recurse -Force
}
}
}
if ($Channel -and $Channel -notin @('oss', 'integration')) {
Write-Error "Unsupported release channel '$Channel'"
exit 1
}
# Generate third-party license attribution.
@@ -169,9 +125,7 @@ if ($env:SKIP_SETTINGS_SCHEMA -ne '1') {
$SchemaCmd += @('--profile', $CargoProfile)
}
$SchemaCmd += @('--manifest-path', (Join-Path $RepoRoot 'Cargo.toml'), '--bin', 'generate_settings_schema', '--')
if ($Channel) {
$SchemaCmd += @('--channel', $Channel)
}
$SchemaCmd += @('--channel', 'oss')
$SchemaCmd += $SchemaOutput
& cargo @SchemaCmd
+14 -28
View File
@@ -4,38 +4,33 @@
#define MyAppPublisher "Galaxy"
#ifndef MyAppName
#define MyAppName "GalaxyDev"
#define MyAppName "GalaxyOss"
#endif
#ifndef MyAppVersion
#define MyAppVersion "0.1.0"
#endif
#ifndef MyAppExeName
#define MyAppExeName "galaxy-dev.exe"
#define MyAppExeName "galaxy-oss.exe"
#endif
#ifndef ReleaseChannel
#define ReleaseChannel "dev"
#define ReleaseChannel "oss"
#endif
#ifndef TargetProfileDir
#define TargetProfileDir "target\release-lto-debug_assertions"
#define TargetProfileDir "target\rlto"
#endif
#define AssetsDir "..\..\app\assets\windows"
// The mutex name must match what the Rust app creates in single_instance_manager.rs:
#define ChannelPascalCase \
(ReleaseChannel == "stable") ? "Stable" : \
((ReleaseChannel == "dev") ? "Dev" : \
((ReleaseChannel == "preview") ? "Preview" : \
((ReleaseChannel == "local") ? "Local" : \
((ReleaseChannel == "integration") ? "Integration" : \
((ReleaseChannel == "oss") ? "Oss" : \
"Unknown")))))
(ReleaseChannel == "oss") ? "Oss" : \
"Unknown"
#define AppMutexName "Local\Galaxy" + ChannelPascalCase + "_SingleInstance"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId=galaxy-terminal-{#ReleaseChannel}
AppId=com.galaxy.GalaxyOss
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
@@ -55,7 +50,7 @@ SolidCompression=yes
WizardStyle=modern
WizardSmallImageFile="installer-images\galaxy-logo.bmp"
WizardImageFile="installer-images\galaxy-banner.bmp"
SetupIconFile="..\..\app\channels\{#ReleaseChannel}\icon\no-padding\icon.ico"
SetupIconFile="..\..\app\channels\oss\icon\no-padding\icon.ico"
UninstallDisplayIcon="{app}\icon.ico"
; Force close previous Galaxy if it hasn't shut down yet.
; In the update flow we already warn the user if they have something running and make them confirm
@@ -94,7 +89,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Source: "{#TargetProfileDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AssetsDir}\{#Arch}\conpty.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AssetsDir}\{#Arch}\OpenConsole.exe"; DestDir: "{app}\{#Arch}"; Flags: ignoreversion
Source: "..\..\app\channels\{#ReleaseChannel}\icon\no-padding\icon.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\app\channels\oss\icon\no-padding\icon.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AssetsDir}\{#Arch}\vcruntime140.dll"; DestDir: "{app}"
Source: "{#AssetsDir}\{#Arch}\vcruntime140_1.dll"; DestDir: "{app}"
Source: "{#AssetsDir}\{#Arch}\msvcp140.dll"; DestDir: "{app}"
@@ -136,8 +131,8 @@ Type: filesandordirs; Name: "{localappdata}\galaxy\{#MyAppName}"
Type: filesandordirs; Name: "{app}\bin"
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"; AppUserModelID: "samsung.galaxy.{#MyAppName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"; AppUserModelID: "samsung.galaxy.{#MyAppName}"; Tasks: desktopicon
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"; AppUserModelID: "com.galaxy.GalaxyOss"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"; AppUserModelID: "com.galaxy.GalaxyOss"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: postinstall runhidden nowait
@@ -145,11 +140,7 @@ Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChang
[Code]
function IsNotStable(): Boolean;
begin
#if ReleaseChannel == "stable"
Result := False;
#else
Result := True;
#endif
end;
{ Returns true when the installer was launched by Galaxy's auto-update code.
@@ -199,7 +190,7 @@ begin
if CheckForMutexes('{#AppMutexName}') then
begin
Log('Galaxy mutex still held after timeout; force-killing remaining processes.');
{ Kill by image name. {#MyAppExeName} (e.g. galaxy.exe, galaxy-dev.exe) is unique
{ Kill by image name. {#MyAppExeName} (galaxy-oss.exe) is unique
enough that collateral damage is not a concern. OpenConsole.exe is NOT
killed by name because it is shared with Windows Terminal; instead we
rely on Galaxy's Job Object (JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE) to
@@ -236,13 +227,8 @@ begin
if not DirExists(BinDir) then
CreateDir(BinDir);
{ Determine the channel-specific script name. These values must match
`Channel::cli_command_name` in the Rust source. }
#if ReleaseChannel == "stable"
CmdScriptName := 'galaxy-ai.cmd';
#else
CmdScriptName := 'galaxy-ai-{#ReleaseChannel}.cmd';
#endif
{ Keep this name aligned with `Channel::cli_command_name` in the Rust source. }
CmdScriptName := 'galaxy-ai-oss.cmd';
{ Create the helper CMD script }
CmdScriptPath := BinDir + '\' + CmdScriptName;