forked from iterative/dvc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will allow us to make our installer ~4 times smaller(120MB -> 30MB). This patch also has fix for PATH bug and installs dvc to whatever direstory user specified.
- Loading branch information
Showing
4 changed files
with
29 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
@echo OFF | ||
set Miniconda_dir=C:\DVC | ||
set Miniconda_bin=Miniconda3-latest-Windows-x86_64.exe | ||
set Miniconda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe | ||
set Src_dir=%cd% | ||
|
||
rmdir /Q /S %Miniconda_dir% | ||
del /Q /S %Miniconda_bin% | ||
REM @echo OFF | ||
|
||
rmdir /Q /S dist | ||
rmdir /Q /S WinPython | ||
del /Q /S "dvc-*.exe" | ||
|
||
call powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('%Miniconda_url%','%Miniconda_bin%') | ||
if not exist WinPython-64bit-3.6.1.0Zero.exe (echo Error: Couldn't find WinPython installer. Please go to winpython.github.io, download WinPython-64bit-3.6.1.0Zero.exe and place it in project's root directory && goto:eof) | ||
|
||
if not exist "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" (echo Error: Couldn't find Inno Setup compiler. Please go to jrsoftware.org/isinfo.php and install Inno Setup 5 && goto:eof) | ||
|
||
REM NOTE: This is extremely important, that we use same directory that we will install dvc into. | ||
REM The reason is that dvc.exe will have hardcoded path to python interpreter and thus we need | ||
REM to make sure that it is the same everywhere(C:\DVC). | ||
call .\%Miniconda_bin% /InstallationType=JustMe /RegisterPython=0 /S /D=%Miniconda_dir% | ||
call .\WinPython-64bit-3.6.1.0Zero.exe /S /D=%cd%\WinPython | ||
|
||
copy innosetup\addSymLinkPermissions.ps1 %Miniconda_dir%\ | ||
copy innosetup\addSymLinkPermissions.ps1 WinPython\ | ||
mkdir Winpython\bin | ||
copy innosetup\dvc.bat WinPython\bin | ||
|
||
pushd %Miniconda_dir% | ||
call .\python -m pip install -r %Src_dir%\requirements.txt | ||
popd | ||
cd WinPython | ||
call scripts\python -m pip install -r ..\requirements.txt | ||
cd .. | ||
|
||
call %Miniconda_dir%\python setup.py sdist | ||
call WinPython\scripts\python setup.py sdist | ||
|
||
pushd %Miniconda_dir% | ||
call .\python -m pip install %Src_dir%\dist\dvc-0.8.1.tar.gz | ||
popd | ||
cd WinPython | ||
call scripts\python -m pip install ..\dist\dvc-0.8.2.tar.gz | ||
cd .. | ||
|
||
call "C:\Program Files (x86)\Inno Setup 5\iscc" innosetup\setup.iss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
call "%~dp0..\python-3.6.1.amd64\python" -m dvc %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters