From b285a261b721bc162de0225633651c2318737d86 Mon Sep 17 00:00:00 2001 From: A Date: Thu, 28 Dec 2023 21:00:22 +0100 Subject: [PATCH] update documentation --- README.md | 2 +- _static/css/exoticlibraries.css | 4 ++++ _static/js/exoticlibraries.js | 4 ++-- blog/Feb-2021/index.rst | 4 ++-- blog/Feb-2021/magic_scripts.md | 2 +- blog/index.rst | 2 +- conf.py | 2 +- magic/install.ps1 | 30 +++++++++++++++++++++++++++++- magic/install.sh | 11 ++++++++++- pages/programs.md | 2 +- 10 files changed, 52 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d9eeea6..297bd2f 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Bash, Powershell
diff --git a/_static/css/exoticlibraries.css b/_static/css/exoticlibraries.css index ee0629c..17c62a4 100644 --- a/_static/css/exoticlibraries.css +++ b/_static/css/exoticlibraries.css @@ -72,6 +72,10 @@ border-top-left-radius: 5px; } +.documentwrapper { + max-width: 60%; +} + .border-radius-top-right { border-top-right-radius: 5px; } diff --git a/_static/js/exoticlibraries.js b/_static/js/exoticlibraries.js index 04cb1ea..733640e 100644 --- a/_static/js/exoticlibraries.js +++ b/_static/js/exoticlibraries.js @@ -6,8 +6,8 @@ const LatestBlogPosts = [ "title": "Installation Scripts", "excerpt": `The purpose of the script is to be able to download, build (when needed), and install the library without any hassle at all using remote scripts. Currently, the script can only install headers only libraries from github.`, - "date": "08 February, 2021", - "link": "/blog/Feb-2021/magic_scripts.html", + "date": "08 February, 2022", + "link": "/blog/Feb-2022/magic_scripts.html", "image": "https://miro.medium.com/max/700/1*U-R58ahr5dtAvtSLGK2wXg.png" }, { diff --git a/blog/Feb-2021/index.rst b/blog/Feb-2021/index.rst index 27cece1..4751893 100644 --- a/blog/Feb-2021/index.rst +++ b/blog/Feb-2021/index.rst @@ -1,11 +1,11 @@ -Feb-2021 +Feb-2022 ---------- .. toctree:: :glob: - /blog/Feb-2021/* + /blog/Feb-2022/* diff --git a/blog/Feb-2021/magic_scripts.md b/blog/Feb-2021/magic_scripts.md index a80bc1c..c14c6bb 100644 --- a/blog/Feb-2021/magic_scripts.md +++ b/blog/Feb-2021/magic_scripts.md @@ -167,4 +167,4 @@ into the currenct folder with a custom temporary directory ---- - Author: Adewale Azeez -- Date: 08 February, 2021 \ No newline at end of file +- Date: 08 February, 2022 \ No newline at end of file diff --git a/blog/index.rst b/blog/index.rst index 46f9ca6..2590893 100644 --- a/blog/index.rst +++ b/blog/index.rst @@ -7,6 +7,6 @@ Exotic Libraries Blog :maxdepth: 1 /blog/Sep-2020/index - /blog/Feb-2021/index + /blog/Feb-2022/index diff --git a/conf.py b/conf.py index ee28f9f..802db5c 100644 --- a/conf.py +++ b/conf.py @@ -1,7 +1,7 @@ import themata project = 'Exotic Libraries' -copyright = '2021, Exotic Libraries - MIT License' +copyright = '2022, Exotic Libraries - MIT License' author = 'Exotic Libraries Contributors' html_theme_path = [themata.get_html_theme_path()] diff --git a/magic/install.ps1 b/magic/install.ps1 index f1ae64a..93dc8d7 100644 --- a/magic/install.ps1 +++ b/magic/install.ps1 @@ -34,7 +34,7 @@ $Global:VERSION="v2.0" $Global:LICENSE="MIT" -$Global:YEAR="2021" +$Global:YEAR="2022" $Global:AUTHOR="Adewale Azeez" $Global:BASE_BRANCH="main" $Global:SELECTED_LIBRARIES = New-Object System.Collections.Generic.List[string] @@ -74,6 +74,10 @@ Function Main { } ElseIf ($Global:ARG_MATCH -eq "--BaseBranch") { $Global:BASE_BRANCH = $Global:EXTRACTED_ARG_VALUE + } ElseIf ($Global:ARG_MATCH -eq "--GccLib2Clang") { + Copy-GCC-Libs-To-Clang + Break + } ElseIf ($Global:ARG_MATCH -eq "--All") { $Global:EXOTIC_LIBRARIES | ForEach-Object { $Global:SELECTED_LIBRARIES.Add($_) @@ -111,6 +115,7 @@ Function Print-Help { Write-Output "-H --Help Display this help message and exit" Write-Output "--All Install all exotic libraries" Write-Output "--DontClean Skip cleanup , leave the downloaded and extracted archive in the temp folder" + Write-Output "--GccLib2Clang Make c and c++ header in gcc installation available for clang" Write-Output "--InstallFolder=[FOLDER] Specify the folder to install the library into, default is /usr/local/include" Write-Output "--TmpFolder=[FOLDER] Specify the folder to download archive and tmp files, default is /tmp/" Write-Output "--BaseBranch=[BRANCH] Specify the base branch to download from, default is 'main'" @@ -126,6 +131,28 @@ Function Print-Help { Write-Output "`& `$([scriptblock]::Create((New-Object Net.WebClient).DownloadString(`"https://exoticlibraries.github.io/magic/install.ps1`"))) --InstallFolder=./ https://github.com/nothings/stb@master" } +Function Copy-GCC-Libs-To-Clang { + Write-Output "Preparing to copy the libs and include files from Mingw GCC installation to LLVM Clang folder" + $GCC_INCLUDE_FOLDER=[System.IO.Directory]::GetParent($(Find-Include-Folder-With-Command "gcc -v")).FullName + $CLANG_INCLUDE_FOLDER=[System.IO.Directory]::GetParent($(Find-Include-Folder-With-Command "clang -v")).FullName + If ( -not [System.IO.Directory]::Exists($GCC_INCLUDE_FOLDER)) { + Fail-With-Message "The gcc installation path '$_' does not exist" + } + If ( -not [System.IO.Directory]::Exists($CLANG_INCLUDE_FOLDER)) { + Fail-With-Message "The clang installation path '$_' does not exist" + } + If ([System.IO.Directory]::Exists("$GCC_INCLUDE_FOLDER/include")) { + robocopy /xc /xn /xo "$GCC_INCLUDE_FOLDER/include" "$CLANG_INCLUDE_FOLDER/include" + } + If ([System.IO.Directory]::Exists("$GCC_INCLUDE_FOLDER/lib")) { + robocopy /xc /xn /xo "$GCC_INCLUDE_FOLDER/lib" "$CLANG_INCLUDE_FOLDER/lib" + } + If ([System.IO.Directory]::Exists("$GCC_INCLUDE_FOLDER/lib32")) { + robocopy /xc /xn /xo "$GCC_INCLUDE_FOLDER/lib32" "$CLANG_INCLUDE_FOLDER/lib32" + } + Write-Output "Done setting up lib for clang from GCC" +} + Function Validate-Paths { If ($Global:INSTALLATION_PATHS.Count -eq 0) { If ($Global:IS_ADMIN -eq $False) { @@ -179,6 +206,7 @@ Function Find-Include-Folder-With-Command { If ($APath) { $Global:INSTALLATION_PATHS.Add($APath) } + Return $APath } Function Find-Include-Folder-With-Path { diff --git a/magic/install.sh b/magic/install.sh index 35e7a1a..265da90 100755 --- a/magic/install.sh +++ b/magic/install.sh @@ -34,7 +34,7 @@ VERSION=v2.0 LICENSE=MIT -YEAR=2021 +YEAR=2022 AUTHOR="Adewale Azeez" BASE_BRANCH=main SELECTED_LIBRARIES=() @@ -83,6 +83,10 @@ main() { elif [[ "--basebranch" == "$ARG_MATCH" ]]; then BASE_BRANCH=$EXTRACTED_ARG_VALUE + elif [[ "--gcclib2clang" == "$ARG_MATCH" ]]; then + copy_gcc_libs_to_clang + return + elif [[ "--all" == "$ARG_MATCH" ]]; then for LIBRARY in ${EXOTIC_LIBRARIES[@]}; do SELECTED_LIBRARIES+=($LIBRARY) @@ -119,6 +123,7 @@ print_help() { echo "-h --help Display this help message and exit" echo "--all Install all exotic libraries" echo "--dontclean Skip cleanup , leave the downloaded and extracted archive in the temp folder" + echo "--gcclib2clang Make c and c++ header in gcc installation available for clang" echo "--installfolder=[FOLDER] Specify the folder to install the library into, default is /usr/local/include" echo "--tmpfolder=[FOLDER] Specify the folder to download archive and tmp files, default is /tmp/" echo "--basebranch=[FOLDER] Specify the base branch to download from, default is 'main'" @@ -135,6 +140,10 @@ print_help() { exit 0 } +copy_gcc_libs_to_clang() { + echo "The '--gcclib2clang' command only performs on Windows" +} + validate_paths() { if [ ! -d "$INSTALLATION_PATH" ]; then fail_with_message "The installation path '$INSTALLATION_PATH' does not exist" diff --git a/pages/programs.md b/pages/programs.md index d2a8981..d8b970c 100644 --- a/pages/programs.md +++ b/pages/programs.md @@ -28,7 +28,7 @@ Bash, Powershell