renderdoc script
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -80,3 +80,4 @@ fabric.properties
|
||||
|
||||
# cusotm
|
||||
build/deploy/
|
||||
build/capture/
|
||||
5
.idea/runConfigurations/deploy.xml
generated
Normal file
5
.idea/runConfigurations/deploy.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="deploy" type="PowerShellRunType" factoryName="PowerShell" scriptUrl="D:\Code\rust-engine\build\deploy.ps1" workingDirectory="D:\Code\rust-engine">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
5
.idea/runConfigurations/renderdoc.xml
generated
Normal file
5
.idea/runConfigurations/renderdoc.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="renderdoc" type="PowerShellRunType" factoryName="PowerShell" scriptUrl="D:\Code\rust-engine\build\renderdoc.ps1" workingDirectory="D:\Code\rust-engine">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,10 +1,11 @@
|
||||
$DEPLOY_DIR = "build/deploy"
|
||||
cd ..
|
||||
$DEPLOY_DIR = "build\deploy"
|
||||
cargo build --release
|
||||
if (-not (Test-Path $DEPLOY_DIR))
|
||||
{
|
||||
New-Item $DEPLOY_DIR -ItemType $DEPLOY_DIR
|
||||
}
|
||||
Copy-Item "target/release/rust-engine.exe" -Destination $DEPLOY_DIR
|
||||
Copy-Item "target\release\rust-engine.exe" -Destination $DEPLOY_DIR
|
||||
Copy-Item "models" -Destination $DEPLOY_DIR -Recurse -Force
|
||||
Copy-Item "shaders" -Destination $DEPLOY_DIR -Recurse -Force
|
||||
$current_dir = Get-Location
|
||||
explorer.exe "$current_dir\$DEPLOY_DIR"
|
||||
9
build/renderdoc.ps1
Normal file
9
build/renderdoc.ps1
Normal file
@@ -0,0 +1,9 @@
|
||||
cargo build
|
||||
$base_path = Get-Location
|
||||
$capture_dir = "$base_path\build\capture"
|
||||
renderdoccli.exe capture --working-dir $base_path --wait-for-exit --capture-file "$capture_dir\cap" "$base_path\target\debug\rust-engine.exe"
|
||||
$latest_capture_file = Get-ChildItem -Path $capture_dir | Sort-Object LastAccessTime -Descending | Select-Object -First 1
|
||||
$cap_name = $latest_capture_file.name
|
||||
$timespan = ((Get-Date) - $latest_capture_file.LastWriteTime)
|
||||
Write-Output "Opening $capture_dir\$cap_name from $timespan ago"
|
||||
renderdocgui.exe "$capture_dir\$cap_name"
|
||||
Reference in New Issue
Block a user