mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
win: remove outdated msys2 scripts
They were very outdated and if we'll need msys2 support, we'll be able to introduce it later in our Python scripts.
This commit is contained in:
@@ -77,6 +77,5 @@ The IfcOpenShell C++ codebase is split into multiple interal libraries:
|
|||||||
[IFC4x3 Add2]: https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/ "IFC4x3 Add2"
|
[IFC4x3 Add2]: https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/ "IFC4x3 Add2"
|
||||||
[Visual Studio]: https://www.visualstudio.com/ "Visual Studio"
|
[Visual Studio]: https://www.visualstudio.com/ "Visual Studio"
|
||||||
[Visual C++ Build Tools]: http://landinghub.visualstudio.com/visual-cpp-build-tools "Visual C++ Build Tools"
|
[Visual C++ Build Tools]: http://landinghub.visualstudio.com/visual-cpp-build-tools "Visual C++ Build Tools"
|
||||||
[MSYS2]: https://msys2.github.io/ "MSYS2"
|
|
||||||
[win/readme.md]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/win/readme.md "win/readme.md"
|
[win/readme.md]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/win/readme.md "win/readme.md"
|
||||||
[nix/build-all.py]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/nix/build-all.py "nix/build-all.py"
|
[nix/build-all.py]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/nix/build-all.py "nix/build-all.py"
|
||||||
|
|||||||
@@ -288,7 +288,6 @@ about:
|
|||||||
[IFC4 Add2 TC1]: https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/ "IFC4 Add2 TC1"
|
[IFC4 Add2 TC1]: https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/ "IFC4 Add2 TC1"
|
||||||
[Visual Studio]: https://www.visualstudio.com/ "Visual Studio"
|
[Visual Studio]: https://www.visualstudio.com/ "Visual Studio"
|
||||||
[Visual C++ Build Tools]: http://landinghub.visualstudio.com/visual-cpp-build-tools "Visual C++ Build Tools"
|
[Visual C++ Build Tools]: http://landinghub.visualstudio.com/visual-cpp-build-tools "Visual C++ Build Tools"
|
||||||
[MSYS2]: https://msys2.github.io/ "MSYS2"
|
|
||||||
[win/readme.md]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/win/readme.md "win/readme.md"
|
[win/readme.md]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/win/readme.md "win/readme.md"
|
||||||
[nix/build-all.py]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/nix/build-all.py "nix/build-all.py"
|
[nix/build-all.py]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/nix/build-all.py "nix/build-all.py"
|
||||||
homepage: https://ifcopenshell.org
|
homepage: https://ifcopenshell.org
|
||||||
|
|||||||
@@ -254,38 +254,6 @@ C++ Build Tools <http://landinghub.visualstudio.com/visual-cpp-build-tools>`__).
|
|||||||
Readme
|
Readme
|
||||||
<https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/win/readme.md>`__.
|
<https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/win/readme.md>`__.
|
||||||
|
|
||||||
Compiling on Windows (MSYS2 + MinGW)
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
This is for users of `MSYS2 <https://msys2.github.io/>`__ and `MinGW
|
|
||||||
<https://www.mingw-w64.org/>`__.
|
|
||||||
|
|
||||||
1. Fetch the latest source code, including all submodules.
|
|
||||||
|
|
||||||
.. code-block:: bat
|
|
||||||
|
|
||||||
git clone --recursive https://github.com/IfcOpenShell/IfcOpenshell.git
|
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
The path where the source code is cloned to can contain spaces but non-ASCII
|
|
||||||
characters are very likely to cause problems with the build.
|
|
||||||
|
|
||||||
2. Start the MSYS2 Shell and then:
|
|
||||||
|
|
||||||
.. code-block:: bat
|
|
||||||
|
|
||||||
cd IfcOpenShell/win
|
|
||||||
./build-deps.sh
|
|
||||||
./run-cmake.sh
|
|
||||||
./install-ifcopenshell.sh
|
|
||||||
|
|
||||||
.. seealso::
|
|
||||||
|
|
||||||
For more information on configuring a Windows compilation see the `Windows
|
|
||||||
Readme
|
|
||||||
<https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/win/readme.md>`__.
|
|
||||||
|
|
||||||
Packaged installation
|
Packaged installation
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# #
|
|
||||||
# This file is part of IfcOpenShell. #
|
|
||||||
# #
|
|
||||||
# IfcOpenShell is free software: you can redistribute it and/or modify #
|
|
||||||
# it under the terms of the Lesser GNU General Public License as published by #
|
|
||||||
# the Free Software Foundation, either version 3.0 of the License, or #
|
|
||||||
# (at your option) any later version. #
|
|
||||||
# #
|
|
||||||
# IfcOpenShell is distributed in the hope that it will be useful, #
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
||||||
# Lesser GNU General Public License for more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the Lesser GNU General Public License #
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
||||||
# #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# #
|
|
||||||
# This script installs and builds IfcOpenShell's dependencies using MSYS2 #
|
|
||||||
# #
|
|
||||||
# Note that this script is currently a very bare-bones implementation #
|
|
||||||
# #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Set defaults for missing empty environment variables
|
|
||||||
|
|
||||||
if [ -z "$IFCOS_NUM_BUILD_PROCS" ]; then
|
|
||||||
IFCOS_NUM_BUILD_PROCS=$(expr $(sysctl -n hw.ncpu 2> /dev/null || cat /proc/cpuinfo | grep processor | wc -l) + 1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
BUILD_DIR=build-msys
|
|
||||||
SCRIPT_DIR=`pwd "$0"`
|
|
||||||
|
|
||||||
DEPS_DIR="$SCRIPT_DIR/../deps"
|
|
||||||
[ -d $DEPS_DIR ] || mkdir -p $DEPS_DIR
|
|
||||||
|
|
||||||
INSTALL_DIR="$SCRIPT_DIR/../deps-msys-installed"
|
|
||||||
|
|
||||||
pacman --noconfirm -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-boost make swig
|
|
||||||
|
|
||||||
export PATH=/mingw64/bin/:$PATH
|
|
||||||
|
|
||||||
function git_clone_or_pull {
|
|
||||||
[ -d $2 ] || git clone $1 $2
|
|
||||||
pushd $2
|
|
||||||
git pull
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
function git_clone_and_checkout_revision {
|
|
||||||
[ -d $2 ] || git clone $1 $2
|
|
||||||
pushd $2
|
|
||||||
git checkout $3
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
# Use a fixed revision in order to prevent introducing breaking changes
|
|
||||||
git_clone_and_checkout_revision https://github.com/KhronosGroup/OpenCOLLADA.git "$DEPS_DIR/OpenCOLLADA" \
|
|
||||||
064a60b65c2c31b94f013820856bc84fb1937cc6
|
|
||||||
pushd "$DEPS_DIR/OpenCOLLADA"
|
|
||||||
[ -d $BUILD_DIR ] || mkdir -p $BUILD_DIR
|
|
||||||
pushd $BUILD_DIR
|
|
||||||
cmake .. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR/OpenCOLLADA"
|
|
||||||
make -j$IFCOS_NUM_BUILD_PROCS
|
|
||||||
make install
|
|
||||||
popd
|
|
||||||
|
|
||||||
git_clone_or_pull https://github.com/tpaviot/oce.git "$DEPS_DIR/oce"
|
|
||||||
git_clone_or_pull https://github.com/QbProg/oce-win-bundle.git "$DEPS_DIR/oce/oce-win-bundle"
|
|
||||||
pushd "$DEPS_DIR/oce"
|
|
||||||
[ -d $BUILD_DIR ] || mkdir -p $BUILD_DIR
|
|
||||||
pushd $BUILD_DIR
|
|
||||||
# -DOCE_BUILD_SHARED_LIB=0
|
|
||||||
cmake .. -G "MSYS Makefiles" -DOCE_INSTALL_PREFIX="$INSTALL_DIR/oce" -DOCE_TESTING=0
|
|
||||||
make -j$IFCOS_NUM_BUILD_PROCS
|
|
||||||
make install
|
|
||||||
popd
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo IfcOpenShell dependencies installed and built
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# #
|
|
||||||
# This file is part of IfcOpenShell. #
|
|
||||||
# #
|
|
||||||
# IfcOpenShell is free software: you can redistribute it and/or modify #
|
|
||||||
# it under the terms of the Lesser GNU General Public License as published by #
|
|
||||||
# the Free Software Foundation, either version 3.0 of the License, or #
|
|
||||||
# (at your option) any later version. #
|
|
||||||
# #
|
|
||||||
# IfcOpenShell is distributed in the hope that it will be useful, #
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
||||||
# Lesser GNU General Public License for more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the Lesser GNU General Public License #
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
||||||
# #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
export PATH=/mingw64/bin/:$PATH
|
|
||||||
|
|
||||||
if [ -z "$IFCOS_NUM_BUILD_PROCS" ]; then
|
|
||||||
IFCOS_NUM_BUILD_PROCS=$(expr $(sysctl -n hw.ncpu 2> /dev/null || cat /proc/cpuinfo | grep processor | wc -l) + 1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
pushd ../build-msys
|
|
||||||
/mingw64/bin/mingw32-make.exe -j$IFCOS_NUM_BUILD_PROCS
|
|
||||||
popd
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# #
|
|
||||||
# This file is part of IfcOpenShell. #
|
|
||||||
# #
|
|
||||||
# IfcOpenShell is free software: you can redistribute it and/or modify #
|
|
||||||
# it under the terms of the Lesser GNU General Public License as published by #
|
|
||||||
# the Free Software Foundation, either version 3.0 of the License, or #
|
|
||||||
# (at your option) any later version. #
|
|
||||||
# #
|
|
||||||
# IfcOpenShell is distributed in the hope that it will be useful, #
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
||||||
# Lesser GNU General Public License for more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the Lesser GNU General Public License #
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
||||||
# #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
export PATH=/mingw64/bin/:$PATH
|
|
||||||
|
|
||||||
if [ -z "$IFCOS_NUM_BUILD_PROCS" ]; then
|
|
||||||
IFCOS_NUM_BUILD_PROCS=$(expr $(sysctl -n hw.ncpu 2> /dev/null || cat /proc/cpuinfo | grep processor | wc -l) + 1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
pushd ../build-msys
|
|
||||||
make install -j$IFCOS_NUM_BUILD_PROCS
|
|
||||||
popd
|
|
||||||
+4
-19
@@ -5,19 +5,10 @@ and its dependencies.
|
|||||||
|
|
||||||
As a general guideline, `.cmd` files are non-standalone batch files that need to be run from command prompt or from
|
As a general guideline, `.cmd` files are non-standalone batch files that need to be run from command prompt or from
|
||||||
another batch file, and/or while the Visual Studio ("MSVC") environment variables set, and `.bat` files are standalone batch
|
another batch file, and/or while the Visual Studio ("MSVC") environment variables set, and `.bat` files are standalone batch
|
||||||
files that can also be invoked e.g. by double-clicking in the File Explorer. `.sh` files are for MSYS**2** + MinGW ("MSYS"
|
files that can also be invoked e.g. by double-clicking in the File Explorer.
|
||||||
) compilation.
|
|
||||||
|
|
||||||
Usage Instructions
|
Usage Instructions
|
||||||
------------------
|
------------------
|
||||||
### MSYS
|
|
||||||
|
|
||||||
Building using MSYS is very similar to using the MSVC batch files, but instead the shell scripts
|
|
||||||
are used. Note that the MSYS support is currently a bit experimental. It is advised to check out the contents
|
|
||||||
of the shell scripts before using them. Note that contrary to MSVC, with MSYS all of the dependencies are not
|
|
||||||
built or used as static libraries. Currently Release build is used for all libraries.
|
|
||||||
|
|
||||||
### MSVC
|
|
||||||
Launch the proper Visual Studio command prompt, cd to the 'win' directory inside the IfcOpenShell directory and execute `build-deps.cmd` to fetch, build and install the dependencies. The batch file will print the requirements for a successful execution. The script allows a few user-configurable build options which are listed below.
|
Launch the proper Visual Studio command prompt, cd to the 'win' directory inside the IfcOpenShell directory and execute `build-deps.cmd` to fetch, build and install the dependencies. The batch file will print the requirements for a successful execution. The script allows a few user-configurable build options which are listed below.
|
||||||
|
|
||||||
`build-deps.cmd` expects a CMake generator as `%1` and a build configuration type (`RelWithDebInfo`, `Release`, `MinSizeRel`, or `Debug`, defaults to `RelWithDebInfo`) as `%2`. If the generator is not provided, the generator is deduced from the MSVC environment variables.
|
`build-deps.cmd` expects a CMake generator as `%1` and a build configuration type (`RelWithDebInfo`, `Release`, `MinSizeRel`, or `Debug`, defaults to `RelWithDebInfo`) as `%2`. If the generator is not provided, the generator is deduced from the MSVC environment variables.
|
||||||
@@ -71,8 +62,6 @@ Before building the dependencies, enable the OCCT usage:
|
|||||||
> build-deps.cmd
|
> build-deps.cmd
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that this option is not yet available in the MSYS build scripts.
|
|
||||||
|
|
||||||
Using an already existing Python installation
|
Using an already existing Python installation
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
@@ -97,23 +86,19 @@ Directory Structure
|
|||||||
------------------
|
------------------
|
||||||
```
|
```
|
||||||
..
|
..
|
||||||
+---build-* - Created by run-cmake.bat/sh, specific for a certain compiler and and target architecture
|
+---build-* - Created by run-cmake.bat, specific for a certain compiler and and target architecture
|
||||||
+---deps - Created by build-deps.cmd/sh, common for all compilers
|
+---deps - Created by build-deps.cmd, common for all compilers
|
||||||
+---deps-*-installed - Created by build-deps.cmd/sh, specific for a certain compiler and target architecture
|
+---deps-*-installed - Created by build-deps.cmd, specific for a certain compiler and target architecture
|
||||||
+---installed-* - Created by installing the IFCOS project, specific for a certain compiler and target architecture
|
+---installed-* - Created by installing the IFCOS project, specific for a certain compiler and target architecture
|
||||||
\---win
|
\---win
|
||||||
| build-all.cmd - Runs all of the build scripts for IFCOS and it dependencies in a row without pauses
|
| build-all.cmd - Runs all of the build scripts for IFCOS and it dependencies in a row without pauses
|
||||||
| build-deps.cmd - Fetches and builds all needed dependencies for IFCOS using MSVC
|
| build-deps.cmd - Fetches and builds all needed dependencies for IFCOS using MSVC
|
||||||
| build-deps.sh - Fetches and builds all needed dependencies for IFCOS using MSYS
|
|
||||||
| BuildDepsCache-<ARCH>.txt - Cache file created by build-deps.cmd
|
| BuildDepsCache-<ARCH>.txt - Cache file created by build-deps.cmd
|
||||||
| build-ifcopenshell.bat - Builds IFCOS using MSVC
|
| build-ifcopenshell.bat - Builds IFCOS using MSVC
|
||||||
| build-ifcopenshell.sh - Builds IFCOS using MSYS
|
|
||||||
| build-type-cfg.cmd - Utility file used by the build scripts
|
| build-type-cfg.cmd - Utility file used by the build scripts
|
||||||
| install-ifcopenshell.bat - Installs/deploys IFCOS using MSVC.
|
| install-ifcopenshell.bat - Installs/deploys IFCOS using MSVC.
|
||||||
| install-ifcopenshell.sh - Installs/deploys IFCOS using MSYS.
|
|
||||||
| readme.md - This file
|
| readme.md - This file
|
||||||
| run-cmake.bat - Sets environment variables for the dependencies and runs CMake for IFCOS using MSVC
|
| run-cmake.bat - Sets environment variables for the dependencies and runs CMake for IFCOS using MSVC
|
||||||
| run-cmake.sh - Sets environment variables for the dependencies and runs CMake for IFCOS using MSYS
|
|
||||||
| set-python-to-path.bat - Utility for setting PYTHONHOME (read from BuildDepsCache-<ARCH>.txt) to PATH
|
| set-python-to-path.bat - Utility for setting PYTHONHOME (read from BuildDepsCache-<ARCH>.txt) to PATH
|
||||||
| vs-cfg.cmd - Utility file used by the build scripts
|
| vs-cfg.cmd - Utility file used by the build scripts
|
||||||
\---patches - Contains patches for the dependencies
|
\---patches - Contains patches for the dependencies
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# #
|
|
||||||
# This file is part of IfcOpenShell. #
|
|
||||||
# #
|
|
||||||
# IfcOpenShell is free software: you can redistribute it and/or modify #
|
|
||||||
# it under the terms of the Lesser GNU General Public License as published by #
|
|
||||||
# the Free Software Foundation, either version 3.0 of the License, or #
|
|
||||||
# (at your option) any later version. #
|
|
||||||
# #
|
|
||||||
# IfcOpenShell is distributed in the hope that it will be useful, #
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
||||||
# Lesser GNU General Public License for more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the Lesser GNU General Public License #
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
||||||
# #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
export PATH=/mingw64/bin/:$PATH
|
|
||||||
|
|
||||||
BUILD_DIR=../build-msys
|
|
||||||
[ -d $BUILD_DIR ] || mkdir -p $BUILD_DIR
|
|
||||||
|
|
||||||
CMAKE_INSTALL_PREFIX=../installed-msys
|
|
||||||
|
|
||||||
pushd $BUILD_DIR
|
|
||||||
|
|
||||||
# PYTHON_INCLUDE_DIR=/mingw64/include/python2.7 \
|
|
||||||
# PYTHON_LIBRARY=/mingw64/lib/python2.7/config/libpython2.7.a \
|
|
||||||
OCC_INCLUDE_DIR=`pwd`/../deps-msys-installed/oce/include/oce/ \
|
|
||||||
OCC_LIBRARY_DIR=`pwd`/../deps-msys-installed/oce/Win64/lib/ \
|
|
||||||
OPENCOLLADA_INCLUDE_DIR=`pwd`/../deps-msys-installed/OpenCOLLADA/include/opencollada/ \
|
|
||||||
OPENCOLLADA_LIBRARY_DIR=`pwd`/../deps-msys-installed/OpenCOLLADA/lib/opencollada/ \
|
|
||||||
cmake -G "MSYS Makefiles" ../cmake -DSWIG_DIR=/usr/bin -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX \
|
|
||||||
-DCMAKE_MAKE_PROGRAM=/mingw64/bin/mingw32-make.exe $@
|
|
||||||
|
|
||||||
popd
|
|
||||||
Reference in New Issue
Block a user