gammasoft71 / xtd

Free open-source modern C++17 / C++20 framework to create console, GUI (forms like WinForms) and unit test applications and libraries on Microsoft Windows, Apple macOS and Linux.
https://gammasoft71.github.io/xtd
MIT License
753 stars 60 forks source link

[BUG] Installation fails #255

Closed defiantnerd closed 2 weeks ago

defiantnerd commented 1 month ago

Describe the bug

xtd does not install on Windows 11

To Reproduce

Steps to reproduce the behavior:

  1. clone the directory
  2. start an administrator terminal (the readme does not mention this)
  3. switch to "cmd" (powershell is default on Windows 11) (the readme does not mention this)
  4. enter xtd folder and run install
  5. See it fail

Expected behaviour

install and work

Screenshots

This is the content of the "build/install.log":

Install xtd libraries version 0.2.0, copyright © 2024 Gammasoft

The terminal shows this:

Install xtd libraries version 0.2.0, copyright ┬® 2024 Gammasoft
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Unterverzeichnis oder eine Datei mit dem Namen "build" existiert bereits.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Cloning into 'wxWidgets'...
remote: Enumerating objects: 7029, done.
remote: Counting objects: 100% (7029/7029), done.
remote: Compressing objects: 100% (5845/5845), done.
remote: Total 7029 (delta 1943), reused 2926 (delta 1094), pack-reused 0
Receiving objects: 100% (7029/7029), 22.47 MiB | 12.45 MiB/s, done.
Resolving deltas: 100% (1943/1943), done.
Note: switching to 'a812fffda3fe686c94e24bff27e8effd96e4de64'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Updating files: 100% (6685/6685), done.
Submodule '3rdparty/catch' (https://github.com/wxWidgets/Catch.git) registered for path '3rdparty/catch'
Submodule '3rdparty/nanosvg' (https://github.com/wxWidgets/nanosvg) registered for path '3rdparty/nanosvg'
Submodule '3rdparty/pcre' (https://github.com/wxWidgets/pcre) registered for path '3rdparty/pcre'
Submodule 'src/expat' (https://github.com/wxWidgets/libexpat.git) registered for path 'src/expat'
Submodule 'src/jpeg' (https://github.com/wxWidgets/libjpeg-turbo.git) registered for path 'src/jpeg'
Submodule 'src/png' (https://github.com/wxWidgets/libpng.git) registered for path 'src/png'
Submodule 'src/tiff' (https://github.com/wxWidgets/libtiff.git) registered for path 'src/tiff'
Submodule 'src/zlib' (https://github.com/wxWidgets/zlib.git) registered for path 'src/zlib'
Cloning into 'C:/Users/username/Documents/Repo/projects/xtd/build/3rdparty/wxWidgets/3rdparty/catch'...
Cloning into 'C:/Users/username/Documents/Repo/projects/xtd/build/3rdparty/wxWidgets/3rdparty/nanosvg'...
Cloning into 'C:/Users/username/Documents/Repo/projects/xtd/build/3rdparty/wxWidgets/3rdparty/pcre'...
Cloning into 'C:/Users/username/Documents/Repo/projects/xtd/build/3rdparty/wxWidgets/src/expat'...
Cloning into 'C:/Users/username/Documents/Repo/projects/xtd/build/3rdparty/wxWidgets/src/jpeg'...
Cloning into 'C:/Users/username/Documents/Repo/projects/xtd/build/3rdparty/wxWidgets/src/png'...
Cloning into 'C:/Users/username/Documents/Repo/projects/xtd/build/3rdparty/wxWidgets/src/tiff'...
Cloning into 'C:/Users/username/Documents/Repo/projects/xtd/build/3rdparty/wxWidgets/src/zlib'...
CMake Deprecation Warning at CMakeLists.txt:10 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Ein Unterverzeichnis oder eine Datei mit dem Namen "build" existiert bereits.
CMake Warning at scripts/cmake/xtd_commands.cmake:2378 (message):
  Doxygen not found try with set "XTD_DOWNLOAD_DOXYGEN" option to ON
Call Stack (most recent call first):
  CMakeLists.txt:61 (include)

Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
Die Datei "xtdc-gui" kann nicht gefunden werden.
        1 Datei(en) verschoben.

At one point in time it seems stuck and I hit ENTER once with the result that it immediately continued with cloning wxWidgets. It also never displays any progress or what the script tries to do.

Desktop

Workaround

none available.

gammasoft71 commented 1 month ago

First of all, thank you for your interest in xtd.

Indeed, there is a problem when installing xtd on Windows. I recently added the ability to save the installation process using a special tee.cmd command. Unfortunately, this command doesn't work as expected. I have temporarily removed this option until it works properly.

The second problem is that in the documentation I forgot to specify that the command prompt must be run in "administrator" mode. This has now been corrected.

defiantnerd commented 1 month ago

This was in Administrator mode, as reported in the issue. I am also curious why it needs an install.

gammasoft71 commented 1 month ago

The problem came from tee.cmd. You can reinstall it in administrator mode. You need to delete the build folder.

xtd is compiled and installed with CMake.

To find the dependency libraries for a project, CMake will search by default for the Windows OS in C:\Program Files (x86)\lib_name path. It is of course possible to install a library elsewhere, but in this case you need to specify where the library is installed when generating the project. You can modify the cmake_install_prefix variable, in which case the installation will take place where you decide.

You can also use a package manager such as VCPKG to manage project installation. But xtd does not currently use a package manager other than the default CMake one.

xtd is therefore installed by default in C:\Program Files (x86)\xtd, which is why you need to be in administrator mode to install xtd. For more information read the CMake documentation.