Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
desktop/resources/bin/linux-x64/codex filter=lfs diff=lfs merge=lfs -text
codex/app/resources/codex filter=lfs diff=lfs merge=lfs -text
desktop/recovered/app-asar-extracted/** -whitespace
52 changes: 17 additions & 35 deletions .github/workflows/linux-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,18 @@ jobs:
cache-dependency-path: desktop/package-lock.json

- name: Hydrate Linux codex helpers
run: |
set -euo pipefail
CODEX_CLI_VERSION="$(node -p "require('./desktop/package.json').codexCliVersion")"
test -n "${CODEX_CLI_VERSION}"
npm install --prefix /tmp/codex-cli-package "@openai/codex@${CODEX_CLI_VERSION}"
CODEX_BINARY="$(find /tmp/codex-cli-package/node_modules -path '*/vendor/*/bin/codex' -type f | head -n 1)"
RG_BINARY="$(find /tmp/codex-cli-package/node_modules -path '*/vendor/*/codex-path/rg' -type f | head -n 1)"
test -n "${CODEX_BINARY}"
test -n "${RG_BINARY}"
install -m 0755 "${CODEX_BINARY}" desktop/resources/bin/linux-x64/codex
install -m 0755 "${RG_BINARY}" desktop/resources/bin/linux-x64/rg
run: node desktop/scripts/hydrate-codex-linux-helpers.mjs --arch x64

- name: Verify Linux codex helpers
run: |
set -euo pipefail
test -x desktop/resources/bin/linux-x64/codex
test -x desktop/resources/bin/codex-launcher
test -x desktop/resources/bin/linux-x64/codex-vendor/bin/codex
test -x desktop/resources/bin/linux-x64/codex-vendor/bin/codex-code-mode-host
test -x desktop/resources/bin/linux-x64/codex-vendor/codex-resources/bwrap
test -x desktop/resources/bin/linux-x64/codex-vendor/codex-resources/zsh/bin/zsh
test -x desktop/resources/bin/linux-x64/rg
desktop/resources/bin/linux-x64/codex --version
desktop/resources/bin/linux-x64/codex-vendor/bin/codex --version
desktop/resources/bin/linux-x64/rg --version | head -n 1

- name: Install Linux packaging dependencies
Expand Down Expand Up @@ -127,37 +121,25 @@ jobs:
- name: Hydrate Linux arm64 codex helpers
run: |
set -euo pipefail
CODEX_CLI_VERSION="$(node -p "require('./desktop/package.json').codexCliVersion")"
test -n "${CODEX_CLI_VERSION}"
npm install --prefix /tmp/codex-cli-package-arm64 --os=linux --cpu=arm64 "@openai/codex@${CODEX_CLI_VERSION}"
npm install --prefix /tmp/codex-cli-package-x64 --os=linux --cpu=x64 "@openai/codex@${CODEX_CLI_VERSION}"
CODEX_BINARY="$(find /tmp/codex-cli-package-arm64/node_modules -path '*/vendor/*/bin/codex' -type f | head -n 1)"
RG_BINARY="$(find /tmp/codex-cli-package-arm64/node_modules -path '*/vendor/*/codex-path/rg' -type f | head -n 1)"
X64_CODEX_BINARY="$(find /tmp/codex-cli-package-x64/node_modules -path '*/vendor/*/bin/codex' -type f | head -n 1)"
X64_RG_BINARY="$(find /tmp/codex-cli-package-x64/node_modules -path '*/vendor/*/codex-path/rg' -type f | head -n 1)"
test -n "${CODEX_BINARY}"
test -n "${RG_BINARY}"
test -n "${X64_CODEX_BINARY}"
test -n "${X64_RG_BINARY}"
mkdir -p desktop/resources/bin/linux-arm64
mkdir -p desktop/resources/bin/linux-x64
install -m 0755 "${CODEX_BINARY}" desktop/resources/bin/linux-arm64/codex
install -m 0755 "${RG_BINARY}" desktop/resources/bin/linux-arm64/rg
install -m 0755 "${X64_CODEX_BINARY}" desktop/resources/bin/linux-x64/codex
install -m 0755 "${X64_RG_BINARY}" desktop/resources/bin/linux-x64/rg
node desktop/scripts/hydrate-codex-linux-helpers.mjs --arch arm64
node desktop/scripts/hydrate-codex-linux-helpers.mjs --arch x64
install -m 0755 desktop/resources/bin/linux-x64/git desktop/resources/bin/linux-arm64/git

- name: Verify Linux arm64 codex helpers
run: |
set -euo pipefail
test -x desktop/resources/bin/linux-arm64/codex
test -x desktop/resources/bin/codex-launcher
test -x desktop/resources/bin/linux-arm64/codex-vendor/bin/codex
test -x desktop/resources/bin/linux-arm64/codex-vendor/bin/codex-code-mode-host
test -x desktop/resources/bin/linux-arm64/codex-vendor/codex-resources/bwrap
test -x desktop/resources/bin/linux-arm64/codex-vendor/codex-resources/zsh/bin/zsh
test -x desktop/resources/bin/linux-arm64/rg
test -x desktop/resources/bin/linux-arm64/git
test -x desktop/resources/bin/linux-x64/codex
test -x desktop/resources/bin/linux-x64/codex-vendor/bin/codex
test -x desktop/resources/bin/linux-x64/rg
file desktop/resources/bin/linux-arm64/codex | grep -Eq 'aarch64|ARM aarch64|ARM64'
file desktop/resources/bin/linux-arm64/codex-vendor/bin/codex | grep -Eq 'aarch64|ARM aarch64|ARM64'
file desktop/resources/bin/linux-arm64/rg | grep -Eq 'aarch64|ARM aarch64|ARM64'
desktop/resources/bin/linux-arm64/codex --version
desktop/resources/bin/linux-arm64/codex-vendor/bin/codex --version
desktop/resources/bin/linux-arm64/rg --version | head -n 1

- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ desktop/.webpack/
desktop/.git/
desktop/tmp/
desktop/.tmp-tests/
desktop/resources/bin/linux-*/codex-vendor/
docs/linux/parity-captures/
codex-3-12/
/bootstrap*.js
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This repo tracks the Linux packaging pipeline for Codex and publishes installabl
GitHub release artifacts:
- Install from GitHub Releases using packaged artifacts (`.AppImage` / `.deb` / `.rpm`).
- Built Linux installers are release-only outputs and are not tracked in git.
- Current Linux artifact versioning follows the embedded Electron app version `26.422.21647`; the embedded build number is `2056`.
- Release tags like `v26.422.21647` trigger `.github/workflows/linux-release.yml`.
- Current Linux artifact versioning follows the embedded Electron app version `26.707.31123`; the embedded build number is `5042`.
- Release tags like `v26.707.31123` trigger `.github/workflows/linux-release.yml`.

Arch Linux / Yay:
- AUR metadata lives in `packaging/aur/openai-codex-desktop-bin`.
Expand Down
7 changes: 6 additions & 1 deletion desktop/dev/recovered-webview-dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ export const RECOVERED_LINUX_BIN_ROOT = path.resolve(
'bin',
'linux-x64',
);
export const RECOVERED_CODEX_CLI_PATH = path.join(RECOVERED_LINUX_BIN_ROOT, 'codex');
export const RECOVERED_CODEX_CLI_PATH = path.join(
RECOVERED_LINUX_BIN_ROOT,
'codex-vendor',
'bin',
'codex',
);
export const RECOVERED_GIT_EXECUTABLE_PATH = path.join(RECOVERED_LINUX_BIN_ROOT, 'git');
export const RECOVERED_RG_EXECUTABLE_PATH = path.join(RECOVERED_LINUX_BIN_ROOT, 'rg');
export const RECOVERED_WEBVIEW_ROOT = path.resolve(
Expand Down
13 changes: 12 additions & 1 deletion desktop/forge.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ForgeConfig } from '@electron-forge/shared-types';
import fs from 'node:fs';
import path from 'node:path';

import { MakerSquirrel } from '@electron-forge/maker-squirrel';
Expand Down Expand Up @@ -64,7 +65,8 @@ const config: ForgeConfig = {
asar: true,
icon: linuxPackagerIcon,
extraResource: [
path.join(linuxHelperResourceRoot, 'codex'),
path.join(__dirname, 'resources', 'bin', 'codex-launcher'),
path.join(linuxHelperResourceRoot, 'codex-vendor'),
path.join(linuxHelperResourceRoot, 'rg'),
path.join(__dirname, 'resources', 'plugins'),
],
Expand Down Expand Up @@ -104,6 +106,15 @@ const config: ForgeConfig = {
},
rebuildConfig: {},
hooks: {
postPackage: async (_forgeConfig, packageResult) => {
for (const outputPath of packageResult.outputPaths) {
const resourcesRoot = path.join(outputPath, 'resources');
const launcherPath = path.join(resourcesRoot, 'codex-launcher');
const codexPath = path.join(resourcesRoot, 'codex');
fs.renameSync(launcherPath, codexPath);
fs.chmodSync(codexPath, 0o755);
}
},
preStart: async () => {
applyRecoveredLinuxHelperEnv();
await ensureRecoveredWebviewDevServer();
Expand Down
4 changes: 2 additions & 2 deletions desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
{
"name": "codex-desktop",
"productName": "Codex",
"version": "26.623.101652",
"version": "26.707.31123",
"description": "Codex",
"main": "recovered/app-asar-extracted/.vite/build/bootstrap.js",
"main": "recovered/app-asar-extracted/.vite/build/early-bootstrap.js",
"private": true,
"author": "OpenAI",
"codexAppBrand": "chatgpt",
"codexBuildFlavor": "prod",
"codexBuildNumber": "4674",
"codexCliVersion": "0.142.4",
"codexBuildNumber": "5042",
"codexCliVersion": "0.144.0-alpha.4",
"scripts": {
"rebuild:natives": "electron-rebuild -f -w better-sqlite3,node-pty",
"start": "npm run rebuild:natives && electron-forge start",
"package": "npm run rebuild:natives && electron-forge package",
"hydrate:codex:linux": "node ./scripts/hydrate-codex-linux-helpers.mjs",
"start": "npm run hydrate:codex:linux && npm run rebuild:natives && electron-forge start",
"package": "npm run hydrate:codex:linux && npm run rebuild:natives && electron-forge package",
"assemble:codex-runtime": "node ./scripts/assemble-codex-runtime.mjs",
"build:codex:linux": "node ./scripts/build-codex-linux-runtime.mjs",
"stage:codex-package": "node ./scripts/stage-codex-package.mjs",
"make": "npm run rebuild:natives && electron-forge make",
"make:linux": "npm run rebuild:natives && electron-forge make --platform linux",
"make:linux:arm64:deb": "npm run rebuild:natives && CODEX_LINUX_HELPER_ARCH=linux-arm64 electron-forge make --platform linux --arch arm64 --targets deb",
"publish": "npm run rebuild:natives && electron-forge publish",
"make": "npm run hydrate:codex:linux && npm run rebuild:natives && electron-forge make",
"make:linux": "npm run hydrate:codex:linux && npm run rebuild:natives && electron-forge make --platform linux",
"make:linux:arm64:deb": "npm run hydrate:codex:linux -- --arch arm64 && npm run rebuild:natives && CODEX_LINUX_HELPER_ARCH=linux-arm64 electron-forge make --platform linux --arch arm64 --targets deb",
"publish": "npm run hydrate:codex:linux && npm run rebuild:natives && electron-forge publish",
"lint": "eslint --ext .ts,.tsx .",
"test": "node ./tests/linux/run-jest.cjs",
"test:linux": "node ./tests/linux/run-jest.cjs --runInBand",
Expand Down
Loading