typos and buildscript fixes & additions
This commit is contained in:
parent
b30f3c3466
commit
ddff1fcae6
12
Readme.md
12
Readme.md
@ -1,13 +1,14 @@
|
||||
# Sectr Prototype
|
||||
|
||||
This prototype aims to flesh out ideas I've wanted to explore futher when it came to code editing and tools for code in general.
|
||||
This prototype aims to flesh out ideas I've wanted to explore futher on code editing & related tooling.
|
||||
|
||||
The things to explore:
|
||||
|
||||
* 2D canvas for laying out code visualized in various types of ASTs
|
||||
* WYSIWYG frontend ASTs
|
||||
* Making AST editing as versatile as text editing.
|
||||
* High-performance generating a large amount of UI widget boxes with proper auto-layout & no perceptible rendering-lag or input lag for interactions (frametimes stable).
|
||||
* High-performance UI framework designed & built for AST editing.
|
||||
* Generating a large amount of UI widget boxes with proper auto-layout & no perceptible rendering-lag or input lag for interactions (frametimes stable).
|
||||
* Model-View-Controller interface between code managed by a 'backend' (both in memory and filesystem) and the UX composition (which has separate filesystem composition).
|
||||
|
||||
The project is so far in a "codebase boostrapping" phase.
|
||||
@ -19,17 +20,12 @@ The dependencies are:
|
||||
|
||||
* Odin Compiler (Slightly custom [fork](https://github.com/Ed94/Odin))
|
||||
* Added #region, #endregion directives support for editors
|
||||
* I added support for 'monlithic packages' or 'uniform-across-subdirectories packages'. It allows me to organize the main package with sub-directoreis.
|
||||
* I added support for 'monlithic packages' or 'uniform-across-subdirectories packages'. It allows me to organize the main package with sub-directories.
|
||||
* Odin repo's base, core, and vendor(raylib) libaries
|
||||
* An ini parser
|
||||
* backtrace
|
||||
* Powershell (if you want to use my build scripts)
|
||||
|
||||
The client(sectr) module's organization is relatively flat due to the nature of odin's compiler, not allowing for cyclic dependencies across modules, and modules can only be in one directory.
|
||||
This makes it difficult to unflatten, not something organic todo in a prototype...
|
||||
|
||||
I have the codebase by default in a non-idomatic layout that I stage to the compiler beforehand. There is a script(`scripts/gen_staged_compiler_codebase.ps1`) that stages a the idiomatic format of the codebase for the compiler to digest when `scripts/build.ps1` is run.
|
||||
|
||||
Major 'codebase modules':
|
||||
|
||||
* Engine : Main loop, logging, client interface for host, etc
|
||||
|
@ -8,7 +8,7 @@ Reserves the virtual memory spaces for the following:
|
||||
|
||||
Currently the prototype has hot-reload always enabled, eventually there will be conditional compliation to omit if when desired.
|
||||
*/
|
||||
package host
|
||||
package sectr_host
|
||||
|
||||
//region Grime & Dependencies
|
||||
import "base:runtime"
|
||||
|
2
ols.json
2
ols.json
@ -7,7 +7,7 @@
|
||||
}
|
||||
],
|
||||
"odin_command": "C:/projects/SectrPrototype/toolchain/Odin/odin.exe",
|
||||
"enable_document_symbols": false,
|
||||
"enable_document_symbols": true,
|
||||
"enable_fake_methods": true,
|
||||
"enable_format": false,
|
||||
"enable_hover": true,
|
||||
|
@ -17,6 +17,22 @@ $path_thirdparty = join-path $path_root 'thirdparty'
|
||||
$path_toolchain = join-path $path_root 'toolchain'
|
||||
$path_odin = join-path $path_toolchain 'odin'
|
||||
|
||||
#region Arguments
|
||||
$force = $null
|
||||
|
||||
# This is to be used when Negate's TB backend is working on odin. We'll not want to use clang by default from then on.
|
||||
$use_clang = $false
|
||||
|
||||
# This is a really lazy way of parsing the args, could use actual params down the line...
|
||||
|
||||
if ( $args ) { $args | ForEach-Object {
|
||||
switch ($_){
|
||||
"force" { $force = $true }
|
||||
"clang" { $clang = $true }
|
||||
}
|
||||
}}
|
||||
#endregion Arguments
|
||||
|
||||
if ( -not( test-path $path_build) ) {
|
||||
new-item -ItemType Directory -Path $path_build
|
||||
}
|
||||
@ -101,7 +117,6 @@ $msvc_link_default_base_address = 0x180000000
|
||||
push-location $path_root
|
||||
$update_deps = join-path $path_scripts 'update_deps.ps1'
|
||||
$odin_compiler = join-path $path_odin 'odin.exe'
|
||||
$raddbg = "C:/dev/raddbg/raddbg.exe"
|
||||
|
||||
function Invoke-WithColorCodedOutput { param( [scriptblock] $command )
|
||||
& $command 2>&1 | ForEach-Object {
|
||||
@ -124,6 +139,10 @@ push-location $path_root
|
||||
|
||||
$module_host = join-path $path_code 'host'
|
||||
$module_sectr = join-path $path_code 'sectr'
|
||||
if ($force){
|
||||
mark-ModuleDirty $module_sectr
|
||||
mark-ModuleDirty $module_host
|
||||
}
|
||||
|
||||
$pkg_collection_thirdparty = 'thirdparty=' + $path_thirdparty
|
||||
|
||||
@ -147,8 +166,8 @@ push-location $path_root
|
||||
}
|
||||
|
||||
write-host 'Building Sectr Module'
|
||||
$script:module_dll = join-path $path_build ( $project_name + '.dll' )
|
||||
$pdb = join-path $path_build ( $project_name + '.pdb' )
|
||||
$module_dll = join-path $path_build ( $project_name + '.dll' )
|
||||
$pdb = join-path $path_build ( $project_name + '.pdb' )
|
||||
|
||||
if (test-path $pdb) {
|
||||
remove-item $pdb
|
||||
@ -186,18 +205,11 @@ push-location $path_root
|
||||
# $build_args += $flag_sanitize_address
|
||||
# $build_args += $flag_sanitize_memory
|
||||
|
||||
$raddbg_args = @()
|
||||
$raddbg_args += $odin_compiler
|
||||
$raddbg_args += $build_args
|
||||
|
||||
if ( Test-Path $module_dll) {
|
||||
$module_dll_pre_build_hash = get-filehash -path $module_dll -Algorithm MD5
|
||||
}
|
||||
|
||||
# write-host $build_args
|
||||
|
||||
Invoke-WithColorCodedOutput -command { & $odin_compiler $build_args }
|
||||
# Invoke-WithColorCodedOutput -command { & $raddbg "$odin_compiler" "$build_args" }
|
||||
|
||||
if ( Test-Path $module_dll ) {
|
||||
$module_dll_post_build_hash = get-filehash -path $module_dll -Algorithm MD5
|
||||
@ -219,19 +231,19 @@ push-location $path_root
|
||||
|
||||
if ( $host_process_active ) {
|
||||
write-host 'Skipping sectr_host build, process is active'
|
||||
return $true
|
||||
return
|
||||
}
|
||||
|
||||
$dependencies_built = $script:sectr_build_code -ne $module_build_failed
|
||||
if ( -not $dependencies_built ) {
|
||||
write-host 'Skipping sectr_host build, dependencies failed to build'
|
||||
return $false
|
||||
return
|
||||
}
|
||||
|
||||
$should_build = (check-ModuleForChanges $module_host) -or ( $script:sectr_build_code -eq $module_built )
|
||||
if ( -not( $should_build)) {
|
||||
write-host 'Skipping sectr_host build, module up to date'
|
||||
return $true
|
||||
return
|
||||
}
|
||||
|
||||
if (test-path $pdb) {
|
||||
@ -268,24 +280,23 @@ push-location $path_root
|
||||
# $build_args += $flag_sanitize_address
|
||||
# $build_args += $flag_sanitize_memory
|
||||
|
||||
if ( Test-Path $module_dll) {
|
||||
$module_dll_pre_build_hash = get-filehash -path $module_dll -Algorithm MD5
|
||||
if ( Test-Path $executable) {
|
||||
$executable_pre_build_hash = get-filehash -path $executable -Algorithm MD5
|
||||
}
|
||||
|
||||
Invoke-WithColorCodedOutput { & $odin_compiler $build_args }
|
||||
|
||||
if ( Test-Path $module_dll ) {
|
||||
$module_dll_post_build_hash = get-filehash -path $module_dll -Algorithm MD5
|
||||
if ( Test-Path $executable ) {
|
||||
$executable_post_build_hash = get-filehash -path $executable -Algorithm MD5
|
||||
}
|
||||
|
||||
$built = ($module_dll_pre_build_hash -eq $null) -or ($module_dll_pre_build_hash.Hash -ne $module_dll_post_build_hash.Hash)
|
||||
$built = ($executable_pre_build_hash -eq $null) -or ($executable_pre_build_hash.Hash -ne $executable_post_build_hash.Hash)
|
||||
if ( -not $built ) {
|
||||
write-host 'Failed to build, marking module dirty'
|
||||
mark-ModuleDirty $module_sectr
|
||||
mark-ModuleDirty $module_host
|
||||
}
|
||||
return $built
|
||||
}
|
||||
$host_build_code = build-host
|
||||
build-host
|
||||
|
||||
Pop-Location # path_code
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ function check-ModuleForChanges
|
||||
}
|
||||
|
||||
$file_hashes = @{}
|
||||
get-childitem -path $path_module -file -Exclude $excludes | foreach-object {
|
||||
get-childitem -path $path_module -file -Exclude $excludes -Recurse | foreach-object {
|
||||
$id = $_.fullname
|
||||
$hash_info = get-filehash -path $id -Algorithm MD5
|
||||
$file_hashes[ $id ] = $hash_info.Hash
|
||||
|
2
thirdparty/backtrace
vendored
2
thirdparty/backtrace
vendored
@ -1 +1 @@
|
||||
Subproject commit 0896a908c70227fa3b1f09a29ab1879ae45ff732
|
||||
Subproject commit 72655dab029815cdf3f3ad962ed99416e77848b6
|
Loading…
Reference in New Issue
Block a user