From 2b4c06f5ff0afb537409c1e7d23b04c99ce519af Mon Sep 17 00:00:00 2001 From: Darloli <96697399+SorYoshino@users.noreply.github.com> Date: Sat, 28 Mar 2026 17:27:25 +0800 Subject: [PATCH 1/2] freecad: Update to version 1.1.0, fix checkver & autoupdate --- bucket/freecad.json | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/bucket/freecad.json b/bucket/freecad.json index d5373f0239f10e..869aa82a30a452 100644 --- a/bucket/freecad.json +++ b/bucket/freecad.json @@ -1,15 +1,29 @@ { - "version": "1.0.2", + "version": "1.1.0", "description": "A free and open-source multi-platform parametric 3D modeler.", "homepage": "https://www.freecad.org", - "license": "LGPL-2.0-or-later", + "license": { + "identifier": "LGPL-2.1-or-later", + "url": "https://github.com/FreeCAD/FreeCAD/blob/HEAD/LICENSE" + }, "architecture": { "64bit": { - "url": "https://github.com/FreeCAD/FreeCAD/releases/download/1.0.2/FreeCAD_1.0.2-conda-Windows-x86_64-py311.7z", - "hash": "e89afe0433063c7f2484326b8b9a64e3027dc29d145ddb438a44046c960827a6" + "url": "https://github.com/FreeCAD/FreeCAD/releases/download/1.1.0/FreeCAD_1.1.0-Windows-x86_64-py311.7z", + "hash": "040a6971614e7ad0455b4080b13144f9c6b2e154904d9fd443fd8dd357927cab" } }, - "pre_install": "pushd $dir ; mv */* . ; rm FreeCAD_* ; popd", + "pre_install": [ + "$current_depth = 0", + "while ($current_depth -lt 5) {", + " $items = Get-ChildItem -Path $dir | Select-Object -First 3", + " if ($items.Count -eq 1 -and $items.PSIsContainer) {", + " $inner_dir = $items | ForEach-Object -MemberName FullName", + " Move-Item -Path \"$inner_dir\\*\" -Destination $dir -Force", + " Remove-Item -Path $inner_dir -Recurse -Force -ErrorAction SilentlyContinue", + " $current_depth++", + " } else { break }", + "}" + ], "bin": "bin\\FreeCADCmd.exe", "shortcuts": [ [ @@ -19,17 +33,18 @@ ], "checkver": { "url": "https://api.github.com/repos/FreeCAD/FreeCAD/releases/latest", - "regex": "FreeCAD_([\\d.]+)-conda-Windows-x86_64-(?[\\w.-]+)\\.7z" + "jsonpath": "$.assets[?(@.name =~ /Win.+\\.7z$/i)].browser_download_url", + "regex": "(?i)download/(?[^/]+)/(?FreeCAD[^\\d]([0-9a-f.-]+)(?:-conda)?-Win.+)" }, "autoupdate": { "architecture": { "64bit": { - "url": "https://github.com/FreeCAD/FreeCAD/releases/download/$matchHead/FreeCAD_$version-conda-Windows-x86_64-$matchSuffix.7z" + "url": "https://github.com/FreeCAD/FreeCAD/releases/download/$matchTag/$matchName" } }, "hash": { "url": "$url-SHA256.txt", - "regex": "(?sm)$basename.*?$sha256" + "regex": "(?s)$basename.*?$sha256" } } } From 6a0638cb431d2af0e3602895cb322dbdd44337b3 Mon Sep 17 00:00:00 2001 From: z-Fng <54583083+z-Fng@users.noreply.github.com> Date: Sun, 29 Mar 2026 12:38:05 +0000 Subject: [PATCH 2/2] Revert changes in the pre_install script --- bucket/freecad.json | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/bucket/freecad.json b/bucket/freecad.json index 869aa82a30a452..eb34a2939e24f7 100644 --- a/bucket/freecad.json +++ b/bucket/freecad.json @@ -12,18 +12,7 @@ "hash": "040a6971614e7ad0455b4080b13144f9c6b2e154904d9fd443fd8dd357927cab" } }, - "pre_install": [ - "$current_depth = 0", - "while ($current_depth -lt 5) {", - " $items = Get-ChildItem -Path $dir | Select-Object -First 3", - " if ($items.Count -eq 1 -and $items.PSIsContainer) {", - " $inner_dir = $items | ForEach-Object -MemberName FullName", - " Move-Item -Path \"$inner_dir\\*\" -Destination $dir -Force", - " Remove-Item -Path $inner_dir -Recurse -Force -ErrorAction SilentlyContinue", - " $current_depth++", - " } else { break }", - "}" - ], + "pre_install": "pushd $dir ; mv */* . ; rm FreeCAD_* ; popd", "bin": "bin\\FreeCADCmd.exe", "shortcuts": [ [