Commit 17e5537c authored by Michael Rudolf's avatar Michael Rudolf
Browse files

build.cmd now correctly determines requirements

parent 7c421a6e
......@@ -2,10 +2,39 @@
:: for windows.
:: Compute requirements.txt
pipreqs --force --no-pin --ignore "./RSTpicking/build/","./RSTpicking/dist/", "./build/","./dist/"
pipreqs --no-pin --force --print RSTpicking >> requirements.txt
pipreqs --no-pin --print FileConversion >> requirements.txt
pipreqs --no-pin --print ManualPicking >> requirements.txt
pipreqs --no-pin --print RSTAnalysis >> requirements.txt
:: Removes duplicates in requirements.txt
setlocal disableDelayedExpansion
set "file=requirements.txt"
set "sorted=%file%.sorted"
set "deduped=%file%.deduped"
::Define a variable containing a linefeed character
set LF=^
::The 2 blank lines above are critical, do not remove
sort "%file%" >"%sorted%"
>"%deduped%" (
set "prev="
for /f usebackq^ eol^=^%LF%%LF%^ delims^= %%A in ("%sorted%") do (
set "ln=%%A"
setlocal enableDelayedExpansion
if /i "!ln!" neq "!prev!" (
(echo %%A)
set "prev=%%A"
) else endlocal
>nul move /y "%deduped%" "%file%"
del "%sorted%"
:: Create executable
python -m pip install pyinstaller
pyinstaller --clean -y --icon "D:\nextcloud\GitRepos\rst-evaluation\RSTpicking\images\rst-evaluation_x256.ico" --add-data "D:\nextcloud\GitRepos\rst-evaluation\RSTpicking\images\rst-evaluation_x256.ico;images" "RSTpicking\"
::python -m pip install pyinstaller
::pyinstaller --clean -y --icon "D:\nextcloud\GitRepos\rst-evaluation\RSTpicking\images\rst-evaluation_x256.ico" --add-data "D:\nextcloud\GitRepos\rst-evaluation\RSTpicking\images\rst-evaluation_x256.ico;images" "RSTpicking\"
:: Create installer (requires InnoSetup on $PATH)
iscc "RST_pick_GUI.iss"
::iscc "RST_pick_GUI.iss"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment