diff --git a/nodejs/public/resources/theta-agent/theta-agent-darwin-amd64 b/nodejs/public/resources/theta-agent/theta-agent-darwin-amd64 deleted file mode 100755 index 16c6c62..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-darwin-amd64 and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-darwin-arm64 b/nodejs/public/resources/theta-agent/theta-agent-darwin-arm64 deleted file mode 100755 index ca11ced..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-darwin-arm64 and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-linux-amd64 b/nodejs/public/resources/theta-agent/theta-agent-linux-amd64 deleted file mode 100755 index ec46c76..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-linux-amd64 and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-linux-arm64 b/nodejs/public/resources/theta-agent/theta-agent-linux-arm64 deleted file mode 100755 index 91ae337..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-linux-arm64 and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-linux-armv7 b/nodejs/public/resources/theta-agent/theta-agent-linux-armv7 deleted file mode 100755 index b72de73..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-linux-armv7 and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-tray-linux-amd64 b/nodejs/public/resources/theta-agent/theta-agent-tray-linux-amd64 deleted file mode 100755 index 14e8cb0..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-tray-linux-amd64 and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-tray-linux-arm64 b/nodejs/public/resources/theta-agent/theta-agent-tray-linux-arm64 deleted file mode 100755 index 4d9eeec..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-tray-linux-arm64 and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-tray-windows-amd64.exe b/nodejs/public/resources/theta-agent/theta-agent-tray-windows-amd64.exe deleted file mode 100755 index b87a843..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-tray-windows-amd64.exe and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-windows-amd64.exe b/nodejs/public/resources/theta-agent/theta-agent-windows-amd64.exe deleted file mode 100755 index bf17c7e..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-windows-amd64.exe and /dev/null differ diff --git a/nodejs/public/resources/theta-agent/theta-agent-windows-arm64.exe b/nodejs/public/resources/theta-agent/theta-agent-windows-arm64.exe deleted file mode 100755 index 3993c1a..0000000 Binary files a/nodejs/public/resources/theta-agent/theta-agent-windows-arm64.exe and /dev/null differ diff --git a/nodejs/views/directory.ejs b/nodejs/views/directory.ejs index 168baa8..9d322cb 100644 --- a/nodejs/views/directory.ejs +++ b/nodejs/views/directory.ejs @@ -2349,11 +2349,39 @@ } $('#agent-join-command').text(joinCmd); + // Windows: the installer is a GitHub release artifact (built by the + // theta-agent release workflow — nothing binary lives in this repo). It + // takes the same values as /SERVER_URL /JOIN_KEY command-line params. + const WIN_SETUP = 'theta-agent-2.1.0-windows-amd64-setup.exe'; + const WIN_SETUP_URL = `https://github.com/theta42/theta-agent/releases/latest/download/${WIN_SETUP}`; + function winInstallCmd(url, args) { + return [ + `$url = '${url}'`, + `$setup = "$env:TEMP\\ta-setup.exe"`, + `Invoke-WebRequest "${WIN_SETUP_URL}" -OutFile $setup`, + `Start-Process -Wait $setup -ArgumentList ${args}` + ].join('\n'); + } + let joinCmdWin; + if (mintedJoinKey) { + joinCmdWin = winInstallCmd(joinUrl, `'/SILENT', "/SERVER_URL=$url", '/JOIN_KEY=${mintedJoinKey}'`); + } else if (selectedKeyId) { + const k = agentJoinKeys.find(x => x.id === selectedKeyId); + joinCmdWin = `# Paste the full value of this key -- it was only shown when created.\n# If you no longer have it, create a new key above.\n` + winInstallCmd(joinUrl, `'/SILENT', "/SERVER_URL=$url", '/JOIN_KEY='`); + } else { + joinCmdWin = '# Create a join key above, or select one you already have the value for.'; + } + $('#agent-join-command-win').text(joinCmdWin); + const pubKey = (pendingEnrollment && pendingEnrollment.publicKey) || ''; const quickCmd = `curl -fsSL ${quickUrl}/resources/theta-agent/install.sh | sh -s -- --url "${quickUrl}" --token "${quickToken}"` + (pubKey ? ` --public-key "${pubKey}"` : ''); $('#agent-quick-command').text(quickCmd); + const quickCmdWin = winInstallCmd(quickUrl, + `'/SILENT', "/SERVER_URL=$url", '/AUTH_TOKEN=${quickToken}'` + (pubKey ? `, '/PUBLIC_KEY=${pubKey}'` : '')); + $('#agent-quick-command-win').text(quickCmdWin); + const customUrl = ($('#agent-custom-url').val() || window.location.origin).replace(/\/+$/, ''); const customToken = $('#agent-custom-token').val() || ''; const customLocation = $('#agent-custom-location').val() || 'default'; @@ -2388,8 +2416,11 @@ const b64Config = btoa(yamlStr); const customCmd = `curl -fsSL ${customUrl}/resources/theta-agent/install.sh | sh -s -- "${b64Config}"`; $('#agent-custom-command').text(customCmd); + const customCmdWin = winInstallCmd(customUrl, `'/SILENT', "/B64_CONFIG=${b64Config}"`); + $('#agent-custom-command-win').text(customCmdWin); } catch (e) { $('#agent-custom-command').text('Error encoding config to Base64'); + $('#agent-custom-command-win').text('Error encoding config to Base64'); } } @@ -2469,10 +2500,15 @@

+              
+              

               
+
@@ -2566,10 +2602,17 @@

           
+ +
+

+          
+
@@ -2645,11 +2688,16 @@

             
           
+          
+          

 
           
+