Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

55
LINES

< > BotCompany Repo | #1023951 // agi.blue Standalone with GUI [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (15103L/115K).

!7

!include once #1002615 // master()

sS vmArgs = "-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC";

// Web Auth, Cookies, agi.blue
static LS seedBots = ll(#1002590, #1002157, #1023558);

static LS initialModuleIDs = ll(
  "#1018866/SystemPrintLog",
  "#1019954/TaskBar_dev",
  "#1023954/AgiBlueControlPanel"
);

!include #1002576 // Web Serving
!include #1002578 // Eleu Core
!include #1013904 // Eleu web socket

static int[] webServerPorts = {8080};
static int[] httpsPorts = {};

sbool started;

p {
  becomeBotVMIfFirst();
  homePageBotID = #1023558;
  
  runWithUserHomeAndParams(#1016478, actualUserDir("JavaX-Virtual/agi.blue"),
    initialModules_override := voidfunc(O os) {
      dm_makeOrShowModules(initialModuleIDs)
    },
    background := #1101701,
    mainIconID := #1101704);
}

svoid startEleu {
  if (started) ret;
  started = true;
  
  webInit();
  
  eleu_webSocket_init();
  
  if (nempty(httpsPorts)) pcall {
    File keystore = firstFileThatExists(
      javaxSecretDir("keystore.p12"),
      secretProgramFile(programID(), "keystore.jks"));
    S pass = loadSecretTextFileMandatory("keystore-pass").trim();
    serveHttpsWithWebsockets_multiplePorts(keystore, pass, eleu_webSocket_handler(), httpsPorts);
  }
  
  coreInit();
  for (S id : seedBots) call(getDispatcher(), 'addSeedBot, id);
}

Author comment

Began life as a copy of #1013896

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

-
Snippet ID: #1023951
Snippet name: agi.blue Standalone with GUI [OK]
Eternal ID of this version: #1023951/17
Text MD5: 22fd3de67ad39c77b1b13743bf033ab8
Transpilation MD5: da73073fc7a5e6f5cc181d08aed94275
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-14 13:25:21
Source code size: 1388 bytes / 55 lines
Pitched / IR pitched: No / No
Views / Downloads: 339 / 1109
Version history: 16 change(s)
Referenced in: