arabago96 commited on
Commit
fe3b43d
·
1 Parent(s): 87535f5

Fix: Switch to Node.js for reliable Lib decoding

Browse files
services/processor/Dockerfile CHANGED
@@ -44,9 +44,9 @@ ENV WINEPATH="/app/services/processor/bin"
44
  # Suppress Wine debug messages
45
  ENV WINEDEBUG=-all
46
 
47
- # Decode Libs (Bypass HF Binary Check) - With Debug Verify
48
- RUN base64 -d "./Documentation/SDK_WIN_x64_2026-1-185/binaries/sketchup/x64/SketchUpAPI.lib.b64" > "./Documentation/SDK_WIN_x64_2026-1-185/binaries/sketchup/x64/SketchUpAPI.lib"
49
- RUN base64 -d "./Documentation/SDK_WIN_x64_2026-1-185/binaries/sketchup/x64/sketchup.lib.b64" > "./Documentation/SDK_WIN_x64_2026-1-185/binaries/sketchup/x64/sketchup.lib"
50
  RUN ls -la ./Documentation/SDK_WIN_x64_2026-1-185/binaries/sketchup/x64/
51
 
52
  # Build Script (Inline)
 
44
  # Suppress Wine debug messages
45
  ENV WINEDEBUG=-all
46
 
47
+ # Decode Libs (Bypass HF Binary Check) - Using Node.js for reliability
48
+ # The script is at /app/services/processor/decode_libs.js
49
+ RUN node /app/services/processor/decode_libs.js
50
  RUN ls -la ./Documentation/SDK_WIN_x64_2026-1-185/binaries/sketchup/x64/
51
 
52
  # Build Script (Inline)
services/processor/decode_libs.js ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const libPath = path.join(__dirname, '../../Documentation/SDK_WIN_x64_2026-1-185/binaries/sketchup/x64');
5
+
6
+ const files = [
7
+ 'SketchUpAPI.lib',
8
+ 'sketchup.lib'
9
+ ];
10
+
11
+ files.forEach(file => {
12
+ const b64Path = path.join(libPath, file + '.b64');
13
+ const outPath = path.join(libPath, file);
14
+
15
+ console.log(`Decoding ${b64Path} -> ${outPath}`);
16
+
17
+ try {
18
+ if (!fs.existsSync(b64Path)) {
19
+ console.error(`ERROR: Source file not found: ${b64Path}`);
20
+ process.exit(1);
21
+ }
22
+
23
+ const b64Content = fs.readFileSync(b64Path, 'utf8');
24
+ // Remove newlines just in case
25
+ const cleanB64 = b64Content.replace(/\s/g, '');
26
+ const buffer = Buffer.from(cleanB64, 'base64');
27
+
28
+ fs.writeFileSync(outPath, buffer);
29
+ console.log(`Success! Wrote ${buffer.length} bytes to ${file}`);
30
+ } catch (e) {
31
+ console.error(`ERROR decoding ${file}:`, e);
32
+ process.exit(1);
33
+ }
34
+ });