2015-10-06 13:57:01 +02:00
|
|
|
# Builds the Windows binary.
|
|
|
|
#
|
|
|
|
# From a fresh 64-bit Windows 10 install, prepare the system as follows:
|
|
|
|
#
|
|
|
|
# 1. Install Git:
|
|
|
|
#
|
|
|
|
# http://git-scm.com/download/win
|
|
|
|
#
|
2018-01-19 02:19:22 +01:00
|
|
|
# 2. Install Python 3.6.4:
|
2015-10-06 13:57:01 +02:00
|
|
|
#
|
|
|
|
# https://www.python.org/downloads/
|
|
|
|
#
|
2018-01-19 02:19:22 +01:00
|
|
|
# 3. Append ";C:\Python36;C:\Python36\Scripts" to the "Path" environment variable:
|
2015-10-06 13:57:01 +02:00
|
|
|
#
|
|
|
|
# https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx?mfr=true
|
|
|
|
#
|
|
|
|
# 4. In Powershell, run the following commands:
|
|
|
|
#
|
2018-01-19 02:19:22 +01:00
|
|
|
# $ pip install 'virtualenv>=15.1.0'
|
2015-10-06 13:57:01 +02:00
|
|
|
# $ Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
|
|
|
|
#
|
|
|
|
# 5. Clone the repository:
|
|
|
|
#
|
|
|
|
# $ git clone https://github.com/docker/compose.git
|
|
|
|
# $ cd compose
|
|
|
|
#
|
|
|
|
# 6. Build the binary:
|
|
|
|
#
|
2016-01-15 22:27:43 +01:00
|
|
|
# .\script\build\windows.ps1
|
2015-10-06 13:57:01 +02:00
|
|
|
|
2015-09-02 02:41:09 +02:00
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
|
|
|
# Remove virtualenv
|
|
|
|
if (Test-Path venv) {
|
|
|
|
Remove-Item -Recurse -Force .\venv
|
|
|
|
}
|
|
|
|
|
|
|
|
# Remove .pyc files
|
|
|
|
Get-ChildItem -Recurse -Include *.pyc | foreach ($_) { Remove-Item $_.FullName }
|
|
|
|
|
|
|
|
# Create virtualenv
|
|
|
|
virtualenv .\venv
|
|
|
|
|
2016-01-21 12:38:01 +01:00
|
|
|
# pip and pyinstaller generate lots of warnings, so we need to ignore them
|
|
|
|
$ErrorActionPreference = "Continue"
|
|
|
|
|
2015-09-02 02:41:09 +02:00
|
|
|
# Install dependencies
|
2018-01-19 02:19:22 +01:00
|
|
|
# Fix for https://github.com/pypa/pip/issues/3964
|
|
|
|
# Remove-Item -Recurse -Force .\venv\Lib\site-packages\pip
|
|
|
|
# .\venv\Scripts\easy_install pip==9.0.1
|
|
|
|
# .\venv\Scripts\pip install --upgrade pip setuptools
|
|
|
|
# End fix
|
|
|
|
.\venv\Scripts\pip install pypiwin32==220
|
2015-10-07 17:10:08 +02:00
|
|
|
.\venv\Scripts\pip install -r requirements.txt
|
|
|
|
.\venv\Scripts\pip install --no-deps .
|
2015-09-22 20:31:55 +02:00
|
|
|
.\venv\Scripts\pip install --allow-external pyinstaller -r requirements-build.txt
|
2015-09-02 02:41:09 +02:00
|
|
|
|
2015-11-12 23:29:58 +01:00
|
|
|
git rev-parse --short HEAD | out-file -encoding ASCII compose\GITSHA
|
|
|
|
|
2015-09-02 02:41:09 +02:00
|
|
|
# Build binary
|
|
|
|
.\venv\Scripts\pyinstaller .\docker-compose.spec
|
2015-09-22 20:31:55 +02:00
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
2015-09-22 22:42:43 +02:00
|
|
|
Move-Item -Force .\dist\docker-compose.exe .\dist\docker-compose-Windows-x86_64.exe
|
2015-09-02 02:41:09 +02:00
|
|
|
.\dist\docker-compose-Windows-x86_64.exe --version
|