Build/Build kJams script: Difference between revisions

From kJams Wiki
Jump to navigation Jump to search
No edit summary
replace WinAppHelper .app stubs with prlexec .command launchers
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
# go to your home folder
The coordinator ('''taurus''', a Mac VM on '''sugarbear''') cannot SSH into a Windows guest and land in the current GUI login session. On the Parallels '''hardware host''', <code>prlexec</code> runs a <code>.bat</code> inside that host's Windows guest desktop session (a visible cmd window).
# go to "Applications (Parallels)" -> "Windows 10 Applications"
 
# copy "Command Prompt" to the desktop
Mac wrappers are plain <code>.command</code> scripts in Perforce. They call <code>prlexec_win_gui.sh</code>. Do not copy Command Prompt.app or edit <code>AppParams.pva</code>.
# rename it "Build kJams"
 
# right click->Show Package Contents
Store the launchers here (this is what Python <code>open</code>s):
# edit "/Contents/Info.plist"
 
# change the "CFBundleGetInfoString" to end with:<br><pre>Z:\kJams\Development\xplat\proj\win\build.bat</pre>
<pre>xplat/proj/win/_scripts/</pre>
# change "CFBundleName" to:<br><pre>Build kJams</pre>
 
# edit "/Contents/Resources/English.lproj/InfoPlist.strings"
<code>prlexec</code> is part of Parallels Desktop Pro/Business (<code>/usr/local/bin/prlexec</code> on bobina and sugarbear).
# change both "CFBundleName" and "CFBundleDisplayName" to:<br><pre>Build kJams</pre>
 
# edit "/Contents/Resources/AppParams.pva"
== Machine map ==
# change "App Path" to:<br><pre>Z:\kJams\Development\xplat\proj\win\build.bat</pre>
 
# Close out, put this new "app" into /xplat/proj/win/
{| class="wikitable"
! 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 (<code>open publish.command</code>).
|-
| 32-bit Windows guest
| '''luna-pc'''
| Windows 10 VM on bobina. Reached only by running <code>prlexec</code> '''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. <code>is_initiator()</code> 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.
|}
 
== Scripts Python opens ==
 
Names are the '''Windows guest''' that runs the work. Python builds them in <code>xplat.get_win_build_prlexec_name()</code> / <code>get_win_codesign_prlexec_name()</code>.
 
{| class="wikitable"
! Launcher (exact)
! Create / <code>open</code> on
! Target VM
! Windows bat
|-
| <code>Build kJams luna-pc.command</code>
| bobina
| luna-pc
| <code>Z:\depot\kJams\Development\xplat\proj\win\_scripts\build.bat</code>
|-
| <code>Build kJams taurus-pc.command</code>
| sugarbear
| taurus-pc
| <code>Z:\depot\kJams\Development\xplat\proj\win\_scripts\build.bat</code>
|-
| <code>code sign taurus-pc.command</code>
| sugarbear
| taurus-pc
| <code>Z:\depot\kJams\Development\xplat\proj\win\_scripts\code_sign_app_taurus.bat</code>
|-
| <code>code sign paths taurus-pc.command</code>
| sugarbear
| taurus-pc
| <code>Z:\depot\kJams\Development\xplat\proj\win\_scripts\code_sign_paths_taurus.bat</code>
|}
 
Shared engine: <code>prlexec_win_gui.sh</code>. It runs:
 
<pre>prlexec --vm "&lt;guest&gt;" cmd /c start cmd /c "&lt;bat&gt;"</pre>
 
<code>build.bat</code> picks VS 2019 on <code>LUNA-PC</code> and VS 2022 elsewhere, then runs <code>win_build.py</code>.
 
== Hop (what taurus actually does) ==
 
* '''Win32 build:''' taurus SSHes to '''bobina''' and <code>open</code>s <code>Build kJams luna-pc.command</code> → luna-pc runs <code>build.bat</code>.
* '''Win64 build:''' taurus SSHes to '''sugarbear''' and <code>open</code>s <code>Build kJams taurus-pc.command</code> → taurus-pc runs <code>build.bat</code>.
* '''USB code sign (from luna-pc or taurus Mac):''' SSH to '''sugarbear''' and <code>open</code> <code>code sign taurus-pc.command</code> or <code>code sign paths taurus-pc.command</code>.
* '''Mac32:''' taurus SSHes to '''luna''' and <code>open</code>s <code>publish.command</code> / <code>rogue.command</code> (no prlexec).
* '''Mac64:''' taurus spawns a local Terminal worker with <code>KJAMS_WORKER=1</code>.
 
Manual check from sugarbear:
 
<pre>
open "/Volumes/Developer/depot/kJams/Development/xplat/proj/win/_scripts/Build kJams taurus-pc.command"
</pre>
 
After a submit on pandora, always <code>p4 sync</code> '''taurus''' (and taurus-pc's <code>Z:\depot</code>). sugarbear <code>open</code>s taurus's disk.
 
== See also ==
 
* Depot docs: <code>Development/documentation/01_Infrastructure_Overview.md</code>
* <code>Development/xplat/proj/win/_scripts/README.md</code>
* <code>CF/python/xplat.py</code> — <code>guest_to_host()</code>, <code>get_win_build_prlexec_name()</code>

Latest revision as of 00:22, 8 September 2026

The coordinator (taurus, a Mac VM on sugarbear) cannot SSH into a Windows guest and land in the current GUI login session. On the Parallels hardware host, prlexec runs a .bat inside that host's Windows guest desktop session (a visible cmd window).

Mac wrappers are plain .command scripts in Perforce. They call prlexec_win_gui.sh. Do not copy Command Prompt.app or edit AppParams.pva.

Store the launchers here (this is what Python opens):

xplat/proj/win/_scripts/

prlexec is part of Parallels Desktop Pro/Business (/usr/local/bin/prlexec on bobina and sugarbear).

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 running prlexec 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.

Scripts Python opens

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

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

Shared engine: prlexec_win_gui.sh. It runs:

prlexec --vm "<guest>" cmd /c start cmd /c "<bat>"

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

Hop (what taurus actually does)

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

Manual check from sugarbear:

open "/Volumes/Developer/depot/kJams/Development/xplat/proj/win/_scripts/Build kJams taurus-pc.command"

After a submit on pandora, always p4 sync taurus (and taurus-pc's Z:\depot). sugarbear opens taurus's disk.

See also

  • Depot docs: Development/documentation/01_Infrastructure_Overview.md
  • Development/xplat/proj/win/_scripts/README.md
  • CF/python/xplat.pyguest_to_host(), get_win_build_prlexec_name()