<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to WindowsBuild</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>Recent changes to WindowsBuild</description><atom:link href="https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 02 May 2024 21:58:34 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/feed" rel="self" type="application/rss+xml"/><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v24
+++ v25
@@ -79,8 +79,6 @@
     * Replace everything below 2. (Boost) by
         `add_library(Boost::headers INTERFACE IMPORTED GLOBAL)
         target_include_directories(Boost::headers INTERFACE &amp;lt;path_to_unzipped_boost&amp;gt;)`
-* Modify cpp/CMakeLists.txt, python/CMakeLists.txt
-    `set_target_properties(wavepacket (or wavepacket_python) PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)`
 * Run cmake as in Vagrantfile; additional option `-D WP_BUILD_DOC=OFF -G Ninja -D CMAKE_MAKE_PROGRAM=&amp;lt;path to="" ninja="" exe=""&amp;gt;`
 * Run `ninja`, `ninja install`
 * Try out the tests / demos
@@ -91,7 +89,6 @@

 ###Assemble Python package###

-* Install wavepacket `ninja install`
 * open "x64 native tools console", go to ${install_dir}/lib/wavepacket_python/wavepacket
 * Check dependencies `dumpbin /DEPENDENTS wavepacket_python.pyd`
     * python311.dll, vcruntime140.dll should be provided by Python
@@ -101,7 +98,7 @@
 * Copy all licenses to a licenses/ subfolder, rename to "$dependency.$extension"
     * most comes from the vcpkg install folder; note that you should copy everything from "vcpkg-gfortran"
     * tensor lib from the tensor sources
-    * EULA for the MSVC library can be taken from https://visualstudio.microsoft.com/en/license-terms/vs2022-runtime
+    * EULA for the MSVC library can be taken from https://visualstudio.microsoft.com/en/license-terms/vs2022-cruntime
 * add the Readme_PythonPackage.md from the python/ subdirectory
 * copy the Demos folder from the checkout: Prune, copy only demo.py and required files, add an output/ directory to all Python demos, so that they can be run in-place
 * compress
&amp;lt;/path&amp;gt;&amp;lt;/path_to_unzipped_boost&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Thu, 02 May 2024 21:58:34 -0000</pubDate><guid>https://sourceforge.netbe23e83d3d5d1773d5bc34e05cfbb54e84db8db2</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v23
+++ v24
@@ -53,6 +53,7 @@
                endif`
     * include/tensor/flags.h
         * replace `extern Flags FLAGS;` by same pattern
+        * and the TENSOR_DEBUG_BLOCK_SVD as well
     * test/alloc_informer.h
         * replace allocations and deallocations by same pattern (use TESTMAIN_EXPORT instead of TENSOR_EXPORT)
 * Run CMake commands similar to Vagrantfile
@@ -68,6 +69,8 @@
     * remove the line `find_dependency(lapack)`

 ###Building Wavepacket###
+
+You might have to run the build commands in a "native tools x64 prompt".

 * Install the Python venv; not as in Vagrantfile (Linux-specific)
     * `py -3.11 -m venv my_venv`
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Thu, 02 May 2024 21:53:41 -0000</pubDate><guid>https://sourceforge.net25e801208984026ee4ff6cb556694e34322f0248</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v22
+++ v23
@@ -39,7 +39,7 @@
         * LAPACK::LAPACK -&amp;gt; lapack
         * FFTW3 -&amp;gt; FFTW3::fftw3
         * add `set_target_properties(tensor PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)`
-        * add `target_compile_definitions(tensor PRIVAE TENSOR_EXPORT)`
+        * add `target_compile_definitions(tensor PRIVATE TENSOR_EXPORT)`
     * test/CMakeLists.txt
         * add `set_target_properties(testmain PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)`
         * add `target_compile_definitions(testmain PRIVATE TESTMAIN_EXPORT)`
@@ -56,7 +56,7 @@
     * test/alloc_informer.h
         * replace allocations and deallocations by same pattern (use TESTMAIN_EXPORT instead of TENSOR_EXPORT)
 * Run CMake commands similar to Vagrantfile
-    * additional flags: `-G Ninja -D CMAKE_BUILD_TOOL=&amp;lt;path_to_ninja.exe&amp;gt;`
+    * additional flags: `-G Ninja -D CMAKE_MAKE_PROGRAM=&amp;lt;path_to_ninja.exe&amp;gt;`
 * Go to build directory and run `ninja -k 0`
     * ignore the build errors; the build tries to run the tests, which fails due to missing dependencies
 * Check that all tests run through
@@ -78,7 +78,7 @@
         target_include_directories(Boost::headers INTERFACE &amp;lt;path_to_unzipped_boost&amp;gt;)`
 * Modify cpp/CMakeLists.txt, python/CMakeLists.txt
     `set_target_properties(wavepacket (or wavepacket_python) PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)`
-* Run cmake as in Vagrantfile; additional option "-D WP_BUILD_DOC=OFF -G Ninja"
+* Run cmake as in Vagrantfile; additional option `-D WP_BUILD_DOC=OFF -G Ninja -D CMAKE_MAKE_PROGRAM=&amp;lt;path to="" ninja="" exe=""&amp;gt;`
 * Run `ninja`, `ninja install`
 * Try out the tests / demos
     * Copy all dlls to each test subdir: wavepacket.dll, tensor.dll, all vcpkg dlls
&amp;lt;/path&amp;gt;&amp;lt;/path_to_unzipped_boost&amp;gt;&amp;lt;/path_to_ninja.exe&amp;gt;&amp;lt;/path_to_ninja.exe&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Thu, 02 May 2024 21:52:03 -0000</pubDate><guid>https://sourceforge.net7e3dfd0edffac2a449c5068a01f4aab38726c50e</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v21
+++ v22
@@ -99,7 +99,8 @@
     * most comes from the vcpkg install folder; note that you should copy everything from "vcpkg-gfortran"
     * tensor lib from the tensor sources
     * EULA for the MSVC library can be taken from https://visualstudio.microsoft.com/en/license-terms/vs2022-runtime
-* add the readme(s)
+* add the Readme_PythonPackage.md from the python/ subdirectory
+* copy the Demos folder from the checkout: Prune, copy only demo.py and required files, add an output/ directory to all Python demos, so that they can be run in-place
 * compress

 * Now we can run the Python tests of Wavepacket
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Mon, 22 Apr 2024 21:32:37 -0000</pubDate><guid>https://sourceforge.net9e793212dc4928f822e73120ecdc7e09d18b36da</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v20
+++ v21
@@ -95,3 +95,14 @@
     * ignore api-ms-win-crt-* (Windows system libs)
     * probably missing -&amp;gt; install recursively: tensor.dll, msvcp140.dll
         * msvcp*.dll found in a directory like C:/Program Files (x86)/Microsoft Visual Studio/2022/(BuildTools|Professional|Community)/Redist/MSVC/.../x64/Microsoft.VC143.CRT
+* Copy all licenses to a licenses/ subfolder, rename to "$dependency.$extension"
+    * most comes from the vcpkg install folder; note that you should copy everything from "vcpkg-gfortran"
+    * tensor lib from the tensor sources
+    * EULA for the MSVC library can be taken from https://visualstudio.microsoft.com/en/license-terms/vs2022-runtime
+* add the readme(s)
+* compress
+
+* Now we can run the Python tests of Wavepacket
+    * copy the Python package (wavepacket/ directory) to all demo directories in the source folder, and to the pyhon/test folder in the build directory
+    * install FFMpeg and add ffmpeg.exe to the PATH
+    * run `ctest -R '.*Python.*'`
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Fri, 19 Apr 2024 20:25:33 -0000</pubDate><guid>https://sourceforge.net44f6e889f072c3530610e7e48c18fa9665fd673e</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v19
+++ v20
@@ -76,6 +76,8 @@
     * Replace everything below 2. (Boost) by
         `add_library(Boost::headers INTERFACE IMPORTED GLOBAL)
         target_include_directories(Boost::headers INTERFACE &amp;lt;path_to_unzipped_boost&amp;gt;)`
+* Modify cpp/CMakeLists.txt, python/CMakeLists.txt
+    `set_target_properties(wavepacket (or wavepacket_python) PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)`
 * Run cmake as in Vagrantfile; additional option "-D WP_BUILD_DOC=OFF -G Ninja"
 * Run `ninja`, `ninja install`
 * Try out the tests / demos
&amp;lt;/path_to_unzipped_boost&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Tue, 09 Apr 2024 20:00:52 -0000</pubDate><guid>https://sourceforge.net2c236ad29894d2f661f0f9e5f40b16ce061d478f</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v18
+++ v19
@@ -3,7 +3,7 @@
 If you build things under Windows, you face some problems

 1. Ignoring many edge cases, a library / program under Windows must have all the .dll files that it depends on in the same directory. At the same time, the standard Windows toolchains provide zero support for tracking and copying dependencies (vcpkg has a CMake hack, but that does not help too much here). That means, for every stupid test you need to copy all the dependencies to the test folder before you can run it.
-2. Windows DLLs behave slightly differently with respect to exporting symbols than Linux. If, as we do here, we use libraries developed primarily under Linux, we need to directly hack the code a little to get them to work. And the CMake scripts have little support for the stupid workflows needed because of point 1.
+2. Windows DLLs behave slightly differently with respect to exporting symbols than Linux. If, as we do here, we use libraries developed primarily under Linux, we need to directly hack the code a little to get them to work.
 3. Quite a few other differences. For example, dlls usually use different naming schemes, files have different line endings etc. All kinds of bugs that we can trigger here. Altogether, the system is also simply less friendly to developing applications, you typically have no package manager to just install boost libraries that work and so on and so forth.

 This page is mostly a Howto for me with a tiny bit of explanations; usually you would not build Wavepacket yourself, but download a Windows package instead. In particular, file locations may be slightly incorrect and so on.
@@ -66,3 +66,30 @@
 * Install everything `ninja install`
 * Modify installed tensorConfig.cmake
     * remove the line `find_dependency(lapack)`
+
+###Building Wavepacket###
+
+* Install the Python venv; not as in Vagrantfile (Linux-specific)
+    * `py -3.11 -m venv my_venv`
+    * `my_venv/Scripts/pip install pybind11 matplotlib numpy`
+* Modify cpp/CMakeLists.txt
+    * Replace everything below 2. (Boost) by
+        `add_library(Boost::headers INTERFACE IMPORTED GLOBAL)
+        target_include_directories(Boost::headers INTERFACE &amp;lt;path_to_unzipped_boost&amp;gt;)`
+* Run cmake as in Vagrantfile; additional option "-D WP_BUILD_DOC=OFF -G Ninja"
+* Run `ninja`, `ninja install`
+* Try out the tests / demos
+    * Copy all dlls to each test subdir: wavepacket.dll, tensor.dll, all vcpkg dlls
+        `for demo in $(find Demos -name 'demo.exe'); do d=$(dirname $demo); cp cpp/wavepacket.dll $d; done
+    * Also copy all dlls to the cpp subdir
+    * In root directory, run tests, ignoring Python tests `ctest -R '.*_Test'`
+
+###Assemble Python package###
+
+* Install wavepacket `ninja install`
+* open "x64 native tools console", go to ${install_dir}/lib/wavepacket_python/wavepacket
+* Check dependencies `dumpbin /DEPENDENTS wavepacket_python.pyd`
+    * python311.dll, vcruntime140.dll should be provided by Python
+    * ignore api-ms-win-crt-* (Windows system libs)
+    * probably missing -&amp;gt; install recursively: tensor.dll, msvcp140.dll
+        * msvcp*.dll found in a directory like C:/Program Files (x86)/Microsoft Visual Studio/2022/(BuildTools|Professional|Community)/Redist/MSVC/.../x64/Microsoft.VC143.CRT
&amp;lt;/path_to_unzipped_boost&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Tue, 09 Apr 2024 19:17:55 -0000</pubDate><guid>https://sourceforge.net4971c832e942ce2cfdc9cd6d1170eddb2a2e105a</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v17
+++ v18
@@ -16,6 +16,8 @@
     * You might want to fine-tune, for example, use the oldest possible Windows SDK for maximum backwards compatibility
 * Download the ninja build tool
 * Download and unzip boost
+* Install the target Python
+    * check the switch "install py.exe" or whatever it is called (should be on by default)
 * clone the repos for vcpkg, the tensor library and Wavepacket; see the Vagrantfile for the repo locations and commit IDs.

 ###Installing vcpkg dependencies###
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Sun, 07 Apr 2024 20:38:02 -0000</pubDate><guid>https://sourceforge.netf73be1126052d12641b451fa44ac771d687a4dcf</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v16
+++ v17
@@ -1,4 +1,4 @@
-=====Preface to understand the complex workflow=====
+###Preface to understand the complex workflow###

 If you build things under Windows, you face some problems

@@ -8,7 +8,7 @@

 This page is mostly a Howto for me with a tiny bit of explanations; usually you would not build Wavepacket yourself, but download a Windows package instead. In particular, file locations may be slightly incorrect and so on.

-=====Prepare the system=====
+###Prepare the system###

 * Install VisualStudio
     * side remark: we only need the BuildTools, but, curiously, its license prohibits OSS development. Visual Studio Community, which is a superset of the build tools, allows OSS development.
@@ -18,7 +18,7 @@
 * Download and unzip boost
 * clone the repos for vcpkg, the tensor library and Wavepacket; see the Vagrantfile for the repo locations and commit IDs.

-=====Installing vcpkg dependencies=====
+###Installing vcpkg dependencies###

 * Go to the vcpkg directory
 * Run "bootstrap-vcpkg.bat"
@@ -26,3 +26,41 @@
 * Fix the lapack package
     * not required once https://github.com/microsoft/vcpkg/issues/38009 is resolved
     * in share/lapack-3.11.0/lapack-targets-(debug|release).cmake, change the filenames "liblapack" -&amp;gt; "lapack" (2 occurences in each file)
+
+### Building the tensor library###
+
+You might have to run the build commands in a "native tools x64 prompt".
+
+* Change the build scripts
+    * top-level CMakeLists.txt
+        * LAPACK -&amp;gt; lapack
+        * LAPACK::LAPACK -&amp;gt; lapack
+        * FFTW3 -&amp;gt; FFTW3::fftw3
+        * add `set_target_properties(tensor PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)`
+        * add `target_compile_definitions(tensor PRIVAE TENSOR_EXPORT)`
+    * test/CMakeLists.txt
+        * add `set_target_properties(testmain PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)`
+        * add `target_compile_definitions(testmain PRIVATE TESTMAIN_EXPORT)`
+* Modify source code
+    * include/tensor/ranges.h
+        * replace `extern const Range _;` by
+            `#ifdef TENSOR_EXPORT
+               __declspec(dllexport) extern const Range _;
+               #else
+               __declspec(dllimport) extern const Range _;
+               endif`
+    * include/tensor/flags.h
+        * replace `extern Flags FLAGS;` by same pattern
+    * test/alloc_informer.h
+        * replace allocations and deallocations by same pattern (use TESTMAIN_EXPORT instead of TENSOR_EXPORT)
+* Run CMake commands similar to Vagrantfile
+    * additional flags: `-G Ninja -D CMAKE_BUILD_TOOL=&amp;lt;path_to_ninja.exe&amp;gt;`
+* Go to build directory and run `ninja -k 0`
+    * ignore the build errors; the build tries to run the tests, which fails due to missing dependencies
+* Check that all tests run through
+    * copy all dlls from vcpkg/installed/x64-windows/bin to the "tests/" subdirectory
+    * copy tensor.dll from the top-level build folder to the "tests/" subdirectory
+    * run `ctest` in the tests/ subdirectory
+* Install everything `ninja install`
+* Modify installed tensorConfig.cmake
+    * remove the line `find_dependency(lapack)`
&amp;lt;/path_to_ninja.exe&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Sun, 07 Apr 2024 20:36:18 -0000</pubDate><guid>https://sourceforge.nete3356eb6c5064b9a18d57a8cd19b7aeeccb7abdf</guid></item><item><title>WindowsBuild modified by Ulf Lorenz</title><link>https://sourceforge.net/p/wavepacket/cpp/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v15
+++ v16
@@ -4,3 +4,25 @@

 1. Ignoring many edge cases, a library / program under Windows must have all the .dll files that it depends on in the same directory. At the same time, the standard Windows toolchains provide zero support for tracking and copying dependencies (vcpkg has a CMake hack, but that does not help too much here). That means, for every stupid test you need to copy all the dependencies to the test folder before you can run it.
 2. Windows DLLs behave slightly differently with respect to exporting symbols than Linux. If, as we do here, we use libraries developed primarily under Linux, we need to directly hack the code a little to get them to work. And the CMake scripts have little support for the stupid workflows needed because of point 1.
+3. Quite a few other differences. For example, dlls usually use different naming schemes, files have different line endings etc. All kinds of bugs that we can trigger here. Altogether, the system is also simply less friendly to developing applications, you typically have no package manager to just install boost libraries that work and so on and so forth.
+
+This page is mostly a Howto for me with a tiny bit of explanations; usually you would not build Wavepacket yourself, but download a Windows package instead. In particular, file locations may be slightly incorrect and so on.
+
+=====Prepare the system=====
+
+* Install VisualStudio
+    * side remark: we only need the BuildTools, but, curiously, its license prohibits OSS development. Visual Studio Community, which is a superset of the build tools, allows OSS development.
+    * install the " Desktop Development with C++"  workload; not sure which of the packages are needed, but something I would not have thought about.
+    * You might want to fine-tune, for example, use the oldest possible Windows SDK for maximum backwards compatibility
+* Download the ninja build tool
+* Download and unzip boost
+* clone the repos for vcpkg, the tensor library and Wavepacket; see the Vagrantfile for the repo locations and commit IDs.
+
+=====Installing vcpkg dependencies=====
+
+* Go to the vcpkg directory
+* Run "bootstrap-vcpkg.bat"
+* Run "vcpkg.exe install lapack blas fftw3 gtest"
+* Fix the lapack package
+    * not required once https://github.com/microsoft/vcpkg/issues/38009 is resolved
+    * in share/lapack-3.11.0/lapack-targets-(debug|release).cmake, change the filenames "liblapack" -&amp;gt; "lapack" (2 occurences in each file)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ulf Lorenz</dc:creator><pubDate>Sun, 07 Apr 2024 20:22:28 -0000</pubDate><guid>https://sourceforge.net93abb1c1b0512162b9a4606084c446c9b7990e01</guid></item></channel></rss>