mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Release build for Windows.
This commit is contained in:
parent
ccc6106c7c
commit
165f898ba9
@ -1,4 +1,10 @@
|
|||||||
cd "$PSScriptRoot\.."
|
cd "$PSScriptRoot\.."
|
||||||
|
|
||||||
|
if ("$Env:FORCE_RELEASE") {
|
||||||
|
New-Item prerelease.txt -type file
|
||||||
|
Write-Host "Building release version."
|
||||||
|
}
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
$boost_dir=(Resolve-Path $PSScriptRoot\..\deps\boost\lib\cmake\Boost-*)
|
$boost_dir=(Resolve-Path $PSScriptRoot\..\deps\boost\lib\cmake\Boost-*)
|
||||||
|
@ -883,7 +883,7 @@ jobs:
|
|||||||
- run: *gitter_notify_failure
|
- run: *gitter_notify_failure
|
||||||
- run: *gitter_notify_success
|
- run: *gitter_notify_success
|
||||||
|
|
||||||
b_win:
|
b_win: &b_win
|
||||||
executor:
|
executor:
|
||||||
name: win/default
|
name: win/default
|
||||||
shell: powershell.exe
|
shell: powershell.exe
|
||||||
@ -906,6 +906,12 @@ jobs:
|
|||||||
- store_artifacts: *artifact_solc_windows
|
- store_artifacts: *artifact_solc_windows
|
||||||
- persist_to_workspace: *artifacts_build_dir
|
- persist_to_workspace: *artifacts_build_dir
|
||||||
|
|
||||||
|
b_win_release:
|
||||||
|
<<: *b_win
|
||||||
|
environment:
|
||||||
|
FORCE_RELEASE: ON
|
||||||
|
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
@ -959,6 +965,7 @@ workflows:
|
|||||||
|
|
||||||
# Windows build and tests
|
# Windows build and tests
|
||||||
- b_win: *workflow_trigger_on_tags
|
- b_win: *workflow_trigger_on_tags
|
||||||
|
- b_win_release: *workflow_trigger_on_tags
|
||||||
|
|
||||||
nightly:
|
nightly:
|
||||||
|
|
||||||
|
@ -25,7 +25,8 @@
|
|||||||
- [ ] Create a pull request from ``develop`` to ``release``, wait for the tests, then merge it.
|
- [ ] Create a pull request from ``develop`` to ``release``, wait for the tests, then merge it.
|
||||||
- [ ] Make a final check that there are no platform-dependency issues in the ``solidity-test-bytecode`` repository.
|
- [ ] Make a final check that there are no platform-dependency issues in the ``solidity-test-bytecode`` repository.
|
||||||
- [ ] Wait for the tests for the commit on ``release``, create a release in Github, creating the tag (click the `PUBLISH RELEASE` button on the release page.)
|
- [ ] Wait for the tests for the commit on ``release``, create a release in Github, creating the tag (click the `PUBLISH RELEASE` button on the release page.)
|
||||||
- [ ] Wait for the CI runs on the tag itself (travis and appveyor should push artifacts onto the Github release page).
|
- [ ] Wait for the CI runs on the tag itself (travis should push artifacts onto the Github release page).
|
||||||
|
- [ ] Take the ``solc.exe`` binary from the ``b_win_release`` run of the released commit in circle-ci and add it to the release page as ``solc-windows.exe``.
|
||||||
- [ ] Run ``scripts/create_source_tarball.sh`` while being on the tag to create the source tarball. Make sure to create ``prerelease.txt`` before: (``echo -n > prerelease.txt``). This will create the tarball in a directory called ``upload``.
|
- [ ] Run ``scripts/create_source_tarball.sh`` while being on the tag to create the source tarball. Make sure to create ``prerelease.txt`` before: (``echo -n > prerelease.txt``). This will create the tarball in a directory called ``upload``.
|
||||||
- [ ] Take the tarball from the upload directory (its name should be ``solidity_x.x.x.tar.gz``, otherwise ``prerelease.txt`` was missing in the step before) and upload the source tarball to the release page.
|
- [ ] Take the tarball from the upload directory (its name should be ``solidity_x.x.x.tar.gz``, otherwise ``prerelease.txt`` was missing in the step before) and upload the source tarball to the release page.
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ The following C++ compilers and their minimum versions can build the Solidity co
|
|||||||
|
|
||||||
- `GCC <https://gcc.gnu.org>`_, version 5+
|
- `GCC <https://gcc.gnu.org>`_, version 5+
|
||||||
- `Clang <https://clang.llvm.org/>`_, version 3.4+
|
- `Clang <https://clang.llvm.org/>`_, version 3.4+
|
||||||
- `MSVC <https://docs.microsoft.com/en-us/cpp/?view=vs-2019>`_, version 2017+
|
- `MSVC <https://visualstudio.microsoft.com/vs/>`_, version 2019+
|
||||||
|
|
||||||
Prerequisites - macOS
|
Prerequisites - macOS
|
||||||
---------------------
|
---------------------
|
||||||
@ -262,29 +262,29 @@ You need to install the following dependencies for Windows builds of Solidity:
|
|||||||
+-----------------------------------+-------------------------------------------------------+
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
| Software | Notes |
|
| Software | Notes |
|
||||||
+===================================+=======================================================+
|
+===================================+=======================================================+
|
||||||
| `Visual Studio 2017 Build Tools`_ | C++ compiler |
|
| `Visual Studio 2019 Build Tools`_ | C++ compiler |
|
||||||
+-----------------------------------+-------------------------------------------------------+
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
| `Visual Studio 2017`_ (Optional) | C++ compiler and dev environment. |
|
| `Visual Studio 2019`_ (Optional) | C++ compiler and dev environment. |
|
||||||
+-----------------------------------+-------------------------------------------------------+
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
|
|
||||||
If you already have one IDE and only need the compiler and libraries,
|
If you already have one IDE and only need the compiler and libraries,
|
||||||
you could install Visual Studio 2017 Build Tools.
|
you could install Visual Studio 2019 Build Tools.
|
||||||
|
|
||||||
Visual Studio 2017 provides both IDE and necessary compiler and libraries.
|
Visual Studio 2019 provides both IDE and necessary compiler and libraries.
|
||||||
So if you have not got an IDE and prefer to develop solidity, Visual Studio 2017
|
So if you have not got an IDE and prefer to develop solidity, Visual Studio 2019
|
||||||
may be a choice for you to get everything setup easily.
|
may be a choice for you to get everything setup easily.
|
||||||
|
|
||||||
Here is the list of components that should be installed
|
Here is the list of components that should be installed
|
||||||
in Visual Studio 2017 Build Tools or Visual Studio 2017:
|
in Visual Studio 2019 Build Tools or Visual Studio 2019:
|
||||||
|
|
||||||
* Visual Studio C++ core features
|
* Visual Studio C++ core features
|
||||||
* VC++ 2017 v141 toolset (x86,x64)
|
* VC++ 2019 v141 toolset (x86,x64)
|
||||||
* Windows Universal CRT SDK
|
* Windows Universal CRT SDK
|
||||||
* Windows 8.1 SDK
|
* Windows 8.1 SDK
|
||||||
* C++/CLI support
|
* C++/CLI support
|
||||||
|
|
||||||
.. _Visual Studio 2017: https://www.visualstudio.com/vs/
|
.. _Visual Studio 2019: https://www.visualstudio.com/vs/
|
||||||
.. _Visual Studio 2017 Build Tools: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017
|
.. _Visual Studio 2019 Build Tools: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2019
|
||||||
|
|
||||||
Dependencies Helper Script
|
Dependencies Helper Script
|
||||||
--------------------------
|
--------------------------
|
||||||
@ -300,7 +300,10 @@ Or, on Windows:
|
|||||||
|
|
||||||
.. code-block:: bat
|
.. code-block:: bat
|
||||||
|
|
||||||
scripts\install_deps.bat
|
scripts\install_deps.ps1
|
||||||
|
|
||||||
|
Note that the latter command will install ``boost`` and ``cmake`` to the ``deps`` subdirectory, while the former command
|
||||||
|
will attempt to install the dependencies globally.
|
||||||
|
|
||||||
Clone the Repository
|
Clone the Repository
|
||||||
--------------------
|
--------------------
|
||||||
@ -362,11 +365,14 @@ And for Windows:
|
|||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -G "Visual Studio 15 2017 Win64" ..
|
cmake -G "Visual Studio 16 2019 Win64" ..
|
||||||
|
|
||||||
This latter set of instructions should result in the creation of
|
In case you want to use the version of boost installed by ``./scripts/install_deps.ps1``, you will
|
||||||
**solidity.sln** in that build directory. Double-clicking on that file
|
additionally need to pass ``-DBoost_DIR="..\deps\boost\lib\cmake\Boost-*"`` and ``-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded``
|
||||||
should result in Visual Studio firing up. We suggest building
|
as arguments to the call to ``cmake``.
|
||||||
|
|
||||||
|
This should result in the creation of **solidity.sln** in that build directory.
|
||||||
|
Double-clicking on that file should result in Visual Studio firing up. We suggest building
|
||||||
**Release** configuration, but all others work.
|
**Release** configuration, but all others work.
|
||||||
|
|
||||||
Alternatively, you can build for Windows on the command-line, like so:
|
Alternatively, you can build for Windows on the command-line, like so:
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
REM ---------------------------------------------------------------------------
|
|
||||||
REM Batch file for implementing release flow for solidity for Windows.
|
|
||||||
REM
|
|
||||||
REM The documentation for solidity is hosted at:
|
|
||||||
REM
|
|
||||||
REM https://solidity.readthedocs.org
|
|
||||||
REM
|
|
||||||
REM ---------------------------------------------------------------------------
|
|
||||||
REM This file is part of solidity.
|
|
||||||
REM
|
|
||||||
REM solidity is free software: you can redistribute it and/or modify
|
|
||||||
REM it under the terms of the GNU General Public License as published by
|
|
||||||
REM the Free Software Foundation, either version 3 of the License, or
|
|
||||||
REM (at your option) any later version.
|
|
||||||
REM
|
|
||||||
REM solidity is distributed in the hope that it will be useful,
|
|
||||||
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
REM GNU General Public License for more details.
|
|
||||||
REM
|
|
||||||
REM You should have received a copy of the GNU General Public License
|
|
||||||
REM along with solidity. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
REM
|
|
||||||
REM Copyright (c) 2016 solidity contributors.
|
|
||||||
REM ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
set CONFIGURATION=%1
|
|
||||||
set VERSION=%2
|
|
||||||
|
|
||||||
set "DLLS=MSVC_DLLS_NOT_FOUND"
|
|
||||||
FOR /d %%d IN ("C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\*"
|
|
||||||
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\*") DO set "DLLS=%%d\x86\Microsoft.VC141.CRT\msvc*.dll"
|
|
||||||
|
|
||||||
7z a solidity-windows.zip ^
|
|
||||||
.\build\solc\%CONFIGURATION%\solc.exe .\build\test\%CONFIGURATION%\soltest.exe ^
|
|
||||||
"%DLLS%"
|
|
Loading…
Reference in New Issue
Block a user