Browse Source

unix style path separator

alex.kopachov 2 years ago
parent
commit
9512d56ad4
2 changed files with 7 additions and 7 deletions
  1. 2 2
      build.ps1
  2. 5 5
      fbt.ps1

+ 2 - 2
build.ps1

@@ -37,7 +37,7 @@ Push-Location $PSScriptRoot
 if (!(Test-Path -PathType Container "build")) {
 if (!(Test-Path -PathType Container "build")) {
     New-Item -ItemType Directory -Path "build"
     New-Item -ItemType Directory -Path "build"
 } else {
 } else {
-    Remove-Item "build\*" -Recurse -Force
+    Remove-Item "build/*" -Recurse -Force
 }
 }
 
 
 function Build-Run {
 function Build-Run {
@@ -72,7 +72,7 @@ function Build-Run {
 
 
         $build_output_artifact = Join-Path $build_output_folder "$($build_command.ArtifactName -replace '{FEATURES_SUFFIX}',$FeaturesSuffix)"
         $build_output_artifact = Join-Path $build_output_folder "$($build_command.ArtifactName -replace '{FEATURES_SUFFIX}',$FeaturesSuffix)"
 
 
-        Copy-Item "$build_path\$latest_dir\.extapps\totp.fap" -Destination $build_output_artifact
+        Copy-Item "$build_path/$latest_dir/.extapps/totp.fap" -Destination $build_output_artifact
 
 
         Write-Host "Artifacts for $($build_command.Name) stored at $build_output_artifact"
         Write-Host "Artifacts for $($build_command.Name) stored at $build_output_artifact"
     }
     }

+ 5 - 5
fbt.ps1

@@ -23,7 +23,7 @@ else {
 
 
 Write-Host "Using $firmware_name firmware to run FBT"
 Write-Host "Using $firmware_name firmware to run FBT"
 
 
-$commandline_scons = "$firmware_path\site_scons\commandline.scons"
+$commandline_scons = "$firmware_path/site_scons/commandline.scons"
 ((Get-Content -Path $commandline_scons -Raw) -replace 'applications_user','..') | Set-Content -Path $commandline_scons -NoNewline
 ((Get-Content -Path $commandline_scons -Raw) -replace 'applications_user','..') | Set-Content -Path $commandline_scons -NoNewline
 
 
 $i = 1
 $i = 1
@@ -39,9 +39,9 @@ while ($i -lt $args.Count) {
         }
         }
         $i = $i + 2
         $i = $i + 2
     } elseif ($args[$i] -eq '--clean') {
     } elseif ($args[$i] -eq '--clean') {
-        $build_path = "$firmware_path\build"
+        $build_path = "$firmware_path/build"
         if (Test-Path -PathType Container $build_path) {
         if (Test-Path -PathType Container $build_path) {
-            Remove-Item "$build_path\*" -Recurse -Force
+            Remove-Item "$build_path/*" -Recurse -Force
         }
         }
         $i = $i + 1
         $i = $i + 1
     } else {
     } else {
@@ -51,11 +51,11 @@ while ($i -lt $args.Count) {
 }
 }
 
 
 if ($cpp_defines.Length -gt 0) {
 if ($cpp_defines.Length -gt 0) {
-    $cc_scons = "$firmware_path\site_scons\cc.scons"
+    $cc_scons = "$firmware_path/site_scons/cc.scons"
     (Get-Content -Path $cc_scons -Raw) -replace "(CPPDEFINES\s*=\s*\[)(([^]]\r?\n?)*)(\])", "`$1`"_GNU_SOURCE`", $($cpp_defines -join ", ")`$4" | Set-Content -Path $cc_scons -NoNewline
     (Get-Content -Path $cc_scons -Raw) -replace "(CPPDEFINES\s*=\s*\[)(([^]]\r?\n?)*)(\])", "`$1`"_GNU_SOURCE`", $($cpp_defines -join ", ")`$4" | Set-Content -Path $cc_scons -NoNewline
 }
 }
 
 
-$builtin_totp_path = "$firmware_path\applications\external\totp"
+$builtin_totp_path = "$firmware_path/applications/external/totp"
 if ((Test-Path -Path $builtin_totp_path) -eq $True) {
 if ((Test-Path -Path $builtin_totp_path) -eq $True) {
     Remove-Item $builtin_totp_path -Recurse
     Remove-Item $builtin_totp_path -Recurse
 }
 }