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
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ on:
branches: [main]

jobs:
linux-alpha:
name: Linux alpha (AppImage x64)
runs-on: ubuntu-24.04
defaults:
run:
working-directory: app
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
cache-dependency-path: app/package-lock.json
- run: npm ci
- run: npm test
- run: npm version 0.1.5-alpha.1 --no-git-tag-version --allow-same-version
- run: npm run build && npx electron-builder --linux AppImage --x64 --publish never
- uses: actions/upload-artifact@v7
with:
name: joychromium-linux-alpha-x64
path: app/release/*.AppImage
if-no-files-found: error

electron:
name: electron (${{ matrix.os }})
strategy:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ name: Release
# 2. A manual dispatch with an optional exact SemVer version or a bump level.
# Versions advance from published GitHub Releases, never historic tags. Windows builds with that version injected,
# then installers + update metadata go to a GitHub Release
# and installed apps pick it up through electron-updater. Anything below 1.0 is published as a pre-release: 0.x builds
# are for trying out, not for the `latest` channel an installed app follows.
# and installed apps pick it up through electron-updater. Only versions with a SemVer pre-release suffix
# are published outside the stable channel.
on:
push:
branches: [main]
Expand Down Expand Up @@ -153,5 +153,5 @@ jobs:
if [ "$PRERELEASE" = "true" ]; then
gh release edit "$VERSION" --notes-file notes.md --draft=false --prerelease --latest=false
else
gh release edit "$VERSION" --notes-file notes.md --draft=false
gh release edit "$VERSION" --notes-file notes.md --draft=false --latest
fi
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ A web browser for the TV that you drive with a **game controller** from the couc
English · [Português (Brasil)](README.pt-BR.md)

![Windows](https://img.shields.io/badge/Windows-10%2F11-blue)
![Version](https://img.shields.io/github/v/release/lippdev/joychromium?include_prereleases&label=version&color=orange)
![Version](https://img.shields.io/github/v/release/lippdev/joychromium?label=version&color=orange)
![License](https://img.shields.io/github/license/lippdev/joychromium)

<img src="docs/assets/demo.gif" alt="JoyChromium tour: the left stick moves the pointer, the D-pad jumps between links, the on-screen keyboard types an address and the right stick scrolls the page." width="800">

## Download

Get **[0.1.0-alpha](https://github.com/lippdev/joychromium/releases/tag/v0.1.0-alpha)**, the first public test version:
### Windows 10/11

- **`JoyChromium-0.1.0-alpha-win-x64.exe`**: most PCs (Intel and AMD).
- **`JoyChromium-0.1.0-alpha-win-arm64.exe`**: PCs with a Snapdragon (ARM) processor.
Download **[JoyChromium 0.1.5](https://github.com/lippdev/joychromium/releases/tag/v0.1.5)**, the first stable Windows release.

- **`JoyChromium-0.1.5-win-x64.exe`** for Intel and AMD PCs.
- **`JoyChromium-0.1.5-win-arm64.exe`** for Windows on ARM PCs.

Per-user install, no admin. Windows 10 or 11 and a controller: Xbox, PlayStation (DualShock / DualSense), Switch Pro, 8BitDo or any pad Windows sees as a gamepad.

> **This is an alpha.** Expect rough edges. It does not update itself yet: new versions show up on the [releases page](https://github.com/lippdev/joychromium/releases) (watch the repo → *Custom* → *Releases* to be told). Netflix and other paid streaming services are not validated yet.
JoyChromium checks for stable updates on launch and installs them silently. If you use 0.1.4-beta or earlier, install this release manually once. Playback on Netflix and other paid streaming services still needs validation.

### Linux (CachyOS)

The x64 AppImage alpha is available for testing through [GitHub Actions](https://github.com/lippdev/joychromium/actions/workflows/ci.yml). CachyOS validation is in progress. Updates are manual.

## How it works

Expand Down Expand Up @@ -62,16 +68,6 @@ On a PlayStation pad the letters become ✕ ○ □ △; the keyboard's button g
- Opens from launchers: `--tv` / `--window` / `--new-tab` flags and `joychromium://` links, so [Console Mode](https://github.com/lippdev/consolemode), Playnite or Steam can start it ([integrations](docs/INTEGRATIONS.md))
- English and Portuguese

## What's new in 0.1.0-alpha

The first public build:

- **A pointer on the left stick** that glides over the page, the toolbar and the menus, with A to click and the right stick as the wheel
- **Xbox-style keyboard:** X deletes, Y adds a space, LT is Shift, Start sends, and the left stick click changes the layer
- **The D-pad reaches everything:** up from the top of a page goes to the address bar, the buttons and the tabs; a new tab starts on the address bar
- **Ad blocker on the toolbar:** the shield turns it on or off
- **New onboarding** with your search engine (Google, DuckDuckGo, Bing, Brave or Startpage) and a controller test

## Roadmap

**Now:** Windows 10/11 · **Next:** macOS ([#108](https://github.com/lippdev/joychromium/issues/108)), Linux, Wayland and Flathub ([#109](https://github.com/lippdev/joychromium/issues/109)), Steam Deck ([#110](https://github.com/lippdev/joychromium/issues/110)) · [All platforms](docs/ROADMAP.md)
Expand Down
26 changes: 11 additions & 15 deletions README.pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ Um navegador para a TV que você usa com o **controle de videogame**, do sofá.
[English](README.md) · Português (Brasil)

![Windows](https://img.shields.io/badge/Windows-10%2F11-blue)
![Versão](https://img.shields.io/github/v/release/lippdev/joychromium?include_prereleases&label=vers%C3%A3o&color=orange)
![Versão](https://img.shields.io/github/v/release/lippdev/joychromium?label=vers%C3%A3o&color=orange)
![Licença](https://img.shields.io/github/license/lippdev/joychromium?label=licen%C3%A7a)

<img src="docs/assets/demo.gif" alt="Tour do JoyChromium: o analógico esquerdo move o ponteiro, o D-pad pula entre os links, o teclado na tela digita um endereço e o analógico direito rola a página." width="800">

## Baixar

Baixe a **[0.1.0-alpha](https://github.com/lippdev/joychromium/releases/tag/v0.1.0-alpha)**, a primeira versão pública de teste:
### Windows 10/11

- **`JoyChromium-0.1.0-alpha-win-x64.exe`**: a maioria dos PCs (Intel e AMD).
- **`JoyChromium-0.1.0-alpha-win-arm64.exe`**: PCs com processador Snapdragon (ARM).
Baixe o **[JoyChromium 0.1.5](https://github.com/lippdev/joychromium/releases/tag/v0.1.5)**, a primeira versão estável para Windows.

- **`JoyChromium-0.1.5-win-x64.exe`** para PCs Intel e AMD.
- **`JoyChromium-0.1.5-win-arm64.exe`** para PCs com Windows em ARM.

Instala só para o seu usuário, sem administrador. Requer Windows 10 ou 11 e um controle: Xbox, PlayStation (DualShock / DualSense), Switch Pro, 8BitDo ou qualquer um que o Windows reconheça como gamepad.

> **Esta é uma alpha.** Espere arestas. Ela ainda não se atualiza sozinha: as versões novas aparecem na [página de releases](https://github.com/lippdev/joychromium/releases) (para ser avisado, clique em *Watch* → *Custom* → *Releases*). Netflix e outros serviços de streaming pagos ainda não foram validados.
O JoyChromium verifica atualizações estáveis ao abrir e instala em silêncio. Se você usa a 0.1.4-beta ou anterior, instale esta versão manualmente uma vez. A reprodução na Netflix e em outros serviços de streaming pagos ainda precisa de validação.

### Linux (CachyOS)

O AppImage alfa x64 está disponível para testes pelo [GitHub Actions](https://github.com/lippdev/joychromium/actions/workflows/ci.yml). A validação no CachyOS está em andamento. As atualizações são manuais.

## Como funciona

Expand Down Expand Up @@ -62,16 +68,6 @@ No controle de PlayStation as letras viram ✕ ○ □ △; os símbolos do tecl
- Abre a partir de launchers: flags `--tv` / `--window` / `--new-tab` e links `joychromium://`, para o [Console Mode](https://github.com/lippdev/consolemode), o Playnite ou a Steam abrirem o app ([integrações](docs/INTEGRATIONS.md))
- Português e inglês

## Novidades da 0.1.0-alpha

A primeira versão pública:

- **Ponteiro no analógico esquerdo**, que desliza pela página, pela barra e pelos menus, com o A para clicar e o analógico direito como roda do mouse
- **Teclado no estilo do Xbox:** X apaga, Y dá espaço, LT é o Shift, Start envia e o clique do analógico esquerdo troca a camada
- **O D-pad chega em tudo:** para cima, do topo da página, vai para a barra de endereço, os botões e as abas; uma aba nova começa na barra de endereço
- **Bloqueador de anúncios na barra:** o escudo liga e desliga
- **Onboarding novo**, com a escolha do buscador (Google, DuckDuckGo, Bing, Brave ou Startpage) e um teste do controle

## Roadmap

**Agora:** Windows 10/11 · **Depois:** macOS ([#108](https://github.com/lippdev/joychromium/issues/108)), Linux, Wayland e Flathub ([#109](https://github.com/lippdev/joychromium/issues/109)), Steam Deck ([#110](https://github.com/lippdev/joychromium/issues/110)) · [Todas as plataformas](docs/ROADMAP.md)
Expand Down
8 changes: 3 additions & 5 deletions app/scripts/release-notes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ export function groupCommits(subjects, { previousTag, version } = {}) {
lines.push(
"### Instaladores",
"",
"Windows (`.exe`, x64 e arm64), macOS (`.dmg`/`.zip`, x64 e arm64) e Linux (`.AppImage`, `.deb`, `.rpm`, x64 e arm64).",
"Os builds não são assinados (ADR-010): o Windows mostra o SmartScreen e o macOS recusa a instalação de um clique.",
"Windows 10/11 (`.exe`, x64 e arm64). O SmartScreen pode mostrar um aviso porque o instalador está sem assinatura de código.",
"",
"**macOS:** a imagem de disco traz `LEIA-ME.txt` e `install-macos.command`. Abra o `.dmg` e dê dois cliques em `install-macos.command` — ele copia o app para Aplicativos e limpa a quarentena. Na mão: arraste o **JoyChromium** para Aplicativos e abra uma vez com botão direito → **Abrir**; se essa opção não aparecer, rode `xattr -dr com.apple.quarantine /Applications/JoyChromium.app`. O aviso \"Este Mac não conseguiu verificar o app\" é falta de notarização, não app danificado: `codesign --verify --deep --strict` passa neste build.",
"",
"As versões instaladas se atualizam sozinhas, exceto no macOS (o app avisa e abre esta página) e nas versões abaixo de 1.0, que saem como pré-release e se atualizam à mão.",
"A partir da 0.1.5-beta, o Windows verifica e instala atualizações automaticamente. Quem usa a 0.1.4-beta ou anterior precisa instalar manualmente uma vez.",
"A reprodução em serviços pagos com DRM ainda precisa de validação.",
"",
"Guia de instalação: https://github.com/lippdev/joychromium/blob/main/docs/INSTALL.md",
);
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/release-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function parseSemver(version) {
export function isPrerelease(version) {
const match = parseSemver(version);
if (!match) throw new Error(`Invalid SemVer version: ${version}`);
return Boolean(match[4]) || Number(match[1]) === 0;
return Boolean(match[4]);
}

export function selectReleaseVersion({ requested, current, latest, bump = "patch" }) {
Expand Down
1 change: 1 addition & 0 deletions app/scripts/release-version.node-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ test("a clean release reset uses package metadata, ignoring historic tags", () =
});

test("manual versions accept stable SemVer and reject malformed input", () => {
assert.equal(isPrerelease("0.1.5"), false);
assert.equal(selectReleaseVersion({ requested: "1.0.0", current: "0.1.0-alpha" }), "1.0.0");
assert.equal(selectReleaseVersion({ requested: "0.1.0-alpha.1", current: "0.1.0-alpha" }), "0.1.0-alpha.1");
assert.throws(() => selectReleaseVersion({ requested: "v01.0.0", current: "0.1.0-alpha" }), /Invalid requested/);
Expand Down
15 changes: 8 additions & 7 deletions app/src/main/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import type { Log } from "./log";

/** Where the updater looks for the download page when it cannot install by itself. */
export const RELEASES_URL = "https://github.com/lippdev/joychromium/releases/latest";
/** The whole release list, which is where a pre-1.0 build has to look: `latest` never points at a pre-release. */
/** The whole release list, including pre-releases. */
export const RELEASES_PAGE_URL = "https://github.com/lippdev/joychromium/releases";
/** Release metadata electron-builder publishes next to each build. */
const LATEST_MAC_YML = "https://github.com/lippdev/joychromium/releases/latest/download/latest-mac.yml";
/** What the settings row says on a pre-1.0 build that cannot install by itself (macOS) and so updates by hand. */
/** What the settings row says on a pre-release that updates by hand. */
export const alphaUpdateStatus = (version: string): string => `v${version} is a pre-release build; new versions come from the releases page`;

/**
Expand Down Expand Up @@ -51,9 +51,8 @@ export function versionFromUpdateYml(text: string): string | undefined {
* Flatpak builds are updated by the host from Flathub, so inside the sandbox `check()` reports that and stops before
* electron-updater (or even the release metadata) is reached.
*
* Pre-1.0 builds are published as pre-releases, which GitHub's `releases/latest` never serves: electron-updater reads
* the release feed for them (`allowPrerelease`). Only the macOS path, which reads `releases/latest` by hand, still
* points a pre-release build at the release list.
* Windows pre-releases use the release feed through `allowPrerelease`. Experimental Linux pre-releases
* are distributed separately and updated by hand.
*/
export class Updater {
status = "Not checked yet";
Expand All @@ -75,7 +74,9 @@ export class Updater {
}

private get installsItself(): boolean {
return platformId() !== "darwin" && !this.hostUpdatesIt;
const platform = platformId();
return platform !== "darwin" && !this.hostUpdatesIt
&& !(platform === "linux" && followsPrereleases(app.getVersion()));
}

/** True on a deb or rpm install, where the downloaded package goes through dpkg/rpm as root. */
Expand All @@ -94,7 +95,7 @@ export class Updater {
const { autoUpdater } = require("electron-updater") as typeof import("electron-updater");
// The download starts below, once the version is known not to be blocked by the remote policy.
autoUpdater.autoDownload = false;
// Pre-releases come from the release feed: `releases/latest` never serves them, and every build below 1.0 is one.
// Pre-releases come from the release feed: `releases/latest` never serves them.
autoUpdater.allowPrerelease = followsPrereleases(app.getVersion());
// A package manager prompt after the window closed would be a prompt nobody sees: the user starts the install.
autoUpdater.autoInstallOnAppQuit = !this.packageManaged;
Expand Down
14 changes: 3 additions & 11 deletions app/src/shared/updates.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
/**
* Which channel a build follows (E9-04 / release policy) and when a downloaded update is applied.
*
* Every release below 1.0 is published as a GitHub pre-release, and `releases/latest` never points at one. electron-
* updater's `allowPrerelease` reads the release feed instead, so a pre-1.0 or suffixed build follows the pre-releases
* and still updates by itself.
*/

/** True when the build must look at pre-releases too: anything below 1.0, or any version with a pre-release suffix. */
/** Whether a build with a SemVer pre-release suffix follows the GitHub pre-release feed. */
export function followsPrereleases(version: string): boolean {
const match = /^(\d+)\.\d+\.\d+(-[0-9A-Za-z.-]+)?/.exec(version);
const match = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.exec(version);
if (!match) return true;
return Number(match[1]) < 1 || Boolean(match[2]);
return Boolean(match[1]);
}

/**
Expand Down
7 changes: 4 additions & 3 deletions app/tests/unit/updates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { describe, expect, it } from "vitest";
import { followsPrereleases, installsAtLaunch, LAUNCH_INSTALL_WINDOW_MS } from "../../src/shared/updates";

describe("update channel", () => {
it("follows the pre-releases below 1.0 and on suffixed versions", () => {
expect(followsPrereleases("0.1.0")).toBe(true);
it("follows the pre-releases on suffixed versions", () => {
expect(followsPrereleases("0.1.4-beta")).toBe(true);
expect(followsPrereleases("0.1.0-alpha.1")).toBe(true);
expect(followsPrereleases("2.0.0-beta.1")).toBe(true);
});

it("follows the stable releases from 1.0 on", () => {
it("follows the stable releases on versions without a pre-release suffix", () => {
expect(followsPrereleases("0.1.5")).toBe(false);
expect(followsPrereleases("0.1.5+build-test")).toBe(false);
expect(followsPrereleases("1.0.0")).toBe(false);
expect(followsPrereleases("1.2.3")).toBe(false);
expect(followsPrereleases("10.0.0")).toBe(false);
Expand Down
4 changes: 2 additions & 2 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Instalando o JoyChromium no Windows

O alpha atual destina-se ao Windows 10/11. macOS e Linux estão no [roadmap](ROADMAP.md); os guias antigos dessas plataformas não são instruções de instalação do alpha atual.
O JoyChromium oferece instaladores para Windows 10/11. O AppImage x64 para CachyOS está em validação alfa no GitHub Actions. O macOS está no [roadmap](ROADMAP.md).

## Windows

Expand All @@ -9,7 +9,7 @@ O alpha atual destina-se ao Windows 10/11. macOS e Linux estão no [roadmap](ROA
3. Se o SmartScreen mostrar **O Windows protegeu o seu PC**, confira que baixou da página oficial de releases; para prosseguir, escolha **Mais informações → Executar assim mesmo**.
4. Abra o JoyChromium pelo menu Iniciar. Na primeira execução, conclua o onboarding e conecte o controle que pretende usar.

Depois de instalado, o JoyChromium se atualiza sozinho: a cada abertura ele verifica se há versão nova (pré-releases 0.x incluídas), baixa em segundo plano e instala em silêncio. Quem está numa versão anterior à 0.1.5 precisa instalar uma vez à mão a primeira versão com atualização automática. O instalador está sem assinatura de código, então o aviso do SmartScreen é esperado. DRM e streaming pago ainda não têm validação suficiente para serem anunciados como prontos.
Depois de instalado, o JoyChromium verifica novas versões a cada abertura, baixa em segundo plano e instala em silêncio. As versões estáveis seguem o canal estável. Quem está na 0.1.4-beta ou anterior precisa atualizar manualmente uma vez. DRM e streaming pago ainda precisam de validação.

## Primeira execução

Expand Down
Loading
Loading