Skip to content

Commit 35800df

Browse files
ADDED: major changes
- logger window - project restructured - dependencies updates
1 parent b1e5521 commit 35800df

33 files changed

Lines changed: 1034 additions & 168 deletions

DarkModeDiscovery/Arkenstone.xcodeproj/project.pbxproj

Lines changed: 98 additions & 42 deletions
Large diffs are not rendered by default.

DarkModeDiscovery/DarkModeDiscovery/AppGlobals.swift

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ var CURRENT_LOCATION: String {
2828
return AppGlobals.currentLocation == nil ? DEFAULT_GEO_POINT : CURRENT_GEO_POINT
2929
}
3030

31+
var isHighSierra: Bool { // true HighSierra, false otherwise
32+
if #available(macOS 10.14, *) {
33+
return false
34+
} // For HighSierra.
35+
return true
36+
}
37+
3138
// MARK: - App Globals
3239

3340
struct AppGlobals {
@@ -72,3 +79,62 @@ struct AppGlobals {
7279
}
7380
}
7481
}
82+
83+
func loadJsonLogProfile(_ name: String) -> (status: Bool, info: String) {
84+
85+
if let path = Bundle.main.url(forResource: name, withExtension: "json") {
86+
if log.loadConfig(path), dmlog.loadConfig(path), geolog.loadConfig(path) {
87+
return (true, "Options successfully reseted")
88+
} else {
89+
return (false, "Failed to reset options")
90+
}
91+
} else {
92+
return (false, "Failed to create URL")
93+
}
94+
}
95+
96+
// MARK: - Other useful code
97+
98+
/*
99+
100+
func setMainWindow() {
101+
if let screen = NSScreen.main,
102+
NSApplication.shared.windows.first?.windowController is MainWindowController,
103+
var frame = NSApplication.shared.windows.first?.frame {
104+
105+
let height: CGFloat = 600 // Default main window height
106+
let width: CGFloat = 800 // Default main window width
107+
108+
let origin_x = screen.frame.size.width / 2 - width / 2
109+
let origin_y = screen.frame.size.height / 2 - height / 2
110+
111+
frame.size = NSSize(width: width, height: height)
112+
frame.origin = NSPoint(x: origin_x, y: origin_y)
113+
114+
NSApplication.shared.windows.first?.setFrame(frame, display: true)
115+
}
116+
}
117+
118+
*/
119+
120+
/*
121+
122+
var tiduint: UInt64 = 0
123+
pthread_threadid_np(nil, &tiduint)
124+
125+
let tid = "0x\(String(format: "%02x", tiduint))"
126+
127+
log.message("The app's start point... TID: \(tid)", .info)
128+
129+
NSLog("NSLog Start: The app's start point... TID: \(tid)")
130+
131+
if #available(macOS 11.0, *) {
132+
let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "network")
133+
logger.log("Logger Start: The app's start point... TID: \(tid)")
134+
}
135+
136+
let oslog = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "network")
137+
138+
os_log( "%{public}@", log: oslog,
139+
"os_log Start: The app's start point... TID: \(tid)")
140+
*/

DarkModeDiscovery/DarkModeDiscovery/Configuration/CPLConfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"category" : "Lover",
44
"turned" : "off",
55
"level" : 5,
6-
"output" : "standard",
6+
"output" : "custom",
77
"subsecond" : "nanosecond",
88
"tidnumber" : "decimal",
99
"format" : "short",
10-
"marks" : true,
10+
"marks" : false,
1111
"time" : false,
12-
"owner" : false,
12+
"owner" : true,
1313
"directives" : false,
1414
"debugIsInfo" : true
1515
}

DarkModeDiscovery/DarkModeDiscovery/Configuration/FirstPartyCode/PDMSupportingStar.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//
22
// PDMSupportingStar.swift
3-
// Version: 2.0.1
3+
// Version: 2.0.3
44
//
5-
// The Darkness Support Classes (PerseusUISystemKit previously)
5+
// The Darkness Support (PerseusUISystemKit previously)
66
//
77
//
88
// For iOS and macOS only. Use Stars to adopt for the specifics you need.
@@ -563,7 +563,7 @@ public class DarkModeImageView: UIImageView {
563563
}
564564
}
565565

566-
private(set) var darkModeObserver: DarkModeObserver?
566+
private(set) var theDarknessTrigger: DarkModeObserver?
567567

568568
private(set) var light: UIImage?
569569
private(set) var dark: UIImage?
@@ -579,7 +579,7 @@ public class DarkModeImageView: UIImageView {
579579
}
580580

581581
private func configure() {
582-
darkModeObserver = DarkModeObserver { style in
582+
theDarknessTrigger = DarkModeObserver { style in
583583
self.image = style == .light ? self.light : self.dark
584584
}
585585

@@ -590,7 +590,7 @@ public class DarkModeImageView: UIImageView {
590590
self.light = light
591591
self.dark = dark
592592

593-
darkModeObserver?.action = { style in
593+
theDarknessTrigger?.action = { style in
594594
self.image = style == .light ? self.light : self.dark
595595
}
596596

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
//
2+
// MVPPresenter.swift
3+
// The Technological Tree
4+
//
5+
// Created by Mikhail Zhigulin of Novosibirsk in 7534 (19.11.2025).
6+
//
7+
// The year starts from the creation of the world in the Star temple
8+
// according to a Slavic calendar. September, the 1st of Slavic year.
9+
//
10+
// Unlicensed Free Software
11+
//
12+
// INFO:
13+
// Architectural points. MVP.
14+
// Based on [Gist](https://gist.github.com/PerseusRealDeal/5301e90881732f0cd0040e2083a78a3d).
15+
//
16+
// This is MVPPresenter.swift
17+
//
18+
// This is free and unencumbered software released into the public domain.
19+
//
20+
// Anyone is free to copy, modify, publish, use, compile, sell, or
21+
// distribute this software, either in source code form or as a compiled
22+
// binary, for any purpose, commercial or non-commercial, and by any
23+
// means.
24+
//
25+
// In jurisdictions that recognize copyright laws, the author or authors
26+
// of this software dedicate any and all copyright interest in the
27+
// software to the public domain. We make this dedication for the benefit
28+
// of the public at large and to the detriment of our heirs and
29+
// successors. We intend this dedication to be an overt act of
30+
// relinquishment in perpetuity of all present and future rights to this
31+
// software under copyright law.
32+
//
33+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
35+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
36+
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
37+
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
38+
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39+
// OTHER DEALINGS IN THE SOFTWARE.
40+
//
41+
// For more information, please refer to <http://unlicense.org/>
42+
//
43+
44+
import PerseusDarkMode
45+
46+
// MARK: - Common MVP Business Logic (delegated)
47+
48+
class MVPPresenter {
49+
50+
let darkModeObserver = DarkModeObserver()
51+
weak var view: MVPViewDelegate? // Weak reference to prevent retain cycles
52+
53+
init(view: MVPViewDelegate) {
54+
self.view = view
55+
56+
darkModeObserver.action = { _ in self.view?.makeUp() }
57+
}
58+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//
2+
// MVPViewDelegate.swift
3+
// The Technological Tree
4+
//
5+
// Created by Mikhail Zhigulin of Novosibirsk in 7534 (19.11.2025).
6+
//
7+
// The year starts from the creation of the world in the Star temple
8+
// according to a Slavic calendar. September, the 1st of Slavic year.
9+
//
10+
// Unlicensed Free Software
11+
//
12+
// INFO:
13+
// Architectural points. MVP.
14+
// Based on [Gist](https://gist.github.com/PerseusRealDeal/5301e90881732f0cd0040e2083a78a3d).
15+
//
16+
// This is MVPViewDelegate.swift
17+
//
18+
// This is free and unencumbered software released into the public domain.
19+
//
20+
// Anyone is free to copy, modify, publish, use, compile, sell, or
21+
// distribute this software, either in source code form or as a compiled
22+
// binary, for any purpose, commercial or non-commercial, and by any
23+
// means.
24+
//
25+
// In jurisdictions that recognize copyright laws, the author or authors
26+
// of this software dedicate any and all copyright interest in the
27+
// software to the public domain. We make this dedication for the benefit
28+
// of the public at large and to the detriment of our heirs and
29+
// successors. We intend this dedication to be an overt act of
30+
// relinquishment in perpetuity of all present and future rights to this
31+
// software under copyright law.
32+
//
33+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
35+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
36+
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
37+
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
38+
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39+
// OTHER DEALINGS IN THE SOFTWARE.
40+
//
41+
// For more information, please refer to <http://unlicense.org/>
42+
//
43+
44+
import Foundation
45+
46+
// MARK: - Common Delegating Communication
47+
48+
protocol MVPViewDelegate: AnyObject {
49+
func setupUI()
50+
func makeUp()
51+
}

DarkModeDiscovery/DarkModeDiscovery/DemoContent/Model/Companion.swift renamed to DarkModeDiscovery/DarkModeDiscovery/Configuration/Model/Companion.swift

File renamed without changes.

DarkModeDiscovery/DarkModeDiscovery/DemoContent/Model/Race.swift renamed to DarkModeDiscovery/DarkModeDiscovery/Configuration/Model/Race.swift

File renamed without changes.

DarkModeDiscovery/DarkModeDiscovery/DemoContent/Model/companions.json renamed to DarkModeDiscovery/DarkModeDiscovery/Configuration/Model/companions.json

File renamed without changes.

0 commit comments

Comments
 (0)