Skip to content
14 changes: 9 additions & 5 deletions frontend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,8 @@ function formatSize(bytes) {
}

function releaseLabel(r) {
const date = r.published ? ' (' + r.published.slice(0, 10) + ')' : '';
const when = r.built || r.published;
const date = when ? ' (' + when.slice(0, 10) + ')' : '';
return r.tag + date + (r.prerelease ? ' - ' + t('downloads.prerelease') : '');
}

Expand Down Expand Up @@ -1774,8 +1775,8 @@ function currentModularRelease() {
const CORE_PLATFORM_LABELS = {
osx: 'macOS (OSX only)',
macos: 'macOS (including iOS, tvOS, catOS)',
ios: 'iOS',
tvos: 'tvOS',
ios: 'iOS (Apple)',
tvos: 'tvOS (Apple)',
vs: 'Windows (Visual Studio)',
msys2: 'Windows (MSYS2)',
linux: 'Linux',
Expand All @@ -1784,7 +1785,8 @@ const CORE_PLATFORM_LABELS = {
linuxarmv6l: 'Linux (armv6l)',
linuxarmv7l: 'Linux (armv7l)',
android: 'Android',
emscripten: 'Emscripten (Web)',
emscripten: 'Emscripten (Web) (default 32)',
emscripten64: 'Emscripten (Web) (WASM64)',
};

function corePlatformLabel(platform) {
Expand All @@ -1801,7 +1803,8 @@ function sortCorePlatforms(platforms) {
function modularTargetLabel(target) {
const named = {
osx_64: 'macOS (OSX) (x86_64 / arm64)',
ios_64: 'iOS (arm64)',
ios_64: 'iOS (arm64) (Apple)',
tvos_64: 'tvOS (Apple)',
vs_64: 'Windows (x64)',
vs_arm64: 'Windows (arm64)',
vs_arm64ec: 'Windows (arm64ec)',
Expand Down Expand Up @@ -1886,6 +1889,7 @@ function downloadCoreLibs() {
const platform = $('#corePlatformDropdown').dropdown('get value');
if (!tag || !platform) return;
if (source === 'archive' && !confirm(t('downloads.archiveConfirm', { tag }))) return;
if (platform === 'emscripten64' && !confirm(t('downloads.wasm64Confirm'))) return;
$('#downloadCoreLibsButton').addClass('loading disabled');
openConsoleForOperation();
ipcRenderer.send('downloadCoreLibs', { ofPath: $("#ofPath").val(), source, tag, platform });
Expand Down
6 changes: 3 additions & 3 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,10 @@ <h4 class="ui dividing header" data-i18n="downloads.coreHeader">Core libraries</
<div class="ui selection dropdown" id="coreSourceDropdown">
<input type="hidden" value="apothecary">
<i class="dropdown icon"></i>
<div class="text">Apothecary</div>
<div class="text">Apothecary (GitHub) (Recommended)</div>
<div class="menu">
<div class="item" data-value="apothecary" data-i18n="downloads.sourceApothecary">Apothecary (recommended)</div>
<div class="item" data-value="oflibs" data-i18n="downloads.sourceOfLibs">ofLibs (experimental)</div>
<div class="item" data-value="apothecary" data-i18n="downloads.sourceApothecary">Apothecary (GitHub) (Recommended)</div>
<div class="item" data-value="oflibs" data-i18n="downloads.sourceOfLibs">ofLibs (GitHub) (experimental)</div>
<div class="item" data-value="archive" data-i18n="downloads.sourceArchive">Archive (libs.danoli3.com)</div>
</div>
</div>
Expand Down
27 changes: 22 additions & 5 deletions frontend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,15 @@ function githubJSON(url) {
});
}

// rolling tags (latest, latest-modular) get assets re-uploaded without re-publishing the release,
// so date them by the newest osx core asset, else the newest asset
function releaseBuildDate(r) {
const files = r.assets.filter((a) => !/\.(sha256|manifest\.json)$/.test(a.name));
const osx = files.filter((a) => /^openFrameworksLibs_.*_osx/.test(a.name));
const dates = (osx.length ? osx : files).map((a) => a.updated_at).filter(Boolean).sort();
return dates.length ? dates[dates.length - 1] : r.published_at;
}

function fetchApothecaryReleases(refresh) {
if (apothecaryReleases && !refresh) return Promise.resolve(apothecaryReleases);
return githubJSON(`https://api.github.com/repos/${APOTHECARY_REPO}/releases?per_page=50`).then((releases) => {
Expand All @@ -1281,6 +1290,7 @@ function fetchApothecaryReleases(refresh) {
name: r.name || r.tag_name,
prerelease: r.prerelease,
published: r.published_at,
built: releaseBuildDate(r),
assets: r.assets.map((a) => ({
name: a.name,
size: a.size,
Expand Down Expand Up @@ -1370,7 +1380,12 @@ function modularLibsFor(release, ofPath) {
function corePlatformsFor(ofPath) {
const scriptsDir = path.join(ofPath || '', 'scripts');
if (!ofPath || !fs.existsSync(scriptsDir)) return [];
return fs.readdirSync(scriptsDir).filter((dir) => dir !== 'dev' && fs.existsSync(path.join(scriptsDir, dir, 'download_libs.sh')));
const platforms = fs.readdirSync(scriptsDir).filter((dir) => dir !== 'dev' && fs.existsSync(path.join(scriptsDir, dir, 'download_libs.sh')));
// no scripts/tvos wrapper, but dev/download_libs.sh takes -p tvos
if (platforms.includes('ios') && fs.existsSync(path.join(scriptsDir, 'dev', 'download_libs.sh'))) platforms.push('tvos');
// wasm64 libs: same script with BITS=64
if (platforms.includes('emscripten')) platforms.push('emscripten64');
return platforms;
}

const OFLIBS_REPO = 'ofWorks/ofLibs';
Expand All @@ -1388,7 +1403,7 @@ let archiveVersions = null;
function fetchOfLibsReleases(refresh) {
if (ofLibsReleases && !refresh) return Promise.resolve(ofLibsReleases);
return githubJSON(`https://api.github.com/repos/${OFLIBS_REPO}/releases?per_page=30`).then((releases) => {
ofLibsReleases = releases.map((r) => ({ tag: r.tag_name, prerelease: r.prerelease, published: r.published_at }));
ofLibsReleases = releases.map((r) => ({ tag: r.tag_name, prerelease: r.prerelease, published: r.published_at, built: releaseBuildDate(r) }));
return ofLibsReleases;
});
}
Expand Down Expand Up @@ -1429,6 +1444,7 @@ ipcMain.on('getLibReleases', async (event, { ofPath, refresh }) => {
name: r.name,
prerelease: r.prerelease,
published: r.published,
built: r.built,
hasCore: r.assets.some((a) => a.name.startsWith('openFrameworksLibs_')),
modular: modularLibsFor(r, ofPath).map(({ asset, ...lib }) => ({ ...lib, asset: asset.name, size: asset.size, verifiable: !!asset.digest })),
})),
Expand All @@ -1452,7 +1468,7 @@ ipcMain.on('downloadCoreLibs', (event, { ofPath, source, tag, platform }) => {

const script = source === 'oflibs' || source === 'archive'
? path.join(ofPath || '', 'scripts', 'dev', 'lib_sources.sh')
: path.join(ofPath || '', 'scripts', platform || '', 'download_libs.sh');
: path.join(ofPath || '', 'scripts', platform === 'tvos' ? 'dev' : platform === 'emscripten64' ? 'emscripten' : platform || '', 'download_libs.sh');
if (!ofPath || !platform || !tag || !fs.existsSync(script)) {
send(`<br><strong>${t('msg.error')}</strong> ${t('downloads.scriptMissing', { script })}<br>`);
done(false);
Expand All @@ -1465,14 +1481,15 @@ ipcMain.on('downloadCoreLibs', (event, { ofPath, source, tag, platform }) => {
} else if (source === 'archive') {
args = ['-c', 'source "$1" && downloadArchiveRelease "$2" "$3" "$4" "" libs', 'bash', script, ofPath, tag, platform];
} else {
args = [script];
args = platform === 'tvos' ? [script, '-p', 'tvos', '-b'] : [script];
if (tag !== 'latest') args.push('-t', tag);
}
send(`<br><em>${t('downloads.coreStarting', { tag: `${source || 'apothecary'} ${tag}`, platform })}</em><br>`);

let child;
try {
child = spawn('bash', args, { cwd: path.dirname(script), windowsHide: true });
const env = platform === 'emscripten64' ? { ...process.env, BITS: '64' } : process.env;
child = spawn('bash', args, { cwd: path.dirname(script), env, windowsHide: true });
} catch (error) {
send(`<strong>${t('msg.error')}</strong> ${error.message}<br>`);
done(false);
Expand Down
9 changes: 5 additions & 4 deletions frontend/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"field.platform": "Plattform:",
"field.cmdLineVersion": "commandLine PG-Version:",
"field.guiVersion": "GUI-Version:",
"field.language": "Sprache:",
"field.language": "Sprache (Language):",
"msgBox.ofPathWrong.header": "openFrameworks-Pfad ist falsch",
"msgBox.ofPathWrong.body": "Lege den OF-Pfad auf das Stammverzeichnis von openFrameworks fest (den Ordner, der \"addons\", \"libs\" usw. enthält)",
"checkbox.verboseOutput": "Ausführliche Ausgabe",
Expand Down Expand Up @@ -136,8 +136,8 @@
"button.downloadSelected": "Auswahl herunterladen ({{count}})",
"button.refresh": "Aktualisieren",
"downloads.source": "Quelle:",
"downloads.sourceApothecary": "Apothecary (empfohlen)",
"downloads.sourceOfLibs": "ofLibs (experimentell)",
"downloads.sourceApothecary": "Apothecary (GitHub) (empfohlen)",
"downloads.sourceOfLibs": "ofLibs (GitHub) (experimentell)",
"downloads.sourceArchive": "Archiv (libs.danoli3.com)",
"downloads.sourceNote.apothecary": "Vorkompilierte Pakete von openframeworks/apothecary - das Standard-Layout von openFrameworks.",
"downloads.sourceNote.oflibs": "ofWorks/ofLibs-Zips pro Bibliothek, installiert nach libs/<lib>. Auf ofWorks ausgerichtet, manche Bibliotheken brauchen evtl. Pfadanpassungen.",
Expand All @@ -150,5 +150,6 @@
"field.glVersion": "OpenGL-Version (Desktop):",
"option.glDefault": "Standard (OpenGL 2.1)",
"field.postBuild": "Post-Build-Skript:",
"placeholder.postBuild": "Läuft nach dem Kompilieren des Projekts - Xcode Run Script / VS-Postbuildereignis"
"placeholder.postBuild": "Läuft nach dem Kompilieren des Projekts - Xcode Run Script / VS-Postbuildereignis",
"downloads.wasm64Confirm": "WASM64-Bibliotheken ersetzen die installierten lib/emscripten-Bibliotheken (die 32-Bit-Versionen werden entfernt). Fortfahren?"
}
7 changes: 4 additions & 3 deletions frontend/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
"button.downloadSelected": "Download selected ({{count}})",
"button.refresh": "Refresh",
"downloads.source": "Source:",
"downloads.sourceApothecary": "Apothecary (recommended)",
"downloads.sourceOfLibs": "ofLibs (experimental)",
"downloads.sourceApothecary": "Apothecary (GitHub) (Recommended)",
"downloads.sourceOfLibs": "ofLibs (GitHub) (experimental)",
"downloads.sourceArchive": "Archive (libs.danoli3.com)",
"downloads.sourceNote.apothecary": "openframeworks/apothecary prebuilt packages - the standard openFrameworks layout.",
"downloads.sourceNote.oflibs": "ofWorks/ofLibs per-library zips, installed into libs/<lib>. ofWorks-oriented, some libs may need path tweaks.",
Expand All @@ -150,5 +150,6 @@
"field.glVersion": "OpenGL version (desktop):",
"option.glDefault": "Default (OpenGL 2.1)",
"field.postBuild": "Post-build script:",
"placeholder.postBuild": "Runs after the project compiles - Xcode run script / VS post-build event"
"placeholder.postBuild": "Runs after the project compiles - Xcode run script / VS post-build event",
"downloads.wasm64Confirm": "WASM64 libraries replace the installed lib/emscripten libraries (the 32-bit ones are removed). Continue?"
}
9 changes: 5 additions & 4 deletions frontend/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"field.platform": "Plataforma:",
"field.cmdLineVersion": "Versión de PG (commandLine):",
"field.guiVersion": "Versión de la interfaz:",
"field.language": "Idioma:",
"field.language": "Idioma (Language):",
"msgBox.ofPathWrong.header": "La ruta de openFrameworks es incorrecta",
"msgBox.ofPathWrong.body": "Configura la ruta de OF en la raíz de openFrameworks (es decir, la carpeta que contiene \"addons\", \"libs\", etc.)",
"checkbox.verboseOutput": "Salida detallada",
Expand Down Expand Up @@ -136,8 +136,8 @@
"button.downloadSelected": "Descargar seleccionadas ({{count}})",
"button.refresh": "Actualizar",
"downloads.source": "Origen:",
"downloads.sourceApothecary": "Apothecary (recomendado)",
"downloads.sourceOfLibs": "ofLibs (experimental)",
"downloads.sourceApothecary": "Apothecary (GitHub) (recomendado)",
"downloads.sourceOfLibs": "ofLibs (GitHub) (experimental)",
"downloads.sourceArchive": "Archivo (libs.danoli3.com)",
"downloads.sourceNote.apothecary": "Paquetes precompilados de openframeworks/apothecary - la estructura estándar de openFrameworks.",
"downloads.sourceNote.oflibs": "Zips por biblioteca de ofWorks/ofLibs, instalados en libs/<lib>. Orientado a ofWorks, algunas bibliotecas pueden necesitar ajustes de rutas.",
Expand All @@ -150,5 +150,6 @@
"field.glVersion": "Versión de OpenGL (escritorio):",
"option.glDefault": "Predeterminado (OpenGL 2.1)",
"field.postBuild": "Script posterior a la compilación:",
"placeholder.postBuild": "Se ejecuta después de compilar el proyecto - run script de Xcode / evento posterior a la compilación de VS"
"placeholder.postBuild": "Se ejecuta después de compilar el proyecto - run script de Xcode / evento posterior a la compilación de VS",
"downloads.wasm64Confirm": "Las bibliotecas WASM64 reemplazan las bibliotecas lib/emscripten instaladas (se eliminan las de 32 bits). ¿Continuar?"
}
9 changes: 5 additions & 4 deletions frontend/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"field.platform": "Plateforme :",
"field.cmdLineVersion": "Version PG (commandLine) :",
"field.guiVersion": "Version de l'interface :",
"field.language": "Langue :",
"field.language": "Langue (Language) :",
"msgBox.ofPathWrong.header": "Le chemin openFrameworks est incorrect",
"msgBox.ofPathWrong.body": "Définissez le chemin OF vers la racine d'openFrameworks (le dossier contenant \"addons\", \"libs\", etc.)",
"checkbox.verboseOutput": "Sortie détaillée",
Expand Down Expand Up @@ -136,8 +136,8 @@
"button.downloadSelected": "Télécharger la sélection ({{count}})",
"button.refresh": "Actualiser",
"downloads.source": "Source :",
"downloads.sourceApothecary": "Apothecary (recommandé)",
"downloads.sourceOfLibs": "ofLibs (expérimental)",
"downloads.sourceApothecary": "Apothecary (GitHub) (recommandé)",
"downloads.sourceOfLibs": "ofLibs (GitHub) (expérimental)",
"downloads.sourceArchive": "Archive (libs.danoli3.com)",
"downloads.sourceNote.apothecary": "Paquets précompilés openframeworks/apothecary - la structure standard d'openFrameworks.",
"downloads.sourceNote.oflibs": "Zips par bibliothèque d'ofWorks/ofLibs, installés dans libs/<lib>. Orienté ofWorks, certaines bibliothèques peuvent nécessiter des ajustements de chemins.",
Expand All @@ -150,5 +150,6 @@
"field.glVersion": "Version OpenGL (bureau) :",
"option.glDefault": "Par défaut (OpenGL 2.1)",
"field.postBuild": "Script post-compilation :",
"placeholder.postBuild": "S'exécute après la compilation du projet - run script Xcode / événement post-build VS"
"placeholder.postBuild": "S'exécute après la compilation du projet - run script Xcode / événement post-build VS",
"downloads.wasm64Confirm": "Les bibliothèques WASM64 remplacent les bibliothèques lib/emscripten installées (les versions 32 bits sont supprimées). Continuer ?"
}
9 changes: 5 additions & 4 deletions frontend/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"field.platform": "プラットフォーム:",
"field.cmdLineVersion": "commandLine PGバージョン:",
"field.guiVersion": "GUIバージョン:",
"field.language": "言語:",
"field.language": "言語 (Language):",
"msgBox.ofPathWrong.header": "openFrameworksのパスが正しくありません",
"msgBox.ofPathWrong.body": "OFパスをopenFrameworksのルート(\"addons\"や\"libs\"などが入っているフォルダ)に設定してください",
"checkbox.verboseOutput": "詳細な出力",
Expand Down Expand Up @@ -136,8 +136,8 @@
"button.downloadSelected": "選択項目をダウンロード ({{count}})",
"button.refresh": "更新",
"downloads.source": "ソース:",
"downloads.sourceApothecary": "Apothecary (推奨)",
"downloads.sourceOfLibs": "ofLibs (実験的)",
"downloads.sourceApothecary": "Apothecary (GitHub) (推奨)",
"downloads.sourceOfLibs": "ofLibs (GitHub) (実験的)",
"downloads.sourceArchive": "アーカイブ (libs.danoli3.com)",
"downloads.sourceNote.apothecary": "openframeworks/apothecary のビルド済みパッケージ - 標準の openFrameworks 構成です。",
"downloads.sourceNote.oflibs": "ofWorks/ofLibs のライブラリ単位の zip を libs/<lib> にインストールします。ofWorks 向けのため、一部のライブラリはパス調整が必要な場合があります。",
Expand All @@ -150,5 +150,6 @@
"field.glVersion": "OpenGL バージョン (デスクトップ):",
"option.glDefault": "デフォルト (OpenGL 2.1)",
"field.postBuild": "ビルド後スクリプト:",
"placeholder.postBuild": "プロジェクトのコンパイル後に実行 - Xcode の Run Script / VS のビルド後イベント"
"placeholder.postBuild": "プロジェクトのコンパイル後に実行 - Xcode の Run Script / VS のビルド後イベント",
"downloads.wasm64Confirm": "WASM64 ライブラリはインストール済みの lib/emscripten ライブラリを置き換えます (32 ビット版は削除されます)。続行しますか?"
}
9 changes: 5 additions & 4 deletions frontend/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"field.platform": "플랫폼:",
"field.cmdLineVersion": "commandLine PG 버전:",
"field.guiVersion": "GUI 버전:",
"field.language": "언어:",
"field.language": "언어 (Language):",
"msgBox.ofPathWrong.header": "openFrameworks 경로가 잘못되었습니다",
"msgBox.ofPathWrong.body": "OF 경로를 openFrameworks의 루트(\"addons\", \"libs\" 등이 있는 폴더)로 설정하세요",
"checkbox.verboseOutput": "상세 출력",
Expand Down Expand Up @@ -136,8 +136,8 @@
"button.downloadSelected": "선택 항목 다운로드 ({{count}})",
"button.refresh": "새로 고침",
"downloads.source": "소스:",
"downloads.sourceApothecary": "Apothecary (권장)",
"downloads.sourceOfLibs": "ofLibs (실험적)",
"downloads.sourceApothecary": "Apothecary (GitHub) (권장)",
"downloads.sourceOfLibs": "ofLibs (GitHub) (실험적)",
"downloads.sourceArchive": "아카이브 (libs.danoli3.com)",
"downloads.sourceNote.apothecary": "openframeworks/apothecary 미리 빌드된 패키지 - 표준 openFrameworks 구조입니다.",
"downloads.sourceNote.oflibs": "ofWorks/ofLibs 라이브러리별 zip을 libs/<lib>에 설치합니다. ofWorks 중심이라 일부 라이브러리는 경로 조정이 필요할 수 있습니다.",
Expand All @@ -150,5 +150,6 @@
"field.glVersion": "OpenGL 버전 (데스크톱):",
"option.glDefault": "기본값 (OpenGL 2.1)",
"field.postBuild": "빌드 후 스크립트:",
"placeholder.postBuild": "프로젝트 컴파일 후 실행 - Xcode Run Script / VS 빌드 후 이벤트"
"placeholder.postBuild": "프로젝트 컴파일 후 실행 - Xcode Run Script / VS 빌드 후 이벤트",
"downloads.wasm64Confirm": "WASM64 라이브러리가 설치된 lib/emscripten 라이브러리를 대체합니다 (32비트 라이브러리는 삭제됩니다). 계속하시겠습니까?"
}
9 changes: 5 additions & 4 deletions frontend/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"field.platform": "Plataforma:",
"field.cmdLineVersion": "Versão do PG (commandLine):",
"field.guiVersion": "Versão da interface:",
"field.language": "Idioma:",
"field.language": "Idioma (Language):",
"msgBox.ofPathWrong.header": "O caminho do openFrameworks está incorreto",
"msgBox.ofPathWrong.body": "Defina o caminho do OF para a raiz do openFrameworks (a pasta que contém \"addons\", \"libs\", etc.)",
"checkbox.verboseOutput": "Saída detalhada",
Expand Down Expand Up @@ -136,8 +136,8 @@
"button.downloadSelected": "Baixar selecionadas ({{count}})",
"button.refresh": "Atualizar",
"downloads.source": "Origem:",
"downloads.sourceApothecary": "Apothecary (recomendado)",
"downloads.sourceOfLibs": "ofLibs (experimental)",
"downloads.sourceApothecary": "Apothecary (GitHub) (recomendado)",
"downloads.sourceOfLibs": "ofLibs (GitHub) (experimental)",
"downloads.sourceArchive": "Arquivo (libs.danoli3.com)",
"downloads.sourceNote.apothecary": "Pacotes pré-compilados do openframeworks/apothecary - a estrutura padrão do openFrameworks.",
"downloads.sourceNote.oflibs": "Zips por biblioteca do ofWorks/ofLibs, instalados em libs/<lib>. Voltado ao ofWorks, algumas bibliotecas podem precisar de ajustes de caminho.",
Expand All @@ -150,5 +150,6 @@
"field.glVersion": "Versão do OpenGL (desktop):",
"option.glDefault": "Padrão (OpenGL 2.1)",
"field.postBuild": "Script pós-compilação:",
"placeholder.postBuild": "Executa após compilar o projeto - run script do Xcode / evento pós-build do VS"
"placeholder.postBuild": "Executa após compilar o projeto - run script do Xcode / evento pós-build do VS",
"downloads.wasm64Confirm": "As bibliotecas WASM64 substituem as bibliotecas lib/emscripten instaladas (as de 32 bits são removidas). Continuar?"
}
Loading
Loading