-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Windows setup script #403
base: master
Are you sure you want to change the base?
Add Windows setup script #403
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have yet to test it, but I did look over the changes and left a few non-blocking suggestions (they should not prevent this PR from getting merged). I'll approve it once I have tested it.
use `throw` instead of writing error and exiting Co-authored-by: Fawn <[email protected]>
Added a whole lot of .ini validation stuff. Works with nearly all but the most extreme edge cases on my machine |
Tested this as well on my Windows partition that was not set up at all to do dev work (with |
I was going to install WAMP but the website creeped me out, so I used Some issues:
(I don't think this is relevant, but I'm running this all through x64 emulation using Prism) ![]() ![]() |
Yeah, looks like you're missing some of the common dependencies that otherwise Composer would use. You also possibly have permission/access restrictions that makes Composer fail reading/writing to directories. I'll see if I can include dependency and access checks in the script |
@tresf I figured out that the permission error on the second screenshot is due to PHP trying to run at its directory instead of |
So... Just |
dev/windows/setup.ps1
Outdated
Invoke-WebRequest -Uri $composerInstallerUrl -OutFile $composerInstallerPath | ||
function Setup-Composer { | ||
# shift to root dir | ||
if ($pwd -match "(\\dev\\windows)") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... Probably best to get the script path and cd up twice rather than rely on string comparisons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So use $PSScriptRoot
instead of $pwd
? We're still trying to detect if the user started the script in the \dev\windows
directory instead of the base dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're still trying to detect if the user started the script in the \dev\windows directory instead of the base dir
Yes however it doesn't matter where they start the script if everything is setup relative to its location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, on it
…ontext-insensitive
This PR (which now uses the correct base branch) adds a Windows-specific setup script located in
dev/windows/setup.ps1
using PowerShell.The script's actions is as follows:
$phpDir
and$fullPhpDir
dev/windows
folder, go to the project root$composerInstallerUrl
and$composerInstallerPath
$fullPhpDir
install
command from composer to install dependencies