v1.0.0 — release avec auto-update Gitea
Ajout du systeme de mise a jour automatique : - UpdateManager (main) : verifie les tags Gitea, telecharge et applique les MAJ - UpdateBanner (renderer) : banniere UI avec progression et retry - IPC channels : check-for-updates, apply-update, update-available, update-progress, update-error - Desactivation asar pour permettre le remplacement des sources - version.json comme source de verite pour la version locale Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
const { spawn } = require("child_process");
|
||||
const PathResolver = require("./PathResolver.js");
|
||||
|
||||
const STR_CAMERA_MARKER = "CAMERAS_JSON:";
|
||||
const STR_SCENE_MARKER = "SCENE_JSON:";
|
||||
|
||||
const STR_PYTHON_EXPR = [
|
||||
"import bpy, json, sys;",
|
||||
"s=bpy.context.scene;",
|
||||
"cams=[o.name for o in bpy.data.objects if o.type=='CAMERA'];",
|
||||
"sys.stdout.write('CAMERAS_JSON:' + json.dumps(cams) + '\\n');",
|
||||
"info={'list_cameras':cams,'obj_scene':{'nb_resolution_x':s.render.resolution_x,'nb_resolution_y':s.render.resolution_y,'nb_frame_start':s.frame_start,'nb_frame_end':s.frame_end,'nb_frame_step':s.frame_step}};",
|
||||
"sys.stdout.write('SCENE_JSON:' + json.dumps(info) + '\\n');",
|
||||
"sys.stdout.flush()",
|
||||
].join("");
|
||||
|
||||
@@ -35,14 +37,14 @@ const CameraParser = {
|
||||
return;
|
||||
}
|
||||
|
||||
let list_cameras = CameraParser._parse_camera_output(str_stdout);
|
||||
if (list_cameras === null) {
|
||||
let obj_result = CameraParser._parse_scene_output(str_stdout);
|
||||
if (obj_result === null) {
|
||||
console.error("[CameraParser] Stdout Blender:\n" + str_stdout.substring(str_stdout.length - 2000));
|
||||
reject(new Error("Impossible de parser les cameras. Verifiez que le fichier .blend contient des cameras."));
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(list_cameras);
|
||||
resolve(obj_result);
|
||||
});
|
||||
|
||||
obj_process.on("error", (obj_err) => {
|
||||
@@ -51,12 +53,12 @@ const CameraParser = {
|
||||
});
|
||||
},
|
||||
|
||||
_parse_camera_output: (str_stdout) => {
|
||||
_parse_scene_output: (str_stdout) => {
|
||||
let list_lines = str_stdout.split("\n");
|
||||
for (let str_line of list_lines) {
|
||||
let nb_index = str_line.indexOf(STR_CAMERA_MARKER);
|
||||
let nb_index = str_line.indexOf(STR_SCENE_MARKER);
|
||||
if (nb_index !== -1) {
|
||||
let str_json = str_line.substring(nb_index + STR_CAMERA_MARKER.length).trim();
|
||||
let str_json = str_line.substring(nb_index + STR_SCENE_MARKER.length).trim();
|
||||
try {
|
||||
return JSON.parse(str_json);
|
||||
} catch (obj_err) {
|
||||
|
||||
Reference in New Issue
Block a user