Ignore thirdparty and toolchain directories & updates to build scripts
This commit is contained in:
parent
425a642fd3
commit
3b395f3356
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,3 +9,5 @@ Sectr.sublime-project
|
||||
Sectr.sublime-workspace
|
||||
ols.json
|
||||
.vscode/settings.json
|
||||
thirdparty
|
||||
toolchain
|
||||
|
@ -1,3 +1,64 @@
|
||||
function clone-gitrepo { param( [string] $path, [string] $url )
|
||||
if (test-path $path) {
|
||||
# git -C $path pull
|
||||
}
|
||||
else {
|
||||
Write-Host "Cloning $url ..."
|
||||
git clone $url $path
|
||||
}
|
||||
}
|
||||
|
||||
function Update-GitRepo
|
||||
{
|
||||
param( [string] $path, [string] $url, [string] $build_command )
|
||||
|
||||
if ( $build_command -eq $null ) {
|
||||
write-host "Attempted to call Update-GitRepo without build_command specified"
|
||||
return
|
||||
}
|
||||
|
||||
$repo_name = $url.Split('/')[-1].Replace('.git', '')
|
||||
|
||||
$last_built_commit = join-path $path_build "last_built_commit_$repo_name.txt"
|
||||
if ( -not(test-path -Path $path))
|
||||
{
|
||||
write-host "Cloining repo from $url to $path"
|
||||
git clone $url $path
|
||||
|
||||
write-host "Building $url"
|
||||
push-location $path
|
||||
& "$build_command"
|
||||
pop-location
|
||||
|
||||
git -C $path rev-parse HEAD | out-file $last_built_commit
|
||||
$script:binaries_dirty = $true
|
||||
write-host
|
||||
return
|
||||
}
|
||||
|
||||
git -C $path fetch
|
||||
$latest_commit_hash = git -C $path rev-parse '@{u}'
|
||||
$last_built_hash = if (Test-Path $last_built_commit) { Get-Content $last_built_commit } else { "" }
|
||||
|
||||
if ( $latest_commit_hash -eq $last_built_hash ) {
|
||||
write-host
|
||||
return
|
||||
}
|
||||
|
||||
write-host "Build out of date for: $path, updating"
|
||||
write-host 'Pulling...'
|
||||
git -C $path pull
|
||||
|
||||
write-host "Building $url"
|
||||
push-location $path
|
||||
& $build_command
|
||||
pop-location
|
||||
|
||||
$latest_commit_hash | out-file $last_built_commit
|
||||
$script:binaries_dirty = $true
|
||||
write-host
|
||||
}
|
||||
|
||||
function verify-path { param( $path )
|
||||
if (test-path $path) {return $true}
|
||||
|
||||
|
@ -34,79 +34,16 @@ $result = verify-path $path_toolchain
|
||||
|
||||
$binaries_dirty = $false
|
||||
|
||||
function Update-GitRepo
|
||||
{
|
||||
param( [string] $path, [string] $url, [string] $build_command )
|
||||
|
||||
if ( $build_command -eq $null ) {
|
||||
write-host "Attempted to call Update-GitRepo without build_command specified"
|
||||
return
|
||||
}
|
||||
|
||||
$repo_name = $url.Split('/')[-1].Replace('.git', '')
|
||||
|
||||
$last_built_commit = join-path $path_build "last_built_commit_$repo_name.txt"
|
||||
if ( -not(test-path -Path $path))
|
||||
{
|
||||
write-host "Cloining repo from $url to $path"
|
||||
git clone $url $path
|
||||
|
||||
write-host "Building $url"
|
||||
push-location $path
|
||||
& "$build_command"
|
||||
pop-location
|
||||
|
||||
git -C $path rev-parse HEAD | out-file $last_built_commit
|
||||
$script:binaries_dirty = $true
|
||||
write-host
|
||||
return
|
||||
}
|
||||
|
||||
git -C $path fetch
|
||||
$latest_commit_hash = git -C $path rev-parse '@{u}'
|
||||
$last_built_hash = if (Test-Path $last_built_commit) { Get-Content $last_built_commit } else { "" }
|
||||
|
||||
if ( $latest_commit_hash -eq $last_built_hash ) {
|
||||
write-host
|
||||
return
|
||||
}
|
||||
|
||||
write-host "Build out of date for: $path, updating"
|
||||
write-host 'Pulling...'
|
||||
git -C $path pull
|
||||
|
||||
write-host "Building $url"
|
||||
push-location $path
|
||||
& $build_command
|
||||
pop-location
|
||||
|
||||
$latest_commit_hash | out-file $last_built_commit
|
||||
$script:binaries_dirty = $true
|
||||
write-host
|
||||
}
|
||||
|
||||
push-location $path_thirdparty
|
||||
|
||||
Update-GitRepo -path $path_odin -url $url_odin_repo -build_command '.\scripts\build.ps1'
|
||||
Update-GitRepo -path $path_sokol -url $url_sokol -build_command '.\build_windows.ps1'
|
||||
Update-GitRepo -path $path_harfbuzz -url $url_harfbuzz -build_command '.\scripts\build.ps1'
|
||||
|
||||
function clone-gitrepo { param( [string] $path, [string] $url )
|
||||
if (test-path $path) {
|
||||
# git -C $path pull
|
||||
}
|
||||
else {
|
||||
Write-Host "Cloning $url ..."
|
||||
git clone $url $path
|
||||
}
|
||||
}
|
||||
|
||||
clone-gitrepo $path_backtrace $url_backtrace_repo
|
||||
clone-gitrepo $path_freetype $url_freetype
|
||||
clone-gitrepo $path_ini_parser $url_ini_parser
|
||||
clone-gitrepo $path_ini_parser $url_ini_parser
|
||||
clone-gitrepo $path_sokol_tools $url_sokol_tools
|
||||
|
||||
Update-GitRepo -path $path_odin -url $url_odin_repo -build_command '.\scripts\build.ps1'
|
||||
Update-GitRepo -path $path_sokol -url $url_sokol -build_command '.\build_windows.ps1'
|
||||
Update-GitRepo -path $path_harfbuzz -url $url_harfbuzz -build_command '.\scripts\build.ps1'
|
||||
|
||||
$path_vendor = join-path $path_odin 'vendor'
|
||||
$path_vendor_raylib = join-path $path_vendor 'raylib'
|
||||
$path_freetype_dlls = join-path $path_freetype 'binaries/release'
|
||||
@ -114,6 +51,8 @@ $path_harfbuzz_dlls = join-path $path_harfbuzz 'lib/win64'
|
||||
$path_raylib_dlls = join-path $path_vendor_raylib 'windows'
|
||||
$path_sokol_dlls = join-path $path_thirdparty 'sokol'
|
||||
|
||||
push-location $path_thirdparty
|
||||
|
||||
if ( $binaries_dirty -or $true )
|
||||
{
|
||||
$third_party_dlls = Get-ChildItem -path $path_harfbuzz_dlls -Filter '*.dll'
|
||||
|
1
thirdparty/backtrace
vendored
1
thirdparty/backtrace
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 72655dab029815cdf3f3ad962ed99416e77848b6
|
1
thirdparty/freetype
vendored
1
thirdparty/freetype
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 197a1c221ba7015f8d01dc52b108d8f086115999
|
1
thirdparty/harfbuzz
vendored
1
thirdparty/harfbuzz
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 1bc1416645610dcf133a70722ae0a78fd179274e
|
1
thirdparty/ini
vendored
1
thirdparty/ini
vendored
@ -1 +0,0 @@
|
||||
Subproject commit dc9454d49b26d5df3305d5698971b81414e534c4
|
1
thirdparty/sokol
vendored
1
thirdparty/sokol
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 78ddcd8c83668fe388f45687d1ac4d4d8837adff
|
1
thirdparty/sokol-tools
vendored
1
thirdparty/sokol-tools
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 3162485457dbe6c7ca8d145bb26db172aed3e44e
|
@ -1 +0,0 @@
|
||||
Subproject commit fe4d6cbe5a85f31d7494f602f2868557da22b253
|
Loading…
x
Reference in New Issue
Block a user