source: adblock2privoxy/adblock2privoxy/distribution/buildWin.bat @ a2fcf33

Last change on this file since a2fcf33 was a2fcf33, checked in by Alexey Zubritskiy <a.zubritskiy@…>, 4 years ago

Release 1.4.2

  • Property mode set to 100644
File size: 1.4 KB
Line 
1@ECHO OFF
2ECHO   This script compiles adblock2privoxy to windows binary.
3
4ECHO   Make sure you have Haskell Stack installed before running this script.
5ECHO   See http://docs.haskellstack.org/en/stable/install_and_upgrade.html#windows
6ECHO   for installation details.
7
8SET "startpath=%~dp0\.."
9SET "prefix=%~dp0\binary\adblock2privoxy"
10SET "stack=%appdata%\local\bin\stack"
11ECHO Install GHC and Cabal
12CD %USERPROFILE%
13"%stack%" setup
14"%stack%" build cabal-install
15
16ECHO Build package dependencies with stack first
17CD "%startpath%"
18
19"%stack%" build --only-dependencies
20
21FOR /F "tokens=* USEBACKQ" %%F IN (`"%stack%" path --snapshot-pkg-db`) DO (
22SET snapshotdb=%%F
23)
24
25FOR /F "tokens=* USEBACKQ" %%F IN (`"%stack%" path --local-pkg-db`) DO (
26SET localdb=%%F
27)
28
29ECHO snapshots package DB = %snapshotdb%
30ECHO local package DB = %localdb%
31
32MKDIR "%prefix%"
33"%stack%" exec --no-ghc-package-path runhaskell -- Setup.hs configure --user --prefix="%prefix%" --package-db=clear --package-db=global --package-db="%snapshotdb%" --package-db="%localdb%" 
34"%stack%" exec --no-ghc-package-path runhaskell -- Setup.hs build
35"%stack%" exec --no-ghc-package-path runhaskell -- Setup.hs install
36
37cd "%prefix%\doc\*windows*\adblock2privoxy*"
38copy "%startpath%\README.rst" .
39copy "%startpath%\INSTALL.rst" .
40CD "%prefix%"
41
42ECHO Build is done. The result is in current folder
43ECHO You can copy it to the final destination and run the executable from bin folder
Note: See TracBrowser for help on using the repository browser.