Skip to content

Commit 3cc75a7

Browse files
Add debug
1 parent 2b9f082 commit 3cc75a7

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

src/config.js

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,38 @@ function createConfig(isDev = false, buildConfig = {}) {
3030
const params = new URLSearchParams();
3131

3232
// Add OS information
33+
console.log('[CONFIG] Adding OS parameter:', process.platform);
3334
params.append('os', process.platform);
35+
36+
// Add architecture information (ensure it's not undefined)
37+
const arch = process.arch || 'unknown';
38+
console.log('[CONFIG] Adding ARCH parameter:', arch);
39+
params.append('arch', arch);
40+
3441
// Add packaging method from build configuration (Windows only)
42+
console.log('[CONFIG] Platform check:', process.platform);
43+
console.log('[CONFIG] Build config:', JSON.stringify(this.build, null, 2));
44+
3545
if (process.platform === 'win32' && this.build && this.build.packagingMethod) {
46+
console.log('[CONFIG] Adding METHOD parameter:', this.build.packagingMethod);
3647
params.append('method', this.build.packagingMethod);
48+
} else {
49+
console.log('[CONFIG] METHOD parameter NOT added. Reasons:');
50+
console.log(' - Platform is Windows:', process.platform === 'win32');
51+
console.log(' - Build config exists:', !!this.build);
52+
console.log(' - Packaging method exists:', !!(this.build && this.build.packagingMethod));
3753
}
38-
39-
// Add architecture information (ensure it's not undefined)
40-
const arch = process.arch || 'unknown';
41-
params.append('arch', arch);
4254

43-
return `${baseUrl}?${params.toString()}`;
55+
// Log all parameters before creating URL
56+
console.log('[CONFIG] All URL parameters:');
57+
for (const [key, value] of params) {
58+
console.log(` ${key} = ${value}`);
59+
}
60+
61+
const finalUrl = `${baseUrl}?${params.toString()}`;
62+
console.log('[CONFIG] Final generated URL:', finalUrl);
63+
64+
return finalUrl;
4465
}
4566

4667
return baseUrl;

src/main/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ const { createConfig } = require("../config");
99
let buildConfig = {};
1010
try {
1111
buildConfig = require("./build-config");
12+
console.log('[MAIN] Successfully loaded build config:', JSON.stringify(buildConfig, null, 2));
1213
} catch (error) {
1314
// build-config.js doesn't exist, use empty config (development mode)
1415
buildConfig = {};
16+
console.log('[MAIN] Build config file not found, using empty config (development mode)');
1517
}
1618

1719
// Helper function to create proper file URLs
@@ -31,6 +33,7 @@ const isDev = !app.isPackaged;
3133

3234
// Create configuration with proper isDev detection and build config
3335
const config = createConfig(isDev, buildConfig);
36+
console.log('[MAIN] Created config with isDev:', isDev, 'buildConfig:', JSON.stringify(buildConfig, null, 2));
3437

3538
let rendererPath, preloadPath;
3639
if(isDev) {

0 commit comments

Comments
 (0)