0
votes

I'm trying to script the download and build steps for the Chromium Source and related v8 code using the steps from Chromium Docs.

Powershell Run Command:

.\dl-chromium-src.ps1 -c stable -d E:\chromium-downloads -r E:\scripts

CMD Run Command:

powershell -NoProfile -ExecutionPolicy Bypass -File E:\scripts\dl-chromium-src.ps1 -c stable -d E:\chromium-downloads -r E:\scripts

When the script is run I keep getting an error during fetch call (Line 91). I think this has to do with the make steps, but I'm not sure.

Error message:

IOError: [Errno 2] No such file or directory: 'toolchain\\win_x86\\x86_64-nacl\\include\\c++\\4.4.3\\ext\\pb_ds\\detail\\binomial_heap_\\constructors_destructor_fn_imps.hpp'

I don't get this error when running fetch --no-history chromium from a powershell window manually. I only get the error when the script is run from command line (e.g. through Scheduled Tasks).

I'm assuming it had to do with the profile so I tried running the script without -NoProfile but that didn't help. I've also checked the environment variables from a Powershell command line and from within a Powershell script and they're the same. I've included the code and a more detailed stack trace below.

Code

Script Parameters

+--------------------+-------+-------------------+
|     Parameter      | Alias |    Valid Input    |
+--------------------+-------+-------------------+
| channel            | -c    | "beta" | "stable" |
| downloadsDirectory | -d    | <String>          |
| runningDirectory   | -r    | <String>          |
+--------------------+-------+-------------------+
1
Why are you using -Command when you're running a file? PowerShell -ExecutionPolicy Bypass -NoProfile -NoExit -File "PATH_TO_SCRIPT\dl-chromium.ps1" -c beta -d "DOWNLOAD_DIRECTORY" -s "ARCHIVE_DIRECTORY" -sz "C:\Program Files\7-Zip\7z.exe" -r "CURRENT_RUNN... - Compo
@Compo I want to use Tee-Object to show the output and write to a log file that has a generated date in the filename and I was having trouble doing that with the -File parameter. - WiteCastle
@Compo using the -File arg gives the same error. I've simplified the question and example code so it's easier to replicate. - WiteCastle

1 Answers

0
votes

The issue had to do with Windows long path name limitations. I updated the path length maximums for the OS and git, but these stack trace from above was from the python scripts. I couldn't figure out how to fix it for python so I ended up shortening my path names and then the script worked.