Build/Build kJams script: Difference between revisions

From kJams Wiki
Jump to navigation Jump to search
restore CFBundleIdentifier uniqueness from 2013 recipe; Python creator
match 2023 recipe: names, GetInfoString, APP Path; do not change CFBundleIdentifier
Line 78: Line 78:
== Sugarbear (taurus-pc, scripted) ==
== Sugarbear (taurus-pc, scripted) ==


The three taurus-pc stubs are created by <code>create_sugarbear_winapphelpers.py</code>, which follows this page's recipe (including the <code>CFBundleIdentifier</code> step below). sugarbear's <code>/usr/bin/python3</code> is an Xcode license stub, so run the script on '''taurus''' (it SSHes to sugarbear only to copy the live Command Prompt). The <code>.sh</code> wrapper on sugarbear hops to taurus.
The three taurus-pc stubs are created by <code>create_sugarbear_winapphelpers.py</code>, which follows the recipe below (the same steps as [[Special:PermanentLink/13270|December 2023]], with today's guest names and <code>_scripts</code> paths). sugarbear's <code>/usr/bin/python3</code> is an Xcode license stub, so run the script on '''taurus''' (it SSHes to sugarbear only to copy the live Command Prompt). The <code>.sh</code> wrapper on sugarbear hops to taurus.


<pre>
<pre>
Line 87: Line 87:
That copies the live Parallels '''Command Prompt''' app for taurus-pc (Helper Version 27 as of 2026-09) and points <code>APP Path</code> at the bats in the table. Precise recipe: depot <code>xplat/python/create_sugarbear_winapphelpers.md</code>.
That copies the live Parallels '''Command Prompt''' app for taurus-pc (Helper Version 27 as of 2026-09) and points <code>APP Path</code> at the bats in the table. Precise recipe: depot <code>xplat/python/create_sugarbear_winapphelpers.md</code>.


taurus-pc must be running. Do not run the script on pandora or bobina. After creating the stubs, copy them into the depot <code>xplat/proj/win/_scripts/</code> tree and '''submit''' — they belong in Perforce. <code>open</code> on sugarbear uses taurus's disk (sugarbear mounts it). Always <code>p4 sync</code> '''taurus''' after a pandora submit.
taurus-pc must be running. Do not run the script on pandora or bobina. After creating the stubs, copy them into the depot <code>xplat/proj/win\_scripts/</code> tree and '''submit''' — they belong in Perforce. <code>open</code> on sugarbear uses taurus's disk (sugarbear mounts it). Always <code>p4 sync</code> '''taurus''' after a pandora submit.


Bobina is not scripted: Parallels there is version-locked for luna.
Bobina is not scripted: Parallels there is version-locked for luna.
Line 93: Line 93:
== Recipe (one stub, manual) ==
== Recipe (one stub, manual) ==


Do this '''on bobina''' for <code>Build kJams luna-pc.app</code> (and anywhere you are not using the sugarbear script). The Windows guest must be running and logged into the GUI session you want the build to use. This is the original 2013 sequence; later edits dropped the identifier line.
This is the [[Special:PermanentLink/13270|2023 sequence]] that produced working apps. Do it '''on bobina''' for <code>Build kJams luna-pc.app</code> (and anywhere you are not using the sugarbear script). The Windows guest must be running and logged into the GUI session you want the build to use.


# On the hardware host, open the Parallels "Windows applications" folder for '''that''' guest (bobina: luna-pc Applications; sugarbear: taurus-pc Applications).
# On the hardware host, open the Parallels "Windows applications" folder for '''that''' guest (bobina: luna-pc Applications; sugarbear: taurus-pc Applications).
Line 101: Line 101:
# Right-click → Show Package Contents.
# Right-click → Show Package Contents.
# Edit <code>Contents/Info.plist</code>:
# Edit <code>Contents/Info.plist</code>:
#* <code>CFBundleGetInfoString</code> must '''end with''' the <code>App Path</code> from the table (the <code>Z:\...\ _scripts\....bat</code> line).
#* Change <code>CFBundleGetInfoString</code> so it '''ends with''' the <code>App Path</code> from the table (the <code>Z:\...\ _scripts\....bat</code> line).
#* <code>CFBundleName</code> = the exact bundle name without <code>.app</code>.
#* Change <code>CFBundleName</code> to the exact bundle name without <code>.app</code>.
#* <code>CFBundleIdentifier</code>: insert the stub name immediately after <code>com.parallels.winapp.</code> (hyphenate spaces; a reverse-DNS id cannot contain spaces). The 2013 page said: add <code>.Build kJams</code> just after <code>.winapp</code>. Example: <code>com.parallels.winapp.b7210c99…</code> becomes <code>com.parallels.winapp.Build-kJams-luna-pc.b7210c99…</code>. '''Do not leave the live Command Prompt identifier''' — Launch Services / Parallels will reuse that helper and ignore this stub's <code>APP Path</code>. Also set the identifier in <code>English.lproj/InfoPlist.strings</code> if that file has one.
# Edit <code>Contents/Resources/English.lproj/InfoPlist.strings</code>: set both <code>CFBundleName</code> and <code>CFBundleDisplayName</code> to that same name.
# Edit <code>Contents/Resources/English.lproj/InfoPlist.strings</code>: set both <code>CFBundleName</code> and <code>CFBundleDisplayName</code> to that same name.
# Edit <code>Contents/Resources/AppParams.pva</code>: set <code>APP Path</code> (or <code>App Path</code>) to the same <code>Z:\...</code> bat path. Confirm <code>VM Name</code> is luna-pc or taurus-pc as appropriate.
# Edit <code>Contents/Resources/AppParams.pva</code>: set <code>APP Path</code> (or <code>App Path</code>) to the same <code>Z:\...</code> bat path.
# Move the finished <code>.app</code> into <code>/Volumes/Developer/depot/kJams/Development/xplat/proj/win/_scripts/</code> (same path on the host via the Developer share).
# Close out, put the finished <code>.app</code> into <code>/Volumes/Developer/depot/kJams/Development/xplat/proj/win/_scripts/</code> (same path on the host via the Developer share).
# You only need the manual copy once on bobina (<code>Build kJams luna-pc.app</code>). sugarbear's three stubs come from the Python script above.
# You only need the manual copy once on bobina (<code>Build kJams luna-pc.app</code>). sugarbear's three stubs come from the Python script above.
Do '''not''' edit <code>CFBundleIdentifier</code>. Leave it as Parallels wrote it on Command Prompt.


== Hop (what taurus actually does) ==
== Hop (what taurus actually does) ==

Revision as of 23:27, 7 September 2026

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.

Sugarbear (taurus-pc, scripted)

The three taurus-pc stubs are created by create_sugarbear_winapphelpers.py, which follows the recipe below (the same steps as December 2023, with today's guest names and _scripts paths). sugarbear's /usr/bin/python3 is an Xcode license stub, so run the script on taurus (it SSHes to sugarbear only to copy the live Command Prompt). The .sh wrapper on sugarbear hops to taurus.

python3 /Volumes/Developer/depot/kJams/Development/xplat/python/create_sugarbear_winapphelpers.py --dry-run
python3 /Volumes/Developer/depot/kJams/Development/xplat/python/create_sugarbear_winapphelpers.py

That copies the live Parallels Command Prompt app for taurus-pc (Helper Version 27 as of 2026-09) and points APP Path at the bats in the table. Precise recipe: depot xplat/python/create_sugarbear_winapphelpers.md.

taurus-pc must be running. Do not run the script on pandora or bobina. After creating the stubs, copy them into the depot xplat/proj/win\_scripts/ tree and submit — they belong in Perforce. open on sugarbear uses taurus's disk (sugarbear mounts it). Always p4 sync taurus after a pandora submit.

Bobina is not scripted: Parallels there is version-locked for luna.

Recipe (one stub, manual)

This is the 2023 sequence that produced working apps. Do it on bobina for Build kJams luna-pc.app (and anywhere you are not using the sugarbear script). 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:
    • Change CFBundleGetInfoString so it ends with the App Path from the table (the Z:\...\ _scripts\....bat line).
    • Change CFBundleName to 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.
  8. Close out, put the finished .app into /Volumes/Developer/depot/kJams/Development/xplat/proj/win/_scripts/ (same path on the host via the Developer share).
  9. You only need the manual copy once on bobina (Build kJams luna-pc.app). sugarbear's three stubs come from the Python script above.

Do not edit CFBundleIdentifier. Leave it as Parallels wrote it on Command Prompt.

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
  • Development/xplat/python/create_sugarbear_winapphelpers.py
  • Development/xplat/python/create_sugarbear_winapphelpers.md
  • CF/python/xplat.pyguest_to_host(), get_win_build_apphelper_name()