Download Jar. Uses 5077K of libraries. Click here for Pure Java version (35433L/197K).
1 | // WELCOME!! This is THE PROGRAM YOU ARE LOOKING FOR. |
2 | |
3 | !7 |
4 | |
5 | //set flag OtherLoadableUtils. lib 1033861 |
6 | |
7 | // INCLUDE THE MAIN MODULE |
8 | !include #1033862 // Gazelle Screen Cam [dev version] |
9 | replace MainModule with GazelleScreenCam. |
10 | |
11 | !include early #1033891 // include GazelleHost early for flags like PingV3 |
12 | |
13 | //set flag InCore. |
14 | set flag NoJavaXJar. |
15 | set flag NoLocalSnippets. |
16 | set flag OurSyncCollections. |
17 | |
18 | sS windowTitle = "Gazelle 22"; |
19 | sS progIDForDBAndAutoUpdate = #1033860; |
20 | sbool pingSourceStrictMode; |
21 | |
22 | static GazelleHost host; |
23 | static MainModule client; |
24 | static ThreadPool threadPool; |
25 | |
26 | p { |
27 | loadableUtils.utils.__setJavaX(main.class); |
28 | standaloneInit(); |
29 | |
30 | ping_v3_setPingSourceMaker(-> { |
31 | //System.out.println("pingSourceMaker"); |
32 | if (pingSourceStrictMode) |
33 | fail("Strict mode - make a ping source first!!"); |
34 | ret new PingSource(threadPool, "legacy"); |
35 | }); |
36 | |
37 | threadPool = new ThreadPool(findIntArg cores(args, numberOfCores())); |
38 | print(threadPool); |
39 | //threadPool.verbose = true; |
40 | PingSource ps = new(threadPool, print("Starting Gazelle")); |
41 | ps.do(-> { |
42 | System.out.println("Pinging"); |
43 | ping(); |
44 | //if (true) fail("error test"); |
45 | |
46 | print("Pinged"); |
47 | |
48 | programID = progIDForDBAndAutoUpdate; |
49 | |
50 | // patch utils.preferredScreen |
51 | |
52 | preferredScreen = -> { |
53 | if (host == null) ret 0; |
54 | var stem = host.stem; |
55 | if (stem == null) ret 0; |
56 | int screen = max(0, screenNrOfWindow(mainWindow())); |
57 | ret screen; |
58 | }; |
59 | |
60 | // patch utils.showForm_makeFrame to use JDialog |
61 | // (to avoid dialogs being hidden behind always-on-top window) |
62 | |
63 | showForm_makeFrame = (title, panel) -> { |
64 | var dialog = new JDialog(mainWindow(), title); |
65 | setDialogContents(dialog, withMargin(panel)); |
66 | packWindow(dialog); |
67 | minWindowWidth(dialog, 400); |
68 | centerDialogOverOwner(dialog); |
69 | dialog.setVisible(true); |
70 | //setBounds(dialog, defaultNewFrameBounds()); |
71 | }; |
72 | |
73 | if (cic(args, "delete-session")) { |
74 | print("Deleting session (" + programDir(programID) + ")"); |
75 | clearConceptsOf(programID); |
76 | } |
77 | |
78 | // migrate classes for legacy databases |
79 | F1<S, Class> baseClassFinder = cast _defaultClassFinder(); |
80 | setDefaultClassFinder(func(S name) -> Class { |
81 | name = replacePrefix("loadableUtils.utils$", "main$", name); |
82 | //print("G22 class finder: " + name); |
83 | |
84 | if (eq(name, "main$Challenge")) { |
85 | print("Legacy Challenge converted!"); |
86 | ret Challenge; |
87 | } |
88 | |
89 | ret baseClassFinder.get(name); |
90 | }); |
91 | |
92 | host = new GazelleHost(threadPool, -> { |
93 | ret client = new MainModule; |
94 | }); |
95 | if (sameSnippetID(programID, #1033860)) |
96 | windowTitle += " dev"; |
97 | host.windowTitle = windowTitle; |
98 | host.run(args); |
99 | |
100 | if (!cic(args, "console")) { |
101 | print("Stopping System.out"); |
102 | printAlsoToSystemOut = false; |
103 | } |
104 | }); |
105 | print("aha."); |
106 | } |
107 | |
108 | static Window mainWindow() { ret host.stem.window; } |
109 | |
110 | static Map generalMap = syncMap(); |
Began life as a copy of #1033860
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): bhatertpkbcr, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034390 |
Snippet name: | Gazelle 22 Standalone [dev version, backup] |
Eternal ID of this version: | #1034390/1 |
Text MD5: | 09fa79e7c5cf97bceb9ef072364e5453 |
Transpilation MD5: | 25a75ba07f9b992de87f0f1d09d1e551 |
Author: | stefan |
Category: | javax / screen recognition |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-05 01:47:16 |
Source code size: | 3101 bytes / 110 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 192 / 718 |
Referenced in: | [show references] |