4runr-os 2.1.27 → 2.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/setup.js +45 -12
package/package.json
CHANGED
package/scripts/setup.js
CHANGED
|
@@ -128,20 +128,53 @@ if (isWindows && rustInstalled && rustNeedsGNU) {
|
|
|
128
128
|
if (!mingwInstalled) {
|
|
129
129
|
console.log(' Installing MinGW-w64...');
|
|
130
130
|
|
|
131
|
-
// Try
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
// Try multiple installation methods
|
|
132
|
+
let installed = false;
|
|
133
|
+
|
|
134
|
+
// Try winget with different package IDs
|
|
135
|
+
const wingetPackages = [
|
|
136
|
+
'mingw-w64.mingw-w64',
|
|
137
|
+
'mingw-w64',
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
for (const pkg of wingetPackages) {
|
|
141
|
+
try {
|
|
142
|
+
console.log(` Trying: winget install ${pkg}...`);
|
|
143
|
+
execSync(`winget install ${pkg} --accept-package-agreements --accept-source-agreements --silent`, {
|
|
144
|
+
stdio: 'pipe',
|
|
145
|
+
timeout: 60000
|
|
146
|
+
});
|
|
147
|
+
installed = true;
|
|
148
|
+
console.log(` ✅ Installed via winget: ${pkg}`);
|
|
149
|
+
break;
|
|
150
|
+
} catch (err) {
|
|
151
|
+
// Try next package
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (!installed) {
|
|
157
|
+
console.error('\n❌ Failed to install MinGW automatically via winget');
|
|
158
|
+
console.error('\n Please install MinGW-w64 manually using one of these methods:\n');
|
|
159
|
+
console.error(' Option 1: MSYS2 (Recommended - Easiest)');
|
|
160
|
+
console.error(' 1. Download: https://www.msys2.org/');
|
|
161
|
+
console.error(' 2. Install MSYS2');
|
|
162
|
+
console.error(' 3. Open MSYS2 terminal and run: pacman -S mingw-w64-x86_64-toolchain');
|
|
163
|
+
console.error(' 4. Add C:\\msys64\\mingw64\\bin to your PATH');
|
|
164
|
+
console.error(' 5. Restart terminal and run: 4runr-setup\n');
|
|
165
|
+
console.error(' Option 2: WinLibs (Direct Download)');
|
|
166
|
+
console.error(' 1. Download: https://winlibs.com/');
|
|
167
|
+
console.error(' 2. Extract to C:\\mingw64');
|
|
168
|
+
console.error(' 3. Add C:\\mingw64\\bin to your PATH');
|
|
169
|
+
console.error(' 4. Restart terminal and run: 4runr-setup\n');
|
|
170
|
+
console.error(' Option 3: Chocolatey (if installed)');
|
|
171
|
+
console.error(' choco install mingw\n');
|
|
172
|
+
process.exit(1);
|
|
173
|
+
} else {
|
|
174
|
+
console.log('\n✅ MinGW-w64 installed!');
|
|
175
|
+
console.log(' IMPORTANT: Please restart your terminal to update PATH');
|
|
136
176
|
console.log(' Then run: 4runr-setup\n');
|
|
137
177
|
process.exit(0);
|
|
138
|
-
} catch {
|
|
139
|
-
console.error('❌ Failed to install MinGW automatically');
|
|
140
|
-
console.error('\n Please install MinGW-w64 manually:');
|
|
141
|
-
console.error(' 1. Run: winget install mingw-w64.mingw-w64');
|
|
142
|
-
console.error(' 2. Restart terminal');
|
|
143
|
-
console.error(' 3. Run: 4runr-setup again\n');
|
|
144
|
-
process.exit(1);
|
|
145
178
|
}
|
|
146
179
|
}
|
|
147
180
|
}
|