Closed ClaudioGi closed 12 months ago
If you create a build/_deps
folder and place all downloaded files into it, then run cmake -S . -B build ...
from Textadept's root directory, it should use your downloaded files instead of re-downloading them. Textadept does this during its nightly build process:
https://github.com/orbitalquark/textadept/blob/a026a66b7e79c16b77280cc3c03a6c4b73665e80/.github/workflows/release.yml#L46 https://github.com/orbitalquark/textadept/blob/a026a66b7e79c16b77280cc3c03a6c4b73665e80/.github/workflows/release.yml#L56
@orbitalquark : OK. This works when I copy the files into the build/_deps
directory. In between I know what exactly is the issue with the CMake script building the project: it downloads the files not to the build/_deps
directory, so on each new build it launches all of the files again from the Internet. Is it a feature or a bug, that each new build downloads all the dependencies again and again if you haven't copied them manually to the build/_deps
directory?
I believe it's a feature of CMake. I don't know how to make CMake cache downloaded files. That's in part why I wrote the CMake file to use downloads in the "_deps" directory if it exists. My knowledge of CMake is pretty minimal.
@orbitalquark : You don't need to make CMake to cache downloaded files, because they are cached at their download directories. There are two approaches to solve the issue: put the appropriate copy instructions into the CMake file like you do preparing the installation folder. This will copy the downloaded files to the _deps
directory where they will be found on next run.
Another option is to change the path for checking of file existence from build\_deps
to the directory where the files had been downloaded. They are there ... ready to be used. It's not CMake, it's how you have set the paths to search for existing files. In other words, to avoid repeated downloads at each new build you need to change the search paths to search for the downloaded files. Sorry for not providing a patch ... but at the moment I still don't know how it comes that CMake downloads the files where it downloads them.
Thanks for the info. There is also a FETCHCONTENT_FULLY_DISCONNECTED
option that I use fairly often to avoid unnecessary downloads.
Thanks for the quick response and the hint about the option. I have not been using CMake
yet knowing up to now only a tiny bit about make
. Currently I am in the process of gaining some understanding what CMake
does and how it works and have already rewritten the CMakeLists.txt so that it does only contain what is needed to build the GTK and the Console versions on Linux. As I have manually copied the downloaded files to /build/_deps
I was able to remove the lines coping with downloading eventually not available files from the Internet. From my perspective the issue is a tiny one and easy to fix once you know that you need to manually copy the downloaded files to /build/_deps to avoid downloads on next build runs. So from my perspective I am ready to close the issue as solved. It would maybe make sense anyway to change the CMakeLists.txt as it seems that it was not your intention that the external files need to be downloaded again and again on each next build of the application.
I have been able to achieve what I was after ... so it's time to close this issue. Thanks to @orbitalquark for helpful responses.
It seems that there is an issue with the build process related to checking of availability of the
scintillua-subbuild
. The build deletes the on the disk already available file in order to download it again ( scintillua_6.2.zip ). May you provide a makefile for creating on Linux Mint 21 Cinnamon the GTK part only which does not go online for downloads and uses the already downloaded files? This will reduce the complexity and make it easier to understand how the code works in order to master it for specific own purposes of being the main entry point to all the in the system available functionality?