WindowsBuildHowto.txt 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. 1.- Build dependencies:
  2. You need a Visual Studio 2022 Community Edition C++ build environment, Python
  3. and CMake.
  4. When installing Visual Studio, only install the desktop application C++
  5. development tools (VC++ 2022, ATL Visual C++, VC++ 2022 latest v143 tools,
  6. Visual C++ tools for CMake, JIT debugger), with the latest Windows 10 SDK (the
  7. one selected by default in the installer); you do not need to install any other
  8. SDK, even for running the viewer under Windows 7, 8 or 11 since the build
  9. target API version (Win 7) is specified in the viewer cmake files via the
  10. appropriate defines. Do not install any bundled Python either. If you wish to
  11. build with clang, also select the clang tools.
  12. Get Python from Python's site (https://www.python.org/).
  13. Run the installer as administrator (right click, "Run as administrator"); this
  14. way, you will be able to install Python in C:\Programs, for example (instead
  15. of in your roaming profile).
  16. You may use the custom installation option to remove the unnecessary components
  17. that would otherwise clutter your hard disk/SSD for nothing: just keep Python
  18. itself and the Python launcher (1).
  19. Do make sure to ask the installer to update your PATH environment variable.
  20. For CMake, you may use the latest release (the Cool VL Viewer build system is
  21. regularly updated to work with the latest cmake version); v3.16+ recommended
  22. for a faster compilation. Get it from from CMake's site:
  23. https://cmake.org/files/LatestRelease/ (you may use the 64 bits version).
  24. Do ask to the installer to update your PATH environment variable so that cmake
  25. can be found.
  26. You may have to restart your session after installation so that the new PATH is
  27. taken into account.
  28. To verify that everything is installed properly, you may open a command prompt
  29. console and type the following commands:
  30. python --version
  31. cmake --version
  32. 2.- Building instructions:
  33. Untar (2) the Cool VL Viewer sources and place the resulting "linden" folder
  34. inside the Visual Studio "source" directory.
  35. You may want to open the linden/indra/cmake/00-BuildOptions.cmake file to
  36. review the various build options; they are set to their default used for the
  37. official builds, but you may want to add or remove features.
  38. Then you can choose between two methods:
  39. a.- Automated, batch-file based building:
  40. Point a file explorer into the linden/ directory of the sources tree and
  41. double-click on "windows-build.bat", so to launch the build. The script will
  42. pause at the end of the configuring step: simply press a key to continue with
  43. the building itself.
  44. b.- GUI build:
  45. Proceed like above, but at the pause occurring after the configuration step,
  46. press CTRL C to interrupt the script, and confirm its termination at the next
  47. prompt.
  48. After the command console has closed, point the explorer inside the
  49. linden/build-vs* directory that just got created and double-click on the
  50. "CoolVLViewer.sln" file so to load it into Visual Studio.
  51. Then simply press CTRL SHIFT B to launch the viewer building process.
  52. Note: since all the development and debugging process of the Cool VL Viewer is
  53. done under Linux, only the "Release" build target is supported and available
  54. under Windows. You may nonetheless decently debug the viewer under Windows by
  55. simply copying the CoolVLViewer.pdb file produced during the building process
  56. into the viewer-win64-release directory and launch/debug the viewer from there.
  57. 3.- Packaging and distribution:
  58. Once the build has completed successfully, you get a ready to launch viewer in:
  59. linden/viewer-win64-release/
  60. If you wish to distribute your build, you will need to use InstallJammer v1.3
  61. (https://sourceforge.net/projects/installjammer/files/InstallJammer/snapshots/installjammer-1.3-snapshot.zip/download)
  62. with the provided script in linden/scripts/installers/windows64/ (in the latter
  63. script, using WordPad or an editor able to deal with UNIX files, change the
  64. occurrences of "C:/Users/root/source/cvxxxx/" with the path of whatever folder
  65. you copied the source files into).
  66. Simply load the CoolVLViewer-x86_64-1.32.x.mpi file into InstallJammer, select
  67. "Build Installers" in the tree on the left, then check "Build for final release"
  68. on the bottom and press the "Build Install" button. The distributable package
  69. will be created in linden/scripts/installers/windows/output/
  70. Notes:
  71. (1) You may also install "pip" if you want to use Python for other purposes
  72. than just building the Cool VL Viewer (which does not need it), including
  73. LL's viewer or other TPVs (which do need pip to install LL's build system).
  74. (2) 7-Zip (http://www.7-zip.org/) may be used to extract the viewer sources
  75. from the tar archive.