Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ packages/
# Publish output
publish/

# installers
SemanticDeveloper/Installers/Linux/pkgroot/

# OS files
[Dd]esktop.ini
[Tt]humbs.db
Expand Down
22 changes: 11 additions & 11 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
NOTICE
======

This project integrates with Codex CLI (https://github.com/openai/codex).
SemanticDeveloper

Codex CLI is licensed under the MIT License:
Copyright (c) 2025 Stainless Designer LLC

Copyright (c) OpenAI
Licensed under the Apache License, Version 2.0 (the "License").
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Third-party attributions
- Codex CLI (https://github.com/openai/codex)
Licensed under the Apache License, Version 2.0.
Copyright (c) OpenAI and contributors.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The contents of this NOTICE file are for informational purposes only and
do not modify the License.
21 changes: 21 additions & 0 deletions SemanticDeveloper/Installers/Linux/Installer.Linux.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<AssemblyName>SemanticDeveloper.Installer.Linux</AssemblyName>
<RootNamespace>SemanticDeveloper.Installer.Linux</RootNamespace>
<OutputType>Exe</OutputType>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" CopyToOutputDirectory="PreserveNewest" />
<None Include="build_deb.sh" CopyToOutputDirectory="PreserveNewest" />
<None Include="debian/usr/share/applications/semantic-developer.desktop" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<Target Name="Package" DependsOnTargets="Build">
<Message Text="Run build_deb.sh on Debian/Ubuntu to build .deb." Importance="High" />
</Target>
</Project>
22 changes: 22 additions & 0 deletions SemanticDeveloper/Installers/Linux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SemanticDeveloper — Linux Installer Project (Debian/Ubuntu)

Overview
- Produces a `.deb` package for Debian/Ubuntu following Avalonia guidance.

Prerequisites (run on Debian/Ubuntu)
- .NET 8 SDK
- `dpkg-deb`, `fakeroot`

Build steps
- Open a terminal in this folder.
- Make the script executable: `chmod +x build_deb.sh`
- x64: `./build_deb.sh linux-x64`
- arm64: `./build_deb.sh linux-arm64`
- Result: `dist/semantic-developer_<version>_<arch>.deb`

Notes
- Installs under `/opt/semantic-developer` and adds launcher under `/usr/share/applications`.

References
- Avalonia deployment (Debian/Ubuntu): https://docs.avaloniaui.net/docs/deployment/debian-ubuntu

48 changes: 48 additions & 0 deletions SemanticDeveloper/Installers/Linux/build_deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
set -euo pipefail

RID="${1:-linux-x64}"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT="$(cd "$SCRIPT_DIR/../../" && pwd)"
APP_PROJ="$ROOT/SemanticDeveloper/SemanticDeveloper.csproj"
PUBLISH_DIR="$SCRIPT_DIR/out/publish"
PKG_ROOT="$SCRIPT_DIR/pkgroot"
DIST_DIR="$SCRIPT_DIR/dist"
VERSION="1.0.1"
ARCH="amd64"
if [[ "$RID" == "linux-arm64" ]]; then ARCH="arm64"; fi

rm -rf "$PKG_ROOT" "$PUBLISH_DIR"
mkdir -p "$PUBLISH_DIR" "$PKG_ROOT/opt/semantic-developer" "$PKG_ROOT/usr/bin" "$PKG_ROOT/usr/share/applications" "$DIST_DIR"

echo "Publishing SemanticDeveloper for $RID ..."
dotnet publish "$APP_PROJ" -c Release -r "$RID" --self-contained true \
/p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=false \
-o "$PUBLISH_DIR"

echo "Staging files ..."
cp -R "$PUBLISH_DIR"/* "$PKG_ROOT/opt/semantic-developer/"
ln -sf "/opt/semantic-developer/SemanticDeveloper" "$PKG_ROOT/usr/bin/semantic-developer"

echo "Adding desktop entry ..."
install -m 644 "$SCRIPT_DIR/debian/usr/share/applications/semantic-developer.desktop" "$PKG_ROOT/usr/share/applications/semantic-developer.desktop"

echo "Preparing control files ..."
mkdir -p "$PKG_ROOT/DEBIAN"
CONTROL_FILE="$PKG_ROOT/DEBIAN/control"
cat > "$CONTROL_FILE" <<EOF
Package: semantic-developer
Version: $VERSION
Section: utils
Priority: optional
Architecture: $ARCH
Maintainer: Stainless Designer LLC
Depends: libgtk-3-0, libxi6, libxrender1, libx11-xcb1, libxcb1, libc6
Description: SemanticDeveloper — Avalonia desktop app for Codex CLI
EOF

echo "Building .deb ..."
DEB_PATH="$DIST_DIR/semantic-developer_${VERSION}_${ARCH}.deb"
fakeroot dpkg-deb --build "$PKG_ROOT" "$DEB_PATH"
echo "Done: $DEB_PATH"

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Name=SemanticDeveloper
Comment=Avalonia desktop UI for Codex CLI
Exec=semantic-developer
Icon=semantic-developer
Terminal=false
Categories=Development;Utility;

Binary file not shown.
21 changes: 21 additions & 0 deletions SemanticDeveloper/Installers/Windows/Installer.Windows.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<AssemblyName>SemanticDeveloper.Installer.Windows</AssemblyName>
<RootNamespace>SemanticDeveloper.Installer.Windows</RootNamespace>
<OutputType>Exe</OutputType>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" CopyToOutputDirectory="PreserveNewest" />
<None Include="build.ps1" CopyToOutputDirectory="PreserveNewest" />
<None Include="SemanticDeveloper.iss" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<Target Name="Package" DependsOnTargets="Build">
<Message Text="Run build.ps1 to create Windows installer or zip package." Importance="High" />
</Target>
</Project>
29 changes: 29 additions & 0 deletions SemanticDeveloper/Installers/Windows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
SemanticDeveloper — Windows Installer Project

Overview
- Produces a distributable for Windows: either a ZIP of the self-contained publish output or an installer using Inno Setup (optional).
- Follows Avalonia guidance: publish self-contained, single-file, no trimming.

Prerequisites
- Windows 10/11
- .NET 8 SDK
- Optional (for .exe installer): Inno Setup 6 (`iscc.exe`) added to PATH

Build steps (ZIP package)
- Open a PowerShell prompt in this folder.
- Run: `./build.ps1 -Rid win-x64 -Mode Zip`
- Result: `artifacts/SemanticDeveloper-win-x64.zip`

Build steps (Inno Setup installer)
- Ensure Inno Setup is installed and `iscc.exe` is on PATH.
- Run: `./build.ps1 -Rid win-x64 -Mode Inno`
- Result: `artifacts/SemanticDeveloperSetup-win-x64.exe`

Notes
- The script publishes the app from `../..//SemanticDeveloper/SemanticDeveloper.csproj`.
- To build for ARM64, use `-Rid win-arm64`.
- You can customize app metadata in `SemanticDeveloper.iss`.

References
- Avalonia deployment (Windows): https://docs.avaloniaui.net/docs/deployment/windows

48 changes: 48 additions & 0 deletions SemanticDeveloper/Installers/Windows/SemanticDeveloper.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
; Inno Setup script to package SemanticDeveloper
#define AppName "SemanticDeveloper"
#define AppVersion "1.0.1"
#define Publisher "Stainless Designer LLC"
#define URL "https://github.com/stainless-design/semantic-developer"
#ifndef RID
#define RID "win-x64"
#endif
#ifndef OutDir
#define OutDir "out\\publish"
#endif
#ifndef ArtifactsDir
#define ArtifactsDir "artifacts"
#endif

[Setup]
AppId={{C21A3B89-8F5C-4E9F-9F5D-7B5C6A5B3A99}
AppName={#AppName}
AppVersion={#AppVersion}
AppPublisher={#Publisher}
AppPublisherURL={#URL}
DefaultDirName={autopf64}\{#AppName}
DefaultGroupName={#AppName}
UninstallDisplayIcon={app}\SemanticDeveloper.exe
OutputBaseFilename=SemanticDeveloperSetup-{#RID}
OutputDir={#ArtifactsDir}
Compression=lzma2
SolidCompression=yes
DisableDirPage=auto
DisableProgramGroupPage=auto
ArchitecturesInstallIn64BitMode=x64 arm64
SetupIconFile=..\\..\\SemanticDeveloper\\Images\\SemanticDeveloperLogo.ico

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription: "Additional icons:"; Flags: unchecked

[Files]
Source: "{#OutDir}/*"; DestDir: "{app}"; Flags: recursesubdirs ignoreversion

[Icons]
Name: "{autoprograms}\{#AppName}"; Filename: "{app}\SemanticDeveloper.exe"
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\SemanticDeveloper.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\SemanticDeveloper.exe"; Description: "Launch {#AppName}"; Flags: nowait postinstall skipifsilent
38 changes: 38 additions & 0 deletions SemanticDeveloper/Installers/Windows/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
$ErrorActionPreference = 'Stop'
param(
[string]$Rid = 'win-x64',
[ValidateSet('Zip','Inno')][string]$Mode = 'Zip'
)

$root = Resolve-Path "$PSScriptRoot/../../"
$appProj = Join-Path $root 'SemanticDeveloper/SemanticDeveloper.csproj'
$outDir = Join-Path $PSScriptRoot 'out/publish'
$artifacts = Join-Path $PSScriptRoot 'artifacts'
New-Item -Force -ItemType Directory -Path $outDir | Out-Null
New-Item -Force -ItemType Directory -Path $artifacts | Out-Null

Write-Host "Publishing SemanticDeveloper for $Rid ..."
dotnet publish $appProj -c Release -r $Rid --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=false -o $outDir

if ($LASTEXITCODE -ne 0) { throw 'Publish failed.' }

if ($Mode -eq 'Zip') {
$zip = Join-Path $artifacts "SemanticDeveloper-$Rid.zip"
if (Test-Path $zip) { Remove-Item $zip -Force }
Write-Host "Zipping to $zip ..."
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::CreateFromDirectory($outDir, $zip)
Write-Host "Done: $zip"
exit 0
}

if ($Mode -eq 'Inno') {
$iscc = (Get-Command iscc.exe -ErrorAction SilentlyContinue)
if (-not $iscc) { throw 'Inno Setup (iscc.exe) not found in PATH.' }
$iss = Join-Path $PSScriptRoot 'SemanticDeveloper.iss'
& $iscc $iss /DRID=$Rid /DOutDir=$outDir /DArtifactsDir=$artifacts
if ($LASTEXITCODE -ne 0) { throw 'Inno Setup build failed.' }
Write-Host "Done. See artifacts folder."
exit 0
}

27 changes: 27 additions & 0 deletions SemanticDeveloper/Installers/macOS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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>CFBundleName</key>
<string>SemanticDeveloper</string>
<key>CFBundleDisplayName</key>
<string>SemanticDeveloper</string>
<key>CFBundleIdentifier</key>
<string>com.stainlessdesigner.semanticdeveloper</string>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleExecutable</key>
<string>SemanticDeveloper</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

22 changes: 22 additions & 0 deletions SemanticDeveloper/Installers/macOS/Installer.macOS.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<AssemblyName>SemanticDeveloper.Installer.macOS</AssemblyName>
<RootNamespace>SemanticDeveloper.Installer.macOS</RootNamespace>
<OutputType>Exe</OutputType>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" CopyToOutputDirectory="PreserveNewest" />
<None Include="create_dmg.sh" CopyToOutputDirectory="PreserveNewest" />
<None Include="Info.plist" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<Target Name="Package" DependsOnTargets="Build">
<Message Text="Run create_dmg.sh on macOS to build .app and .dmg." Importance="High" />
</Target>
</Project>

25 changes: 25 additions & 0 deletions SemanticDeveloper/Installers/macOS/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
SemanticDeveloper — macOS Installer Project

Overview
- Produces a macOS `.app` bundle and a `.dmg` image following Avalonia guidance.

Prerequisites (run on macOS)
- macOS 12+
- Xcode command line tools (for `hdiutil`)
- .NET 8 SDK

Build steps
- Open a terminal in this folder.
- Make the script executable: `chmod +x create_dmg.sh`
- Intel: `./create_dmg.sh osx-x64`
- Apple Silicon: `./create_dmg.sh osx-arm64`
- Result: `dist/SemanticDeveloper-osx-<arch>.dmg`

Notes
- The script creates `SemanticDeveloper.app` and then a DMG.
- You may need to sign and notarize for distribution.

References
- Avalonia deployment (macOS): https://docs.avaloniaui.net/docs/deployment/macOS
- Apple notarization: https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution

35 changes: 35 additions & 0 deletions SemanticDeveloper/Installers/macOS/create_dmg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -euo pipefail

RID="${1:-osx-x64}"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT="$(cd "$SCRIPT_DIR/../../" && pwd)"
APP_PROJ="$ROOT/SemanticDeveloper/SemanticDeveloper.csproj"
PUBLISH_DIR="$SCRIPT_DIR/out/publish"
APP_DIR="$SCRIPT_DIR/out/SemanticDeveloper.app"
CONTENTS_DIR="$APP_DIR/Contents"
MACOS_DIR="$CONTENTS_DIR/MacOS"
RESOURCES_DIR="$CONTENTS_DIR/Resources"
DIST_DIR="$SCRIPT_DIR/dist"

mkdir -p "$PUBLISH_DIR" "$MACOS_DIR" "$RESOURCES_DIR" "$DIST_DIR"

echo "Publishing SemanticDeveloper for $RID ..."
dotnet publish "$APP_PROJ" -c Release -r "$RID" --self-contained true \
/p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=false \
-o "$PUBLISH_DIR"

echo "Creating .app bundle ..."
cp -R "$SCRIPT_DIR/Info.plist" "$CONTENTS_DIR/Info.plist"
cp "$ROOT/SemanticDeveloper/Images/SemanticDeveloperLogo.ico" "$RESOURCES_DIR/Icon.icns" || true
cp -R "$PUBLISH_DIR"/* "$MACOS_DIR/"
chmod +x "$MACOS_DIR/SemanticDeveloper"

DMG_NAME="SemanticDeveloper-${RID}.dmg"
DMG_PATH="$DIST_DIR/$DMG_NAME"
test -f "$DMG_PATH" && rm -f "$DMG_PATH"

echo "Creating DMG ..."
hdiutil create -volname "SemanticDeveloper" -srcfolder "$APP_DIR" -ov -format UDZO "$DMG_PATH"
echo "Done: $DMG_PATH"

Loading