Add OfflineSourceFolder parameter for offline installation#92
Add OfflineSourceFolder parameter for offline installation#92rprieto wants to merge 2 commits intoScoopInstaller:masterfrom
Conversation
|
I have a few suggestions that might improve the usability of the offline installation feature:
|
|
Thanks for the suggestions.
I'm happy to make some changes; I will let the maintainers decide which way they want to go to hopefully merge this PR. |
|
Thank you for contributing this code! I downloaded your changes and created a batch file to help me quickly set up my development environment on a new system since I'm not very familiar with PowerShell. Because I'm in a region where downloading files from GitHub is very slow and often fails, the offline installation is essential for me, and I plan to switch to online buckets to get updates when the network conditions are better. I structured my setup as follows: The Here's a summary of my batch file: powershell -Command Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
powershell -NoProfile -File .\data\install.ps1 -OfflineSourceFolder .\data
call .\data\RefreshEnv.cmd
powershell -NoProfile -Command scoop config aria2-warning-enabled false
xcopy /E /Q /H /Y .\data\buckets %USERPROFILE%\scoop\buckets\
set SCOOP_CACHE=.\data\cache
powershell -NoProfile -Command scoop install --no-update-scoop 7zip git aria2 gsudo oraclejdk python ...
set SCOOP_CACHE=
call .\data\RefreshEnv.cmd
gsudo cache on
gsudo regedit /s %USERPROFILE%\scoop\apps\7zip\current\install-context.reg
gsudo regedit /s %USERPROFILE%\scoop\apps\git\current\install-context.reg
...
gsudo cache offWhen the network conditions improve, I can convert the buckets to Git repositories using the following commands to enable updates with git -C %USERPROFILE%\scoop\buckets\main init
git -C %USERPROFILE%\scoop\buckets\main remote add origin https://github.com/ScoopInstaller/Main
git -C %USERPROFILE%\scoop\buckets\main fetch origin master
git -C %USERPROFILE%\scoop\buckets\main checkout -f master
git -C %USERPROFILE%\scoop\buckets\java init
git -C %USERPROFILE%\scoop\buckets\java remote add origin https://github.com/ScoopInstaller/Java
git -C %USERPROFILE%\scoop\buckets\java fetch origin master
git -C %USERPROFILE%\scoop\buckets\java checkout -f master
...Overall, thank you for your work on this! I hope your PR gets reviewed and merged successfully. Since my English is not very strong, I used ChatGPT to help convey my thoughts here. Please feel free to correct me if I've made any mistakes, and I appreciate your guidance! |
This pull-requests implements an offline installation for Scoop.
I documented the usage in the updated README.
https://github.com/ScoopInstaller/Scoop/archive/master.zip as
ScoopInstaller-Scoop.ziphttps://github.com/ScoopInstaller/Main/archive/master.zip as
ScoopInstaller-Main.zipThe files are not deleted, which means they can be re-used for other installations.
This should address ScoopInstaller/Scoop#3505.