myspaghetti / macos-virtualbox

Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox on x86 CPUs for Windows, Linux, and macOS
GNU General Public License v2.0
13.5k stars 1.12k forks source link

startup.nsh "Syntax" #181

Closed arrmo closed 4 years ago

arrmo commented 4 years ago

Hi,

Not so much a bug (I think ... 😄), but ... why in startup.nsh - handle fs0 (separately), then iterate over the rest? Why not just have a single loop, 0 through 5 (for example)?

Thanks!

myspaghetti commented 4 years ago

The EFI Internal Shell doesn't support for loops that start with 0. Crazy, I know.

arrmo commented 4 years ago

That is odd, but makes sense! I changed mine to 0, and it seems to work, but maybe I'm wrong ... LOL.

Thanks!

myspaghetti commented 4 years ago

Fails on VirtualBox 6.0.8 (EFI Interactive Shell 2.1)

FS0:\> cat test.nsh
@echo -off
for %n run (0 5)
  echo %n
endfor
FS0:\> test.nsh
5

Seems to work on VirtualBox 6.1.4 (EFI Interactive Shell 2.2)

FS0:\> test.nsh
0
1
2
3
4
5

Since the script still supports VirtualBox 6.0 I'll keep the workaround.

arrmo commented 4 years ago

That makes sense, and explains the difference - thanks!