4runr-os 2.1.28 → 2.1.29
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 +24 -6
package/package.json
CHANGED
package/scripts/setup.js
CHANGED
|
@@ -131,10 +131,11 @@ if (isWindows && rustInstalled && rustNeedsGNU) {
|
|
|
131
131
|
// Try multiple installation methods
|
|
132
132
|
let installed = false;
|
|
133
133
|
|
|
134
|
-
// Try winget
|
|
134
|
+
// Try winget - MSYS2 is more reliable and includes MinGW
|
|
135
135
|
const wingetPackages = [
|
|
136
|
-
'
|
|
137
|
-
'mingw-w64',
|
|
136
|
+
'msys2.msys2', // MSYS2 (includes MinGW, most reliable)
|
|
137
|
+
'mingw-w64.mingw-w64', // Direct MinGW package
|
|
138
|
+
'mingw-w64', // Alternative MinGW package name
|
|
138
139
|
];
|
|
139
140
|
|
|
140
141
|
for (const pkg of wingetPackages) {
|
|
@@ -142,10 +143,20 @@ if (isWindows && rustInstalled && rustNeedsGNU) {
|
|
|
142
143
|
console.log(` Trying: winget install ${pkg}...`);
|
|
143
144
|
execSync(`winget install ${pkg} --accept-package-agreements --accept-source-agreements --silent`, {
|
|
144
145
|
stdio: 'pipe',
|
|
145
|
-
timeout:
|
|
146
|
+
timeout: 120000 // 2 minutes for MSYS2
|
|
146
147
|
});
|
|
147
148
|
installed = true;
|
|
148
149
|
console.log(` ✅ Installed via winget: ${pkg}`);
|
|
150
|
+
|
|
151
|
+
// If MSYS2 was installed, need to install MinGW inside it
|
|
152
|
+
if (pkg === 'msys2.msys2') {
|
|
153
|
+
console.log('\n ⚠️ MSYS2 installed. You need to:');
|
|
154
|
+
console.log(' 1. Open MSYS2 terminal (search for "MSYS2 MSYS" in Start menu)');
|
|
155
|
+
console.log(' 2. Run: pacman -S mingw-w64-x86_64-toolchain --noconfirm');
|
|
156
|
+
console.log(' 3. Add C:\\msys64\\mingw64\\bin to your PATH');
|
|
157
|
+
console.log(' 4. Restart terminal and run: 4runr-setup\n');
|
|
158
|
+
process.exit(0);
|
|
159
|
+
}
|
|
149
160
|
break;
|
|
150
161
|
} catch (err) {
|
|
151
162
|
// Try next package
|
|
@@ -156,10 +167,17 @@ if (isWindows && rustInstalled && rustNeedsGNU) {
|
|
|
156
167
|
if (!installed) {
|
|
157
168
|
console.error('\n❌ Failed to install MinGW automatically via winget');
|
|
158
169
|
console.error('\n Please install MinGW-w64 manually using one of these methods:\n');
|
|
159
|
-
console.error(' Option 1: MSYS2
|
|
170
|
+
console.error(' Option 1: MSYS2 via winget (Easiest)');
|
|
171
|
+
console.error(' Run: winget install msys2.msys2');
|
|
172
|
+
console.error(' Then:');
|
|
173
|
+
console.error(' 1. Open MSYS2 terminal (search for "MSYS2 MSYS" in Start menu)');
|
|
174
|
+
console.error(' 2. Run: pacman -S mingw-w64-x86_64-toolchain --noconfirm');
|
|
175
|
+
console.error(' 3. Add C:\\msys64\\mingw64\\bin to your PATH');
|
|
176
|
+
console.error(' 4. Restart terminal and run: 4runr-setup\n');
|
|
177
|
+
console.error(' Option 1b: MSYS2 Manual Download');
|
|
160
178
|
console.error(' 1. Download: https://www.msys2.org/');
|
|
161
179
|
console.error(' 2. Install MSYS2');
|
|
162
|
-
console.error(' 3. Open MSYS2 terminal and run: pacman -S mingw-w64-x86_64-toolchain');
|
|
180
|
+
console.error(' 3. Open MSYS2 terminal and run: pacman -S mingw-w64-x86_64-toolchain --noconfirm');
|
|
163
181
|
console.error(' 4. Add C:\\msys64\\mingw64\\bin to your PATH');
|
|
164
182
|
console.error(' 5. Restart terminal and run: 4runr-setup\n');
|
|
165
183
|
console.error(' Option 2: WinLibs (Direct Download)');
|