4runr-os 2.1.27 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/setup.js +63 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "4runr-os",
3
- "version": "2.1.27",
3
+ "version": "2.1.29",
4
4
  "type": "module",
5
5
  "description": "4Runr AI Agent OS - Interactive terminal for managing AI agents",
6
6
  "main": "dist/index.js",
package/scripts/setup.js CHANGED
@@ -128,20 +128,71 @@ if (isWindows && rustInstalled && rustNeedsGNU) {
128
128
  if (!mingwInstalled) {
129
129
  console.log(' Installing MinGW-w64...');
130
130
 
131
- // Try to install via winget
132
- try {
133
- execSync('winget install --id=mingw-w64.mingw-w64 -e --accept-package-agreements --accept-source-agreements', { stdio: 'inherit' });
134
- console.log('✅ MinGW-w64 installed');
135
- console.log('\n⚠️ IMPORTANT: Please restart your terminal to update PATH');
131
+ // Try multiple installation methods
132
+ let installed = false;
133
+
134
+ // Try winget - MSYS2 is more reliable and includes MinGW
135
+ const wingetPackages = [
136
+ 'msys2.msys2', // MSYS2 (includes MinGW, most reliable)
137
+ 'mingw-w64.mingw-w64', // Direct MinGW package
138
+ 'mingw-w64', // Alternative MinGW package name
139
+ ];
140
+
141
+ for (const pkg of wingetPackages) {
142
+ try {
143
+ console.log(` Trying: winget install ${pkg}...`);
144
+ execSync(`winget install ${pkg} --accept-package-agreements --accept-source-agreements --silent`, {
145
+ stdio: 'pipe',
146
+ timeout: 120000 // 2 minutes for MSYS2
147
+ });
148
+ installed = true;
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
+ }
160
+ break;
161
+ } catch (err) {
162
+ // Try next package
163
+ continue;
164
+ }
165
+ }
166
+
167
+ if (!installed) {
168
+ console.error('\n❌ Failed to install MinGW automatically via winget');
169
+ console.error('\n Please install MinGW-w64 manually using one of these methods:\n');
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');
178
+ console.error(' 1. Download: https://www.msys2.org/');
179
+ console.error(' 2. Install MSYS2');
180
+ console.error(' 3. Open MSYS2 terminal and run: pacman -S mingw-w64-x86_64-toolchain --noconfirm');
181
+ console.error(' 4. Add C:\\msys64\\mingw64\\bin to your PATH');
182
+ console.error(' 5. Restart terminal and run: 4runr-setup\n');
183
+ console.error(' Option 2: WinLibs (Direct Download)');
184
+ console.error(' 1. Download: https://winlibs.com/');
185
+ console.error(' 2. Extract to C:\\mingw64');
186
+ console.error(' 3. Add C:\\mingw64\\bin to your PATH');
187
+ console.error(' 4. Restart terminal and run: 4runr-setup\n');
188
+ console.error(' Option 3: Chocolatey (if installed)');
189
+ console.error(' choco install mingw\n');
190
+ process.exit(1);
191
+ } else {
192
+ console.log('\n✅ MinGW-w64 installed!');
193
+ console.log(' IMPORTANT: Please restart your terminal to update PATH');
136
194
  console.log(' Then run: 4runr-setup\n');
137
195
  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
196
  }
146
197
  }
147
198
  }