-
Notifications
You must be signed in to change notification settings - Fork 154
Windows support #27
Comments
What about Linux? |
Good point, I should create an issue for that. Truthfully it's not as high on the priority list for me (given that Guppy is aimed at beginners, I'm guessing there's a far bigger Windows audience than Linux), but it would still be great to have, and it's probably not that much effort to add support for it. |
@joshwcomeau I tried to run project on a Windows 10 computer to see how much of a change does project need to run in reality. I don't know if these going to help or not but I guess it's a start.
What I achieved so far:
What I have changed:
exec(`cross-env ELECTRON_START_URL=http://localhost:${DEFAULT_PORT} electron .`,
(err, stdout, stderr) => {
// ....
}
);
switch (projectType) {
case 'create-react-app':
return [`cross-env PORT=${port} npm`, 'run', task.name];
case 'gatsby':
return ['npm', 'run', task.name, '--', `-p ${port}`];
default:
throw new Error('Unrecognized project type: ' + projectType);
}
const npx = /^win/.test(os.platform()) ? 'npx.cmd' : 'npx';
switch (projectType) {
case 'create-react-app':
return [npx, 'create-react-app', path];
case 'gatsby':
return [npx, 'gatsby', 'new', path];
default:
throw new Error('Unrecognized project type: ' + projectType);
}
const checkPort = (port = 3000, attemptNum = 0) => {
// windows command from https://stackoverflow.com/a/26030523/2315280
const command = /^win/.test(os.platform()) ? `netstat -aon | find "${port}"` : `lsof -i :${port}`;
childProcess.exec(command, (err, res) => {
// .....
}
resolve(port);
});
}; If these changes make sense please ping me. I'll be happy to submit a PR. I did not test gatsby since I don't have any experience with it but with similar changes I thing it should work too. |
@bennygenel I did the same in a branch here. I've also added For the issue with At the moment, I'm a bit stuck at stopping the development server. When I'm stopping the server the GUI displays: And re-starting is not working properly. I have to reload the view and then I can restart the server.
The killing of the processes seems to work. I'm just not sure why restarting is not working. Also there are many processes running for the dev server. |
@AWolf81 fixed restarting dev server problem. You can check the PR for details. It was related to exit code check on file |
Wow, so glad to see so much progress on adding Windows support! Y'all rock. I'm reviewing @bennygenel's PR now. @AWolf81 it looks like you were both going in a very similar direction, but it'd be awesome if you two could work together to find the optimal solution (rather than have 2 competing PRs, I'd love to see a collaboration on 1). Thanks so much! |
@joshwcomeau Sure, I've quickly reviewed @bennygenel PR and it looks great. I'll try to help him with open issues at Restarting issue |
@AWolf81 and @joshwcomeau Thank You. I'm happy that you liked the progress. I'm going through your reviews and fixing quick ones. |
Delighted that this has been completed, and shipped in 0.2.0 :D |
Guppy currently only works on MacOS. Let's fix that and make it Windows-friendly!
Note: This ticket is blocked by a couple of others that should probably be tackled first. See below:
Some notes:
Guppy does a lot of filesystem stuff, and it's unclear to me how much work is required for Windows compatibility.
All projects are currently created in
{os.homeDir()}/guppy-projects
. Does this still make sense on Windows?This ticket is blocked by Bi-directional communication with processes #25, because we're currently hacking around an issue by using
echo
, which isn't supported on Windows.This ticket is also sorta blocked by Switch to Electron Builder for auto-updates and proper installers #26 - if we're gonna switch to electron-builder, we should do that before spending time/energy on a windows installer solution.
The text was updated successfully, but these errors were encountered: