diff --git a/README.md b/README.md index 5930c8a271..75783392dc 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,15 @@ Users are advised to build IfcOpenShell using the CMake file provided in the cmake/ folder. The preferred way to fetch and build this project's dependencies is to use the build scripts -in win/ folder. See win/readme.txt for more information. Instructions in a nutshell +in win/ folder. See [win/readme.md] for more information. Instructions in a nutshell (assuming Visual Studio x64 environment variables set): > git clone https://github.com/IfcOpenShell/IfcOpenShell.git > cd oce\win > build-deps.cmd (defaults to using VS 2015 x64 RelWithDebInfo build) > run-cmake.bat (defaults to using VS 2015 x64) > ..\build-vs2015-x64\IfcOpenShell.sln -You can now build the solution using the RelWithDebInfo configuration -You can also build the INSTALL project if wanted +You can now build the solution using the RelWithDebInfo configuration (freshly created solution by CMake defaults to Debug). +Build the INSTALL project to deploy the headers and binaries into a single location if wanted/needed. Alternatively, the old Visual Studio solution and project files requiring manual work can be found from the win/sln folder. @@ -152,3 +152,5 @@ Or: >>> >>> # Writing IFC-SPF files to disk: >>> f.write("out.ifc") + +[win/readme.md]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/win/readme.md "win/readme.md" \ No newline at end of file diff --git a/win/readme.md b/win/readme.md new file mode 100644 index 0000000000..358f972087 --- /dev/null +++ b/win/readme.md @@ -0,0 +1,50 @@ +Windows Build Tools and Scripts +=============================== +This folder contains build tools and script for automatic building and deployment of IfcOpenShell's +(IFCOS) dependencies. + +As a general guideline, `.cmd` files are non-standalone batch files that need to be run from command +prompt or from other batch file and/or Visual Studio environment variables set and `.bat` files are +standalone batch files that can be run also from the File Explorer. + +Usage Instructions +------------------ +Execute `build-deps.cmd` to fetch, build and install the dependencies. The batch file will print +requirements for a successful execution. The script allows a few user-configurable build options +which are listed in the usage instructions. Either edit the script file or set these values before +running the script. + +build-deps.cmd expects a CMake generator as `%1` and a build configuration type as `%2`. If the parameters +are not provided, the default values are used (`"Visual Studio 14 2015 Win64"` and `RelWithDebInfo` respectively). +A build type (`Build/Rebuild/Clean`) can be provided as `%3`, if wanted (defaults to `Build`). See `vs-cfg.cmd` +if you want to change the defaults. The batch file will create `deps\` and `deps-vs--installed\` +directories to the project root. Debug and release builds of the depedencies can co-exist by simply running +`build-deps.cmd Debug` and `build-deps.cmd `. + +After the dependencies are build, execute `run-cmake.bat`. The batch file expects a CMake generator as +`%1`, or alternatively if more parameters are provided, `%*` is passed for the CMake invokation. If no `%1` +is provided, the same default value as above is used. This batch script will create a folder of form +build-vs- which will contain the solution and project files for Visual Studio. +**If you wish to use any library from a custom location, modify the paths in run-cmake.bat +accordingly**. + +You can now build the project using the `IfcOpenShell.sln` file in the build folder. Build the `INSTALL` project +if wanted. The project will installed to `installed-vs-\` folder in the project's root +folder and the required IfcOpenShell-Python parts are deployed to the `\Lib\site-packages\` folder. + +All of the dependencies are build as static libraries against the static run-time allowing the developer +to effortlessly deploy standalone IFCOS binaries. + + +Directory Structure +------------------ +``` +| build-deps.cmd - Fetches and builds all needed dependencies for IFCOS +| readme.txt - This file +| run-cmake.bat - Sets environment variables for the dependencies and runs CMake for IFCOS +| vs-cfg.cmd - Utility file used by the build scripts +| BuildDepsCache-.txt - Cache file created by build-deps.cmd +| ++---sln - Contains the old Visual Studio solution and project files +\---utils - Contains various utilities for the build scripts +``` diff --git a/win/readme.txt b/win/readme.txt deleted file mode 100644 index cab80b3372..0000000000 --- a/win/readme.txt +++ /dev/null @@ -1,49 +0,0 @@ -== Windows Build Tools and Scripts == - -This folder contains build tools and script for automatic building and deployment of IfcOpenShell's -(IFCOS) dependencies. - -As a general guideline, .cmd files are non-standalone batch files that need to be run from command -prompt or from other batch file and/or Visual Studio environment variables set and .bat files are -standalone batch files that can be run from File Explorer too. - - -== Usage Instructions == - -Execute build-deps.cmd to fetch, build and install the dependencies. The batch file will print -requirements for a successful execution. The script allows a few user-configurable build options -which are listed in the usage instructions. Either edit the script file or set these values before -running the script. - -build-deps.cmd expects a CMake generator as %1 and a build configuration type as %2. If the parameters -are not provided, the default values are used ("Visual Studio 14 2015 Win64" and RelWithDebInfo respectively). -A build type (Build/Rebuild/Clean) can be provided as %3, if wanted (defaults to Build). See vs-cfg.cmd -if you want to change the defaults. The batch file will create deps\ and deps-vs--installed\ -directories to the project root. Debug and release builds of the depedencies can co-exist by simply running -"build-deps.cmd Debug" and "build-deps.cmd ". - -After the dependencies are build, execute run-cmake.bat. The batch file expects a CMake generator as -%1, or alternatively if more parameters are provided, %* is passed for the CMake inkovation. If no %1 -is provided, the same default value as above is used. This batch script will create a folder of form -build-vs- which will contain the solution and project files for Visual Studio. -IMPORTANT: If you wish to use any library from a custom location, modify the paths in run-cmake.bat -accordingly. - -You can now build the project using the IfcOpenShell.sln file in the build folder. Build the INSTALL project -if wanted. The project will installed to installed-vs- folder in the project's root -folder and the required IfcOpenShell-Python parts are deployed to the \Lib\site-packages folder. - -All of the dependencies are build as static libraries against the static run-time allowing the developer -to effortlessly deploy standalone IFCOS binaries. - - -== Directory Structure == - -| build-deps.cmd - Fetches and builds all needed dependencies for IFCOS -| readme.txt - This file -| run-cmake.bat - Sets environment variables for the dependencies and runs CMake for IFCOS -| vs-cfg.cmd - Utility file used by the build scripts -| BuildDepsCache-.txt - Cache file created by build-deps.cmd -| -+---sln - Contains the old Visual Studio solution and project files -\---utils - Contains various utilities for the build scripts