Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Thecarisma committed Dec 28, 2023
1 parent f9e4ae8 commit b285a26
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<span class="tech-used">Bash, Powershell</span><br>
<div class="links">
<a target="_blank" href="https://github.com/exoticlibraries/exoticlibraries.github.io/tree/main/magic">Github <i class="fas fa-external-link-alt"></i></a>
<a href="https://exoticlibraries.github.io/blog/Feb-2021/magic_scripts.html">Website <i class="fas fa-external-link-alt"></i></i></a>
<a href="https://exoticlibraries.github.io/blog/Feb-2022/magic_scripts.html">Website <i class="fas fa-external-link-alt"></i></i></a>
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions _static/css/exoticlibraries.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
border-top-left-radius: 5px;
}

.documentwrapper {
max-width: 60%;
}

.border-radius-top-right {
border-top-right-radius: 5px;
}
Expand Down
4 changes: 2 additions & 2 deletions _static/js/exoticlibraries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
{
Expand Down
4 changes: 2 additions & 2 deletions blog/Feb-2021/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@


Feb-2021
Feb-2022
----------

.. toctree::
:glob:

/blog/Feb-2021/*
/blog/Feb-2022/*


2 changes: 1 addition & 1 deletion blog/Feb-2021/magic_scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ into the currenct folder with a custom temporary directory
----

- Author: Adewale Azeez
- Date: 08 February, 2021
- Date: 08 February, 2022
2 changes: 1 addition & 1 deletion blog/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Exotic Libraries Blog
:maxdepth: 1

/blog/Sep-2020/index
/blog/Feb-2021/index
/blog/Feb-2022/index


2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
@@ -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()]
Expand Down
30 changes: 29 additions & 1 deletion magic/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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($_)
Expand Down Expand Up @@ -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'"
Expand All @@ -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) {
Expand Down Expand Up @@ -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 {
Expand Down
11 changes: 10 additions & 1 deletion magic/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

VERSION=v2.0
LICENSE=MIT
YEAR=2021
YEAR=2022
AUTHOR="Adewale Azeez"
BASE_BRANCH=main
SELECTED_LIBRARIES=()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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'"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pages/programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<span class="tech-used">Bash, Powershell</span><br>
<div class="links">
<a target="_blank" href="https://github.com/exoticlibraries/exoticlibraries.github.io/tree/main/magic">Github <i class="fas fa-external-link-alt"></i></a>
<a href="https://exoticlibraries.github.io/blog/Feb-2021/magic_scripts.html">Website <i class="fas fa-external-link-alt"></i></i></a>
<a href="https://exoticlibraries.github.io/blog/Feb-2022/magic_scripts.html">Website <i class="fas fa-external-link-alt"></i></i></a>
</div>
</div>
</div>
Expand Down

0 comments on commit b285a26

Please sign in to comment.