2024-12-10 19:42:07 -08:00
|
|
|
$misc = Join-Path $PSScriptRoot 'helpers/misc.psm1'
|
|
|
|
Import-Module $misc
|
2023-08-20 09:31:24 -07:00
|
|
|
|
|
|
|
$build = Join-Path $PSScriptRoot 'build.ci.ps1'
|
|
|
|
|
|
|
|
if ( $IsWindows ) {
|
2024-12-13 21:10:07 -08:00
|
|
|
& $build release msvc debug base segmented singleheader unreal c_lib c_lib_static c_lib_dyn
|
2023-08-20 09:31:24 -07:00
|
|
|
}
|
2023-08-09 15:47:59 -07:00
|
|
|
|
2024-12-10 19:42:07 -08:00
|
|
|
$path_root = Get-ScriptRepoRoot
|
2024-12-10 23:04:22 -08:00
|
|
|
$path_docs = Join-Path $path_root docs
|
|
|
|
$path_base = Join-Path $path_root base
|
|
|
|
$path_c_library = Join-Path $path_root gen_c_library
|
2024-12-13 21:10:07 -08:00
|
|
|
$path_c_library_build = Join-Path $path_c_library build
|
2024-12-10 23:04:22 -08:00
|
|
|
$path_c_library_gen = Join-Path $path_c_library gen
|
|
|
|
$path_segmented = Join-Path $path_root gen_segmented
|
|
|
|
$path_segmented_gen = Join-Path $path_segmented gen
|
|
|
|
$path_singleheader = Join-Path $path_root gen_singleheader
|
|
|
|
$path_singleheader_gen = Join-Path $path_singleheader gen
|
|
|
|
$path_unreal = Join-Path $path_root gen_unreal_engine
|
|
|
|
$path_unreal_gen = Join-Path $path_unreal gen
|
|
|
|
$path_release = Join-Path $path_root release
|
|
|
|
$path_release_content = Join-Path $path_release content
|
2023-08-09 15:47:59 -07:00
|
|
|
|
|
|
|
if ( -not(Test-Path $path_release) ) {
|
|
|
|
New-Item -ItemType Directory -Path $path_release
|
|
|
|
}
|
|
|
|
|
2024-10-27 18:38:02 -07:00
|
|
|
function prep-ReleaseContent()
|
|
|
|
{
|
2023-08-09 15:47:59 -07:00
|
|
|
New-Item -ItemType Directory -Path $path_release_content
|
|
|
|
|
2024-10-27 18:38:02 -07:00
|
|
|
$license = Join-Path $path_root LICENSE
|
|
|
|
$readme_root = Join-Path $path_root Readme.md
|
|
|
|
$readme_docs = Join-Path $path_docs Readme.md
|
|
|
|
$readme_ast_design = Join-Path $path_docs AST_Design.md
|
|
|
|
$readme_ast_types = Join-Path $path_docs AST_Types.md
|
|
|
|
$readme_parsing = Join-Path $path_docs Parsing.md
|
|
|
|
$readme_parser_algo = Join-Path $path_docs Parser_Algo.md
|
2024-05-05 18:53:22 -07:00
|
|
|
|
2024-10-27 18:38:02 -07:00
|
|
|
Copy-Item $license -Destination (Join-Path $path_release_content "LICENSE")
|
|
|
|
Copy-Item $readme_root -Destination (Join-Path $path_release_content "Readme.md")
|
|
|
|
Copy-Item $readme_docs -Destination (Join-Path $path_release_content "Readme_Docs.md")
|
|
|
|
Copy-Item $readme_ast_design -Destination (Join-Path $path_release_content "AST_Design.md")
|
|
|
|
Copy-Item $readme_ast_types -Destination (Join-Path $path_release_content "AST_Types.md")
|
|
|
|
Copy-Item $readme_parsing -Destination (Join-Path $path_release_content "Parsing.md")
|
|
|
|
Copy-Item $readme_parser_algo -Destination (Join-Path $path_release_content "Parser_Algo.md")
|
|
|
|
}
|
2023-08-09 15:47:59 -07:00
|
|
|
|
|
|
|
# Singleheader
|
2024-10-27 18:38:02 -07:00
|
|
|
prep-ReleaseContent
|
2024-12-10 23:04:22 -08:00
|
|
|
Copy-Item -Verbose -Path $path_singleheader\Readme.md -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_singleheader_gen\gen.hpp -Destination $path_release_content
|
2023-08-09 15:47:59 -07:00
|
|
|
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_singleheader.zip -Force
|
2024-10-27 18:38:02 -07:00
|
|
|
Remove-Item -Path $path_release_content -Recurse
|
2023-08-09 15:47:59 -07:00
|
|
|
|
|
|
|
# Segmented
|
2024-10-27 18:38:02 -07:00
|
|
|
prep-ReleaseContent
|
2024-12-10 23:04:22 -08:00
|
|
|
Copy-Item -Verbose -Path $path_segmented\Readme.md -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_segmented_gen\* -Destination $path_release_content
|
2024-12-10 19:42:07 -08:00
|
|
|
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_segmented.zip -Force
|
2024-10-27 18:38:02 -07:00
|
|
|
Remove-Item -Path $path_release_content -Recurse
|
2024-10-25 02:01:37 -07:00
|
|
|
|
|
|
|
# Unreal
|
2024-10-27 18:38:02 -07:00
|
|
|
prep-ReleaseContent
|
2024-12-10 23:04:22 -08:00
|
|
|
Copy-Item -Verbose -Path $path_unreal\Readme.md -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_unreal_gen\* -Destination $path_release_content
|
2024-10-25 02:01:37 -07:00
|
|
|
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_unreal.zip -Force
|
2024-10-27 18:38:02 -07:00
|
|
|
Remove-Item -Path $path_release_content -Recurse
|
2024-10-27 15:58:37 -07:00
|
|
|
|
2024-12-10 19:42:07 -08:00
|
|
|
# C Library Singleheader
|
|
|
|
prep-ReleaseContent
|
2024-12-10 23:04:22 -08:00
|
|
|
Copy-Item -Verbose -Path $path_c_library\Readme.md -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen_singleheader.h -Destination $path_release_content\gen.h
|
2024-12-13 21:10:07 -08:00
|
|
|
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_c11_singleheader.zip -Force
|
2024-12-10 19:42:07 -08:00
|
|
|
Remove-Item -Path $path_release_content -Recurse
|
|
|
|
|
|
|
|
# C Library Segmented
|
|
|
|
prep-ReleaseContent
|
2024-12-10 23:04:22 -08:00
|
|
|
Copy-Item -Verbose -Path $path_c_library\Readme.md -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen.dep.c -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen.dep.h -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen.c -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen.h -Destination $path_release_content
|
|
|
|
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_c11_segmented.zip -Force
|
2024-12-10 19:42:07 -08:00
|
|
|
Remove-Item -Path $path_release_content -Recurse
|
|
|
|
|
2024-12-13 21:10:07 -08:00
|
|
|
# C Library Segmented
|
|
|
|
prep-ReleaseContent
|
|
|
|
Copy-Item -Verbose -Path $path_c_library\Readme.md -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen.dep.c -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen.dep.h -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen.c -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_gen\gen.h -Destination $path_release_content
|
|
|
|
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_c11_segmented.zip -Force
|
|
|
|
Remove-Item -Path $path_release_content -Recurse
|
|
|
|
|
|
|
|
# C Lib Static & Dyanmic Libs
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_build\gencpp_c11.lib -Destination $path_release
|
|
|
|
Copy-Item -Verbose -Path $path_c_library_build\gencpp_c11.dll -Destination $path_release
|
|
|
|
|
2024-12-10 19:42:07 -08:00
|
|
|
# Base
|
2024-10-27 15:58:37 -07:00
|
|
|
|
2024-10-27 18:38:02 -07:00
|
|
|
prep-ReleaseContent
|
2024-12-10 19:42:07 -08:00
|
|
|
Copy-Item -Verbose -Path $path_base\gen.hpp -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_base\gen.cpp -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_base\gen.dep.hpp -Destination $path_release_content
|
|
|
|
Copy-Item -Verbose -Path $path_base\gen.dep.cpp -Destination $path_release_content
|
2024-12-16 18:48:01 -08:00
|
|
|
Copy-Item -Verbose -Path $path_base\auxiliary\builder.hpp -Destination $path_release_content\auxiliary
|
|
|
|
Copy-Item -Verbose -Path $path_base\auxiliary\builder.cpp -Destination $path_release_content\auxiliary
|
|
|
|
Copy-Item -Verbose -Path $path_base\auxiliary\scanner.hpp -Destination $path_release_content\auxiliary
|
|
|
|
Copy-Item -Verbose -Path $path_base\auxiliary\scanner.cpp -Destination $path_release_content\auxiliary
|
2024-10-27 18:38:02 -07:00
|
|
|
|
|
|
|
New-Item -ItemType Directory -Force -Path "$path_release_content\components"
|
|
|
|
New-Item -ItemType Directory -Force -Path "$path_release_content\components\gen"
|
|
|
|
New-Item -ItemType Directory -Force -Path "$path_release_content\dependencies"
|
|
|
|
New-Item -ItemType Directory -Force -Path "$path_release_content\enums"
|
|
|
|
New-Item -ItemType Directory -Force -Path "$path_release_content\helpers"
|
|
|
|
|
2024-12-10 23:04:22 -08:00
|
|
|
Get-ChildItem -Verbose -Path "$path_base\components\*" -Include *.cpp,*.hpp | Copy-Item -Verbose -Destination "$path_release_content\components"
|
|
|
|
Get-ChildItem -Verbose -Path "$path_base\components\gen\*" -Include *.cpp,*.hpp | Copy-Item -Verbose -Destination "$path_release_content\components\gen"
|
|
|
|
Get-ChildItem -Verbose -Path "$path_base\dependencies\*" -Include *.cpp,*.hpp | Copy-Item -Verbose -Destination "$path_release_content\dependencies"
|
|
|
|
Get-ChildItem -Verbose -Path "$path_base\enums\*" -Include *.csv | Copy-Item -Verbose -Destination "$path_release_content\enums"
|
|
|
|
Get-ChildItem -Verbose -Path "$path_base\helpers\*" -Include *.cpp,*.hpp | Copy-Item -Verbose -Destination "$path_release_content\helpers"
|
2023-08-09 15:47:59 -07:00
|
|
|
|
2024-12-10 19:42:07 -08:00
|
|
|
Compress-Archive -Path $path_release_content\** -DestinationPath $path_release\gencpp_base.zip -Force
|
2023-08-09 15:47:59 -07:00
|
|
|
Remove-Item -Path $path_release_content -Recurse
|