Repository navigation
script/bootstrap on win32 - #963
anaisbetts wants to merge 2 commits into
Conversation
If this script ever becomes complicated, we should port it to Python so it works everywhere (since Python is required for atom-shell anyways). For now, it was so dumb that I just rewrote it in PowerShell
|
I was working on a similar thing, but instead of writing it in powershell script, I tried to write all the scripts in js, see the bash-scripts-to-js branch. Using node.js for the scripts could avoid duplicating code on win32, but it also made the script much uglier. Which way do you think we should take? /cc @kevinsawicki @nathansobo . |
|
I would prefer coffeescript or js but if it makes it ugly and more cumbersome then I am okay staying with something more native. |
|
After more tries of converting scripts to js, I think it's a bad idea, node's asynchronous child_process module just make things inevitably ugly. I now think using powershell scripts on Windows is a much better way. |
|
I wrote this particular one in PowerShell only because it was so small, if we start getting more interesting scripts we could write them in Python (since you need Py on Windows to build Atom Shell anyways) |
|
@zcbenz What if we used grunt or If you've got something that's ugly I'm happy to take a look and see if I can't pretty it up a bit. |
|
@mcolyer The |
|
Can't we just vendor a copy of the minimal dependencies that we need? |
|
@mcolyer Do we have a lot of scripts we need to port? From my search, it's really only C:\atom\atom> ls -r | ?{$_.Name.EndsWith(".sh")} | %{$_.FullName}
C:\atom\atom\atom.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\node-gyp\gyp\tools\emacs\run-unit-tests.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\lib\utils\completion.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\node_modules\node-gyp\gyp\tools\emacs\run-unit-tests.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\node_modules\request\node_modules\node-uuid\benchmark\bench.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\node_modules\rimraf\test\run.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\node_modules\rimraf\test\setup.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\scripts\clean-old.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\scripts\doc-build.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\scripts\install.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\scripts\release.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\npm\scripts\relocate.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\request\node_modules\node-uuid\benchmark\bench.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\rimraf\test\run.sh
C:\atom\atom\node_modules\atom-package-manager\node_modules\rimraf\test\setup.sh
C:\atom\atom\vendor\apm\node_modules\grunt\node_modules\dateformat\test\test_weekofyear.sh
C:\atom\atom\vendor\apm\node_modules\grunt\node_modules\rimraf\test\run.sh
C:\atom\atom\vendor\apm\node_modules\grunt\node_modules\rimraf\test\setup.sh
C:\atom\atom\vendor\apm\node_modules\grunt\test\fixtures\exec.sh
C:\atom\atom\vendor\apm\node_modules\jasmine-focused\node_modules\jasmine-node\specs.sh
C:\atom\atom\vendor\apm\node_modules\jasmine-focused\node_modules\jasmine-node\node_modules\jasmine-reporters\test\envjs.runner.sh
C:\atom\atom\vendor\apm\node_modules\jasmine-focused\node_modules\jasmine-node\node_modules\jasmine-reporters\test\phantomjs.runner.sh
C:\atom\atom\vendor\apm\node_modules\jasmine-focused\node_modules\jasmine-node\node_modules\walkdir\test.sh
C:\atom\atom\vendor\apm\node_modules\jasmine-focused\node_modules\jasmine-node\node_modules\walkdir\test\comparison\install_test_deps.sh
C:\atom\atom\vendor\apm\node_modules\node-gyp\gyp\tools\emacs\run-unit-tests.sh
C:\atom\atom\vendor\apm\node_modules\npm\lib\utils\completion.sh
C:\atom\atom\vendor\apm\node_modules\npm\node_modules\node-gyp\gyp\tools\emacs\run-unit-tests.sh
C:\atom\atom\vendor\apm\node_modules\npm\node_modules\request\node_modules\node-uuid\benchmark\bench.sh
C:\atom\atom\vendor\apm\node_modules\npm\node_modules\rimraf\test\run.sh
C:\atom\atom\vendor\apm\node_modules\npm\node_modules\rimraf\test\setup.sh
C:\atom\atom\vendor\apm\node_modules\npm\scripts\clean-old.sh
C:\atom\atom\vendor\apm\node_modules\npm\scripts\doc-build.sh
C:\atom\atom\vendor\apm\node_modules\npm\scripts\install.sh
C:\atom\atom\vendor\apm\node_modules\npm\scripts\release.sh
C:\atom\atom\vendor\apm\node_modules\npm\scripts\relocate.sh
C:\atom\atom\vendor\apm\node_modules\request\node_modules\node-uuid\benchmark\bench.sh
C:\atom\atom\vendor\apm\node_modules\rimraf\test\run.sh
C:\atom\atom\vendor\apm\node_modules\rimraf\test\setup.sh |
|
I think I'd like to get the bash-scripts-to-js branch merged and just have this |
|
@zcbenz that branch looks pretty complete (and I actually think the scripts you have are pretty readable as they are). Are there more scripts that require converting? In the long run we're planning on moving apm to just being an standard npm and that should remove the parts of the bootstrap around updating the submodule. Which hopefully means that in the future the bootstrap will hopefully just be |
|
Only scripts under |
|
@paulcbetts you cool with closing this out in favor of #1003 ? |
|
@mcolyer 🆒 |
This PR gets script/bootstrap running on Windows. Here's how far we've got so far:
TODO