sw icon indicating copy to clipboard operation
sw copied to clipboard

SW installs without UI and puts nearly 1GB on my SSD. How to move this to an other drive? Plus other questions.

Open zsogitbe opened this issue 4 years ago • 7 comments

  • SW installs without UI and puts nearly 1GB on my SSD (C drive). How to move this to an other drive? What are those files? Can I remove them?

  • There are a huge amount of directories (hundreds) created on the install drive + also hundreds of directories in the location of the software project. Most of them are empty. Is there an option to remove all of these?

  • Is there an option to not have all of these directories and files at all? This would be my preference.

zsogitbe avatar Jul 07 '20 07:07 zsogitbe

Hi,

What command do you issue?

  1. Storage dir is set in c:\users\u\.sw\sw.yml. If you change it, you can remove c:\users\u\.sw\storage directory.

  2. Directories will be filled during build with build files.

  3. Without directories where would you store your build files?

egorpugin avatar Jul 07 '20 07:07 egorpugin

Thank you for your answer!

  • I used what was required: 'sw setup'
  • I have changed the storage dir in sw.yml to an other drive but you can not remove the storage dir because it needs '.sw\storage\etc\sw\static' on the C drive (install location) where the 'SWConfig.cmake' file is read! Is this a bug?
  • I am sorry but I do not agree with point 3. because the hundreds of directories and files are totally unnecessary and I would strongly recommend to change this behavior. It is not normal if any software solution clutters your drive with hundreds of directories and file which you do not need! Also because of security reasons.

zsogitbe avatar Jul 07 '20 08:07 zsogitbe

  1. After sw setup on clean system I see not that many folders in .sw\storage (see attached pic.). I think you've run some other sw command that populated storage with all those files and dirs.
  2. No, it's possible to change directory. SWConfig.cmake will be read from the specified directory.
  3. I need to know the command you invoked first. Did you run sw from cmake like in cmake integration example?

image

egorpugin avatar Jul 07 '20 08:07 egorpugin

  1. After setup I have:
  • storage\pkg -> 182 folders with at least 20 subfolders per folder (called '00', '0b', '0d', ...). That is at least 4000 folders with many 'unknown' files!
  • storage\tmp\cfg\t -> this contains also a lot of folders but less than pkg
  1. Where do you specify from where to read SWConfig.cmake?
  2. I have run 'sw setup' first in a command prompt and then I have just used the CMake UI (as it was explained). I have not done anything else except changing 'sw.yml' to move the storage location.

zsogitbe avatar Jul 07 '20 08:07 zsogitbe

  1. They are not unknown. Dirs are software packages that contain their source files.
  2. sw setup adds entries to windows registry. CMake knows how to use them to load SWConfig.cmake when you write find_package(SW). https://github.com/SoftwareNetwork/sw/blob/master/src/sw/client/common/command/setup.cpp#L68
  3. I see. Sw was invoked from CMake UI.

So, you want to use some software packages from cmake. Sw installs them into the storage, also builds there. That's why storage contains a lot of files and dirs. What do you expect?

egorpugin avatar Jul 07 '20 09:07 egorpugin

Thank you for your answer! I do not agree because I use 10-12 software packages and not hundreds of them!

I find this a bug (or design fault) in your software! I would like to suggest to only install things which are requested and which are necessary. I will be honest with you, I find the way how several linked packages are installed and complied exceptionally good but if I would not need the software which links to SW I would never use SW because of these hundreds of folders and files which I have not requested!!

zsogitbe avatar Jul 07 '20 09:07 zsogitbe

Yes, this is known issue.

You mean that sw installs some unrelated package to your actual build. This is because some (currently almost all) package configs are in C++, so to build package config or specification you need all of SW deps installed (not built). Please note, that sw driver has version 0.4.2 which is far from first stable release.

Possible solutions:

  1. Install prebuild packages - sw will download only public headers and compiled binaries. Currently this is WIP.
  2. Download single preprocessed header for building package configs. Not actually WIP, but may be pushed on top of my task list.

egorpugin avatar Jul 07 '20 10:07 egorpugin