Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d3880d724 | ||
|
|
e29e99296a | ||
|
|
daf363415d | ||
|
|
29be5d1c1b | ||
|
|
a3e82e4dea | ||
|
|
b906926498 | ||
|
|
e405771996 | ||
|
|
4e0f4f8188 | ||
|
|
266a0c64fb | ||
|
|
56e39b70e9 | ||
|
|
cf4d5bd510 | ||
|
|
4f4462da27 | ||
|
|
35a1050697 | ||
|
|
b8c5053858 | ||
|
|
0ce3519f7c | ||
|
|
d49786a8ae | ||
|
|
2ec3d1bfff | ||
|
|
47de149c08 |
No files matched your search
Generated
+21
-21
@@ -1,6 +1,6 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "adler"
|
||||
@@ -686,6 +686,26 @@ dependencies = [
|
||||
"jni-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nexus_desktop_ui"
|
||||
version = "1.10.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"crc64",
|
||||
"libc",
|
||||
"mac-notification-sys 0.5.0 (git+https://github.com/h4llow3En/mac-notification-sys?rev=65573f44bd5a3e4710b90617eb9056826a04e9c0)",
|
||||
"notify-rust",
|
||||
"parking_lot",
|
||||
"plist",
|
||||
"runas",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"ureq",
|
||||
"webbrowser",
|
||||
"winapi",
|
||||
"winreg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.23.1"
|
||||
@@ -1725,26 +1745,6 @@ dependencies = [
|
||||
"zvariant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerotier_desktop_ui"
|
||||
version = "1.10.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"crc64",
|
||||
"libc",
|
||||
"mac-notification-sys 0.5.0 (git+https://github.com/h4llow3En/mac-notification-sys?rev=65573f44bd5a3e4710b90617eb9056826a04e9c0)",
|
||||
"notify-rust",
|
||||
"parking_lot",
|
||||
"plist",
|
||||
"runas",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"ureq",
|
||||
"webbrowser",
|
||||
"winapi",
|
||||
"winreg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zvariant"
|
||||
version = "3.2.1"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "backone_desktop_ui"
|
||||
name = "nexus_desktop_ui"
|
||||
version = "1.10.0"
|
||||
authors = ["Dedy Sutanto <dedy.sutanto@proit.co.id>"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -13,7 +13,7 @@ CODESIGN=echo
|
||||
CODESIGN_APP_CERT=
|
||||
ifeq ($(ZT_OFFICIAL_RELEASE),1)
|
||||
CODESIGN=codesign
|
||||
CODESIGN_APP_CERT="Developer ID Application: BackOne, Inc (8ZD9JUCZ4V)"
|
||||
CODESIGN_APP_CERT="Developer ID Application: Nexus, Inc (8ZD9JUCZ4V)"
|
||||
CARGO_FLAGS=--release
|
||||
CARGO_TARGET_DIR=release
|
||||
else
|
||||
@@ -63,17 +63,18 @@ mac: libui
|
||||
cd tray ; make clean
|
||||
cd tray ; make -j2 zt_lib
|
||||
MACOSX_DEPLOYMENT_TARGET=10.13 cargo build $(CARGO_FLAGS) --target=aarch64-apple-darwin
|
||||
MACOSX_DEPLOYMENT_TARGET=10.13 cargo build $(CARGO_FLAGS) --target=x86_64-apple-darwin
|
||||
lipo -create target/aarch64-apple-darwin/$(CARGO_TARGET_DIR)/backone_desktop_ui target/x86_64-apple-darwin/$(CARGO_TARGET_DIR)/backone_desktop_ui -output target/$(CARGO_TARGET_DIR)/backone_desktop_ui
|
||||
#MACOSX_DEPLOYMENT_TARGET=10.13 cargo build $(CARGO_FLAGS) --target=x86_64-apple-darwin
|
||||
#lipo -create target/aarch64-apple-darwin/$(CARGO_TARGET_DIR)/nexus_desktop_ui target/x86_64-apple-darwin/$(CARGO_TARGET_DIR)/nexus_desktop_ui -output target/$(CARGO_TARGET_DIR)/nexus_desktop_ui
|
||||
lipo -create target/aarch64-apple-darwin/$(CARGO_TARGET_DIR)/nexus_desktop_ui -output target/$(CARGO_TARGET_DIR)/nexus_desktop_ui
|
||||
make mac-assemble-app
|
||||
|
||||
mac-assemble-app: FORCE
|
||||
rm -rf BackOne.app
|
||||
cp -av mac-app-template/BackOne.app .
|
||||
mkdir -p BackOne.app/Contents/MacOS
|
||||
cp -f target/$(CARGO_TARGET_DIR)/backone_desktop_ui BackOne.app/Contents/MacOS/BackOne
|
||||
xattr -cr BackOne.app
|
||||
$(CODESIGN) -f --options=runtime -s $(CODESIGN_APP_CERT) BackOne.app
|
||||
rm -rf Nexus.app
|
||||
cp -av mac-app-template/Nexus.app .
|
||||
mkdir -p Nexus.app/Contents/MacOS
|
||||
cp -f target/$(CARGO_TARGET_DIR)/nexus_desktop_ui Nexus.app/Contents/MacOS/Nexus
|
||||
xattr -cr Nexus.app
|
||||
$(CODESIGN) -f --options=runtime -s $(CODESIGN_APP_CERT) Nexus.app
|
||||
|
||||
# This doesn't need to be run every time, was just used to build the initial libui.rs version.
|
||||
# The result seems to be portable across the targeted platforms so we just check it in.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
+6
-6
@@ -11,15 +11,15 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>BackOne</string>
|
||||
<string>Nexus</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>BackOneIcon.icns</string>
|
||||
<string>NexusIcon.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.backone.BackOne-UI</string>
|
||||
<string>com.backone.Nexus-UI</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>BackOne</string>
|
||||
<string>Nexus</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
@@ -58,8 +58,8 @@
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSAppleEventsUsageDescription</key>
|
||||
<string>BackOne sends apple events to control BackOne services.</string>
|
||||
<string>Nexus sends apple events to control Nexus services.</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright ©2016-2021 BackOne, Inc. All rights reserved.</string>
|
||||
<string>Copyright ©2016-2026 Nexus, Inc. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -2,6 +2,6 @@
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Name=BackOne UI
|
||||
Exec=/usr/bin/backone_desktop_ui
|
||||
Icon=/usr/share/backone/BackOneIcon.png
|
||||
Exec=/usr/bin/nexus_desktop_ui
|
||||
Icon=/usr/share/backone/NexusIcon.png
|
||||
Categories=System;
|
||||
+4
-9
@@ -32,7 +32,7 @@ pub fn about_main(version: &str) {
|
||||
|
||||
libui::uiOnShouldQuit(Some(on_should_quit), null_mut());
|
||||
|
||||
let title = CString::new("About BackOne UI").unwrap();
|
||||
let title = CString::new("About Nexus UI").unwrap();
|
||||
let main_window = libui::uiNewWindow(title.as_ptr(), WINDOW_SIZE_X, WINDOW_SIZE_Y, 0);
|
||||
libui::uiWindowSetMargined(main_window, 0);
|
||||
libui::uiWindowOnClosing(main_window, Some(on_window_close), null_mut());
|
||||
@@ -42,16 +42,11 @@ pub fn about_main(version: &str) {
|
||||
|
||||
let about_text_content = CString::new(format!(
|
||||
"
|
||||
BackOne {}
|
||||
Nexus Network {}
|
||||
Desktop System Tray UI
|
||||
(c)2021-2023 BackOne, Inc.
|
||||
(c)2021-2026 Nexus Network, Inc.
|
||||
|
||||
Released under the terms of the Mozilla Public License V2.0 (MPL)
|
||||
|
||||
This UI application contains the following additional open source software:
|
||||
|
||||
* https://github.com/zserge/tray by Serge Zaitsev (with modifications)
|
||||
* https://github.com/libui-ng/libui-ng by Pietro Gagliardi and others",
|
||||
",
|
||||
version
|
||||
))
|
||||
.unwrap();
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ pub fn join_main() {
|
||||
libui::uiOnShouldQuit(Some(on_should_quit), null_mut());
|
||||
|
||||
main_window = libui::uiNewWindow(
|
||||
"Join ZeroTier Network\0".as_bytes().as_ptr().cast(),
|
||||
"Join Nexus Network\0".as_bytes().as_ptr().cast(),
|
||||
WINDOW_SIZE_X,
|
||||
WINDOW_SIZE_Y,
|
||||
1,
|
||||
|
||||
+15
-15
@@ -77,7 +77,7 @@ pub(crate) const GLOBAL_SERVICE_HOME_V1: &'static str = "/var/db/backone";
|
||||
pub(crate) const GLOBAL_SERVICE_HOME_V1: &'static str = "/var/lib/backone";
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub(crate) const MAC_BUNDLE_ID: &'static str = "com.backone.BackOne-UI";
|
||||
pub(crate) const MAC_BUNDLE_ID: &'static str = "com.backone.Nexus-UI";
|
||||
|
||||
/*******************************************************************************************************************/
|
||||
/* OS-specific functions and C externs */
|
||||
@@ -195,7 +195,7 @@ fn refresh_windows_start_on_login() {
|
||||
let hkcu = winreg::RegKey::predef(winreg::enums::HKEY_CURRENT_USER);
|
||||
let startup = hkcu.open_subkey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
|
||||
let enabled = startup.map_or(false, |startup| {
|
||||
startup.get_value::<String, &str>("BackOneUI").is_ok()
|
||||
startup.get_value::<String, &str>("NexusUI").is_ok()
|
||||
});
|
||||
unsafe {
|
||||
START_ON_LOGIN = enabled;
|
||||
@@ -274,7 +274,7 @@ fn notify(text: &str, _: Option<(String, String)>) {
|
||||
let _ = notify_rust::Notification::new()
|
||||
.icon(ico.as_str())
|
||||
.body(text)
|
||||
.appname("BackOne")
|
||||
.appname("Nexus")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ fn notify(text: &str, _: Option<(String, String)>) {
|
||||
fn notify(text: &str, _: Option<(String, String)>) {
|
||||
let _ = notify_rust::Notification::new()
|
||||
.body(text)
|
||||
.appname("BackOne")
|
||||
.appname("Nexus")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ fn notify(text: &str, _: Option<(String, String)>) {
|
||||
fn notify(text: &str, _: Option<(String, String)>) {
|
||||
let _ = mac_notification_sys::set_application(MAC_BUNDLE_ID);
|
||||
let mut n = mac_notification_sys::Notification::new();
|
||||
n.title("BackOne");
|
||||
n.title("Nexus");
|
||||
n.message(text);
|
||||
n.asynchronous(true);
|
||||
let _ = n.send();
|
||||
@@ -401,7 +401,7 @@ fn tray_main() {
|
||||
disabled: false,
|
||||
handler: Some(Box::new(move || {
|
||||
copy_to_clipboard(address2.as_str());
|
||||
notify("Copied this node's BackOne address to clipboard.", None);
|
||||
//notify("Copied this node's Nexus address to clipboard.", None);
|
||||
})),
|
||||
});
|
||||
|
||||
@@ -873,7 +873,7 @@ fn tray_main() {
|
||||
let _ = out.map(|app_list| {
|
||||
String::from_utf8(app_list.stdout).map(|app_list| {
|
||||
app_list.split('\n').for_each(|app| {
|
||||
if app.to_ascii_lowercase().contains("backone") {
|
||||
if app.to_ascii_lowercase().contains("nexus") {
|
||||
// osascript -e 'tell application "System Events" to delete login item "itemname"'
|
||||
let _ = Command::new("/usr/bin/osascript").arg("-e").arg(format!("tell application \"System Events\" to delete login item \"{}\"", app.trim())).output();
|
||||
}
|
||||
@@ -889,7 +889,7 @@ fn tray_main() {
|
||||
break;
|
||||
} else {
|
||||
// If toggling failed, re-request permission to send apple events as this is required to toggle.
|
||||
let _ = Command::new("/usr/bin/tccutil").arg("reset").arg("AppleEvents").arg("com.backone.BackOne-UI").output();
|
||||
let _ = Command::new("/usr/bin/tccutil").arg("reset").arg("AppleEvents").arg("com.backone.Nexus-UI").output();
|
||||
}
|
||||
}
|
||||
dirty_flag2.store(true, std::sync::atomic::Ordering::Relaxed);
|
||||
@@ -912,12 +912,12 @@ fn tray_main() {
|
||||
if startup.is_ok() {
|
||||
let startup = startup.unwrap().0;
|
||||
if unsafe { START_ON_LOGIN } {
|
||||
let _ = startup.delete_value("BackOneUI");
|
||||
let _ = startup.delete_value("NexusUI");
|
||||
} else {
|
||||
let exe = String::from(
|
||||
std::env::current_exe().unwrap().to_str().unwrap(),
|
||||
);
|
||||
let _ = startup.set_value("BackOneUI", &exe);
|
||||
let _ = startup.set_value("NexusUI", &exe);
|
||||
}
|
||||
}
|
||||
refresh_windows_start_on_login();
|
||||
@@ -946,7 +946,7 @@ fn tray_main() {
|
||||
});
|
||||
} else {
|
||||
menu.push(TrayMenuItem::Text {
|
||||
text: "Waiting for BackOne system service...".into(),
|
||||
text: "Waiting for Nexus system service...".into(),
|
||||
checked: false,
|
||||
disabled: true,
|
||||
handler: None,
|
||||
@@ -955,7 +955,7 @@ fn tray_main() {
|
||||
|
||||
let exit_flag2 = exit_flag.clone();
|
||||
menu.push(TrayMenuItem::Text {
|
||||
text: "Quit BackOne UI ".into(),
|
||||
text: "Quit Nexus UI ".into(),
|
||||
checked: false,
|
||||
disabled: false,
|
||||
handler: Some(Box::new(move || {
|
||||
@@ -986,7 +986,7 @@ fn tray_main() {
|
||||
&& sso_notification_shown.lock().insert(nwid.clone())
|
||||
{
|
||||
notify(
|
||||
format!("BackOne network {} requires SSO authentication. Select 'Open SSL Login URL' to proceed.", nwid).as_str(),
|
||||
format!("Nexus network {} requires SSO authentication. Select 'Open SSL Login URL' to proceed.", nwid).as_str(),
|
||||
Some(("Open SSL Login URL...".into(), auth_url.clone()))
|
||||
);
|
||||
}
|
||||
@@ -1064,10 +1064,10 @@ fn main() {
|
||||
unsafe {
|
||||
let _ = std::env::var("HOME").map_or_else(
|
||||
|_| {
|
||||
APPLICATION_HOME = String::from("/tmp/backone_ui");
|
||||
APPLICATION_HOME = String::from("/tmp/nexus_ui");
|
||||
},
|
||||
|home_dir| {
|
||||
APPLICATION_HOME = format!("{}/.backone_ui", home_dir);
|
||||
APPLICATION_HOME = format!("{}/.nexus_ui", home_dir);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user