Skip to content

Commit c7ef03e

Browse files
Merge pull request #10 from semantic-developer/feature/sd-12
added installer projects
2 parents baf981e + 3d3f22d commit c7ef03e

File tree

18 files changed

+387
-12
lines changed

18 files changed

+387
-12
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ packages/
3434
# Publish output
3535
publish/
3636

37+
# installers
38+
SemanticDeveloper/Installers/Linux/pkgroot/
39+
3740
# OS files
3841
[Dd]esktop.ini
3942
[Tt]humbs.db

NOTICE

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
NOTICE
22
======
33

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

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

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

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

17-
The above copyright notice and this permission notice shall be included in all
18-
copies or substantial portions of the Software.
17+
The contents of this NOTICE file are for informational purposes only and
18+
do not modify the License.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<IsPackable>false</IsPackable>
5+
<Nullable>enable</Nullable>
6+
<AssemblyName>SemanticDeveloper.Installer.Linux</AssemblyName>
7+
<RootNamespace>SemanticDeveloper.Installer.Linux</RootNamespace>
8+
<OutputType>Exe</OutputType>
9+
<ImplicitUsings>disable</ImplicitUsings>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<None Include="README.md" CopyToOutputDirectory="PreserveNewest" />
14+
<None Include="build_deb.sh" CopyToOutputDirectory="PreserveNewest" />
15+
<None Include="debian/usr/share/applications/semantic-developer.desktop" CopyToOutputDirectory="PreserveNewest" />
16+
</ItemGroup>
17+
18+
<Target Name="Package" DependsOnTargets="Build">
19+
<Message Text="Run build_deb.sh on Debian/Ubuntu to build .deb." Importance="High" />
20+
</Target>
21+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
SemanticDeveloper — Linux Installer Project (Debian/Ubuntu)
2+
3+
Overview
4+
- Produces a `.deb` package for Debian/Ubuntu following Avalonia guidance.
5+
6+
Prerequisites (run on Debian/Ubuntu)
7+
- .NET 8 SDK
8+
- `dpkg-deb`, `fakeroot`
9+
10+
Build steps
11+
- Open a terminal in this folder.
12+
- Make the script executable: `chmod +x build_deb.sh`
13+
- x64: `./build_deb.sh linux-x64`
14+
- arm64: `./build_deb.sh linux-arm64`
15+
- Result: `dist/semantic-developer_<version>_<arch>.deb`
16+
17+
Notes
18+
- Installs under `/opt/semantic-developer` and adds launcher under `/usr/share/applications`.
19+
20+
References
21+
- Avalonia deployment (Debian/Ubuntu): https://docs.avaloniaui.net/docs/deployment/debian-ubuntu
22+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
RID="${1:-linux-x64}"
5+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
6+
ROOT="$(cd "$SCRIPT_DIR/../../" && pwd)"
7+
APP_PROJ="$ROOT/SemanticDeveloper/SemanticDeveloper.csproj"
8+
PUBLISH_DIR="$SCRIPT_DIR/out/publish"
9+
PKG_ROOT="$SCRIPT_DIR/pkgroot"
10+
DIST_DIR="$SCRIPT_DIR/dist"
11+
VERSION="1.0.1"
12+
ARCH="amd64"
13+
if [[ "$RID" == "linux-arm64" ]]; then ARCH="arm64"; fi
14+
15+
rm -rf "$PKG_ROOT" "$PUBLISH_DIR"
16+
mkdir -p "$PUBLISH_DIR" "$PKG_ROOT/opt/semantic-developer" "$PKG_ROOT/usr/bin" "$PKG_ROOT/usr/share/applications" "$DIST_DIR"
17+
18+
echo "Publishing SemanticDeveloper for $RID ..."
19+
dotnet publish "$APP_PROJ" -c Release -r "$RID" --self-contained true \
20+
/p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=false \
21+
-o "$PUBLISH_DIR"
22+
23+
echo "Staging files ..."
24+
cp -R "$PUBLISH_DIR"/* "$PKG_ROOT/opt/semantic-developer/"
25+
ln -sf "/opt/semantic-developer/SemanticDeveloper" "$PKG_ROOT/usr/bin/semantic-developer"
26+
27+
echo "Adding desktop entry ..."
28+
install -m 644 "$SCRIPT_DIR/debian/usr/share/applications/semantic-developer.desktop" "$PKG_ROOT/usr/share/applications/semantic-developer.desktop"
29+
30+
echo "Preparing control files ..."
31+
mkdir -p "$PKG_ROOT/DEBIAN"
32+
CONTROL_FILE="$PKG_ROOT/DEBIAN/control"
33+
cat > "$CONTROL_FILE" <<EOF
34+
Package: semantic-developer
35+
Version: $VERSION
36+
Section: utils
37+
Priority: optional
38+
Architecture: $ARCH
39+
Maintainer: Stainless Designer LLC
40+
Depends: libgtk-3-0, libxi6, libxrender1, libx11-xcb1, libxcb1, libc6
41+
Description: SemanticDeveloper — Avalonia desktop app for Codex CLI
42+
EOF
43+
44+
echo "Building .deb ..."
45+
DEB_PATH="$DIST_DIR/semantic-developer_${VERSION}_${ARCH}.deb"
46+
fakeroot dpkg-deb --build "$PKG_ROOT" "$DEB_PATH"
47+
echo "Done: $DEB_PATH"
48+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=SemanticDeveloper
4+
Comment=Avalonia desktop UI for Codex CLI
5+
Exec=semantic-developer
6+
Icon=semantic-developer
7+
Terminal=false
8+
Categories=Development;Utility;
9+
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<IsPackable>false</IsPackable>
5+
<Nullable>enable</Nullable>
6+
<AssemblyName>SemanticDeveloper.Installer.Windows</AssemblyName>
7+
<RootNamespace>SemanticDeveloper.Installer.Windows</RootNamespace>
8+
<OutputType>Exe</OutputType>
9+
<ImplicitUsings>disable</ImplicitUsings>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<None Include="README.md" CopyToOutputDirectory="PreserveNewest" />
14+
<None Include="build.ps1" CopyToOutputDirectory="PreserveNewest" />
15+
<None Include="SemanticDeveloper.iss" CopyToOutputDirectory="PreserveNewest" />
16+
</ItemGroup>
17+
18+
<Target Name="Package" DependsOnTargets="Build">
19+
<Message Text="Run build.ps1 to create Windows installer or zip package." Importance="High" />
20+
</Target>
21+
</Project>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
SemanticDeveloper — Windows Installer Project
2+
3+
Overview
4+
- Produces a distributable for Windows: either a ZIP of the self-contained publish output or an installer using Inno Setup (optional).
5+
- Follows Avalonia guidance: publish self-contained, single-file, no trimming.
6+
7+
Prerequisites
8+
- Windows 10/11
9+
- .NET 8 SDK
10+
- Optional (for .exe installer): Inno Setup 6 (`iscc.exe`) added to PATH
11+
12+
Build steps (ZIP package)
13+
- Open a PowerShell prompt in this folder.
14+
- Run: `./build.ps1 -Rid win-x64 -Mode Zip`
15+
- Result: `artifacts/SemanticDeveloper-win-x64.zip`
16+
17+
Build steps (Inno Setup installer)
18+
- Ensure Inno Setup is installed and `iscc.exe` is on PATH.
19+
- Run: `./build.ps1 -Rid win-x64 -Mode Inno`
20+
- Result: `artifacts/SemanticDeveloperSetup-win-x64.exe`
21+
22+
Notes
23+
- The script publishes the app from `../..//SemanticDeveloper/SemanticDeveloper.csproj`.
24+
- To build for ARM64, use `-Rid win-arm64`.
25+
- You can customize app metadata in `SemanticDeveloper.iss`.
26+
27+
References
28+
- Avalonia deployment (Windows): https://docs.avaloniaui.net/docs/deployment/windows
29+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
; Inno Setup script to package SemanticDeveloper
2+
#define AppName "SemanticDeveloper"
3+
#define AppVersion "1.0.1"
4+
#define Publisher "Stainless Designer LLC"
5+
#define URL "https://github.com/stainless-design/semantic-developer"
6+
#ifndef RID
7+
#define RID "win-x64"
8+
#endif
9+
#ifndef OutDir
10+
#define OutDir "out\\publish"
11+
#endif
12+
#ifndef ArtifactsDir
13+
#define ArtifactsDir "artifacts"
14+
#endif
15+
16+
[Setup]
17+
AppId={{C21A3B89-8F5C-4E9F-9F5D-7B5C6A5B3A99}
18+
AppName={#AppName}
19+
AppVersion={#AppVersion}
20+
AppPublisher={#Publisher}
21+
AppPublisherURL={#URL}
22+
DefaultDirName={autopf64}\{#AppName}
23+
DefaultGroupName={#AppName}
24+
UninstallDisplayIcon={app}\SemanticDeveloper.exe
25+
OutputBaseFilename=SemanticDeveloperSetup-{#RID}
26+
OutputDir={#ArtifactsDir}
27+
Compression=lzma2
28+
SolidCompression=yes
29+
DisableDirPage=auto
30+
DisableProgramGroupPage=auto
31+
ArchitecturesInstallIn64BitMode=x64 arm64
32+
SetupIconFile=..\\..\\SemanticDeveloper\\Images\\SemanticDeveloperLogo.ico
33+
34+
[Languages]
35+
Name: "en"; MessagesFile: "compiler:Default.isl"
36+
37+
[Tasks]
38+
Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription: "Additional icons:"; Flags: unchecked
39+
40+
[Files]
41+
Source: "{#OutDir}/*"; DestDir: "{app}"; Flags: recursesubdirs ignoreversion
42+
43+
[Icons]
44+
Name: "{autoprograms}\{#AppName}"; Filename: "{app}\SemanticDeveloper.exe"
45+
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\SemanticDeveloper.exe"; Tasks: desktopicon
46+
47+
[Run]
48+
Filename: "{app}\SemanticDeveloper.exe"; Description: "Launch {#AppName}"; Flags: nowait postinstall skipifsilent

0 commit comments

Comments
 (0)