Build/Build kJams script

From kJams Wiki
Revision as of 20:03, 7 September 2026 by Dave (talk | contribs) (remove leftover stub templates; depot keeps only the .bat files)
Jump to navigation Jump to search

The coordinator (taurus, a Mac VM on sugarbear) cannot SSH into a Windows guest and land in the current GUI login session. Parallels "Windows Apps" (WinAppHelper stubs) are Mac .app bundles that, when opened on the hardware host, launch a .bat inside that host's Windows guest session.

Create each stub on the hardware that owns the VM (bobina for luna-pc, sugarbear for taurus-pc). Do not create them on pandora. The VM UUID is baked into AppParams.pva; a stub made on the wrong Mac will not talk to the build guest.

Store finished stubs here (this is what Python opens):

xplat/proj/win/_scripts/

Machine map

Role Name What it is
Dev workstation pandora Dave's personal Mac. Not a release-build host. Qt Creator / MCP only.
32-bit hardware bobina Intel Mac. Hosts luna + luna-pc. Perpetual only.
32-bit Mac guest luna Mojave VM on bobina. Coordinator SSHes here directly (open publish.command).
32-bit Windows guest luna-pc Windows 10 VM on bobina. Reached only by opening a WinAppHelper on bobina.
64-bit hardware sugarbear ARM Mac. Hosts taurus + taurus-pc. Perpetual + subscription. USB code-sign token lives on taurus-pc.
Coordinator / 64-bit Mac guest taurus Mac VM on sugarbear. is_initiator() is hardcoded to this host. Launches luna, luna-pc, taurus-pc, and a local Mac worker.
64-bit Windows guest taurus-pc Windows VM on sugarbear. Win64 compile + USB signing for both 32- and 64-bit.

Apps Python opens

Names are the Windows guest that runs the work. Python builds them in xplat.get_win_build_apphelper_name() / get_win_codesign_apphelper_name().

Bundle name (exact) Create / open on Target VM App Path
Build kJams luna-pc.app bobina luna-pc Z:\depot\kJams\Development\xplat\proj\win\_scripts\build.bat
Build kJams taurus-pc.app sugarbear taurus-pc Z:\depot\kJams\Development\xplat\proj\win\_scripts\build.bat
code sign taurus-pc.app sugarbear taurus-pc Z:\depot\kJams\Development\xplat\proj\win\_scripts\code_sign_app_taurus.bat
code sign paths taurus-pc.app sugarbear taurus-pc Z:\depot\kJams\Development\xplat\proj\win\_scripts\code_sign_paths_taurus.bat

build.bat picks VS 2019 on LUNA-PC and VS 2022 elsewhere, then runs win_build.py.

Recipe (one stub)

Do this on bobina (for luna-pc) or on sugarbear (for taurus-pc). The Windows guest must be running and logged into the GUI session you want the build to use.

  1. On the hardware host, open the Parallels "Windows applications" folder for that guest (bobina: luna-pc Applications; sugarbear: taurus-pc Applications).
    1. If you cannot find it: Parallels → Configure → Options → Applications → enable "Show Windows applications folder in Dock". Dock icon → Reveal in Finder.
  2. Copy Command Prompt to the Desktop.
  3. Rename the copy to the exact bundle name from the table (without .app if Finder hides it), e.g. Build kJams luna-pc.
  4. Right-click → Show Package Contents.
  5. Edit Contents/Info.plist:
    • CFBundleGetInfoString must end with the App Path from the table (the Z:\...\ _scripts\....bat line).
    • CFBundleName = the exact bundle name without .app.
  6. Edit Contents/Resources/English.lproj/InfoPlist.strings: set both CFBundleName and CFBundleDisplayName to that same name.
  7. Edit Contents/Resources/AppParams.pva: set APP Path (or App Path) to the same Z:\... bat path. Confirm VM Name is luna-pc or taurus-pc as appropriate.
  8. Move the finished .app into /Volumes/Developer/depot/kJams/Development/xplat/proj/win/_scripts/ (same path on the host via the Developer share).
  9. Repeat for each row in the table (four stubs total: one on bobina, three on sugarbear).
  10. After creating them, add the new bundles to Perforce on the machine where you created them (or copy the bundle onto pandora's depot tree and p4 add there).

Hop (what taurus actually does)

  • Win32 build: taurus SSHes to bobina and opens Build kJams luna-pc.app → luna-pc runs build.bat.
  • Win64 build: taurus SSHes to sugarbear and opens Build kJams taurus-pc.app → taurus-pc runs build.bat.
  • USB code sign (from luna-pc or taurus Mac): SSH to sugarbear and open code sign taurus-pc.app or code sign paths taurus-pc.app.
  • Mac32: taurus SSHes to luna and opens publish.command / rogue.command (no WinAppHelper).
  • Mac64: taurus spawns a local Terminal worker with KJAMS_WORKER=1.

See also

  • Depot docs: Development/documentation/01_Infrastructure_Overview.md
  • CF/python/xplat.pyguest_to_host(), get_win_build_apphelper_name()