From 20b7e2c77ee292003ea4009c7c98735fb0d9560b Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 14 Feb 2024 02:27:21 -0500 Subject: [PATCH] Fixed up build script order --- scripts/build.ps1 | 64 +++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index c14cb8f..1bc7b04 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -73,38 +73,7 @@ push-location $path_root $module_host = join-path $path_code 'host' $module_sectr = $path_code - function build-host - { - $executable = join-path $path_build ($project_name + '_host.exe') - $pdb = join-path $path_build ($project_name + '_host.pdb') - - $host_process_active = Get-Process | Where-Object {$_.Name -like 'sectr_host*'} - if ( $host_process_active ) { - write-host 'Skipping sectr_host build, process is active' - return - } - - $should_build = (check-ModuleForChanges $module_host) - if ( -not( $should_build)) { - write-host 'Skipping sectr_host build, module up to date' - return - } - - & $update_deps - - $build_args = @() - $build_args += $flag_build - $build_args += './host' - $build_args += $flag_output_path + $executable - $build_args += $flag_optimize_none - $build_args += $flag_debug - $build_args += $flag_pdb_name + $pdb - $build_args += $flag_subsystem + 'windows' - - write-host 'Building Host Module' - & $odin $build_args - } - build-host + & $update_deps function build-sectr { @@ -131,6 +100,37 @@ push-location $path_root } build-sectr + function build-host + { + $executable = join-path $path_build ($project_name + '_host.exe') + $pdb = join-path $path_build ($project_name + '_host.pdb') + + $host_process_active = Get-Process | Where-Object {$_.Name -like 'sectr_host*'} + if ( $host_process_active ) { + write-host 'Skipping sectr_host build, process is active' + return + } + + $should_build = (check-ModuleForChanges $module_host) + if ( -not( $should_build)) { + write-host 'Skipping sectr_host build, module up to date' + return + } + + $build_args = @() + $build_args += $flag_build + $build_args += './host' + $build_args += $flag_output_path + $executable + $build_args += $flag_optimize_none + $build_args += $flag_debug + $build_args += $flag_pdb_name + $pdb + $build_args += $flag_subsystem + 'windows' + + write-host 'Building Host Module' + & $odin $build_args + } + build-host + Pop-Location } build-prototype