T25: release builds: scripts/windows-zip.ps1 zips elyterminal.exe, the icon inside as resource 1 (build.rs, embed-resource), a GUI program carrying its C runtime, git started without a console; scripts/linux-tar.sh builds on Debian 12, glibc 2.35 for this build, with a desktop entry and the icon; every window names itself com.zacharyzhang.elyterminal; rust-toolchain.toml pins 1.95.0, and CI installs it without rustup default
This commit is contained in:
21 files changed
+211
-39
No files matched your search
@@ -17,6 +17,9 @@ use crate::{
|
||||
workspace::{self, TITLE, Workspace},
|
||||
};
|
||||
|
||||
/// The id the macOS bundle and Linux desktop entry share.
|
||||
pub const APP_ID: &str = "com.zacharyzhang.elyterminal";
|
||||
|
||||
/// Fonts, settings, integration scripts and the chosen font, each checked before a window opens.
|
||||
pub fn start(cx: &mut App) -> anyhow::Result<()> {
|
||||
cx.text_system()
|
||||
@@ -96,6 +99,7 @@ pub fn open(launch: Launch, cx: &mut App) -> anyhow::Result<WindowHandle<Workspa
|
||||
};
|
||||
let (pty, events) = spawn(&launch, (80, 24), (8, 16), config(SettingsStore::get(cx)))?;
|
||||
let window = cx.open_window(options, |window, cx| {
|
||||
window.set_app_id(APP_ID);
|
||||
window
|
||||
.observe_window_appearance(|_, cx| themes::apply(cx))
|
||||
.detach();
|
||||
|
||||
+8
-1
@@ -25,10 +25,17 @@ fn line<A: AsRef<OsStr>>(args: &[A]) -> String {
|
||||
args.join(" ")
|
||||
}
|
||||
|
||||
/// Keeps Windows from opening a console window for git.
|
||||
#[cfg(windows)]
|
||||
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
|
||||
|
||||
/// Runs git in `folder`: English messages, literal paths, no lock the user's own git could meet; `input` feeds stdin.
|
||||
fn git<A: AsRef<OsStr>>(folder: &Path, args: &[A], input: &[u8]) -> anyhow::Result<Output> {
|
||||
let named = || format!("git: `git {}` in {}", line(args), folder.display());
|
||||
let mut child = Command::new("git")
|
||||
let mut command = Command::new("git");
|
||||
#[cfg(windows)]
|
||||
std::os::windows::process::CommandExt::creation_flags(&mut command, CREATE_NO_WINDOW);
|
||||
let mut child = command
|
||||
.arg("-C")
|
||||
.arg(folder)
|
||||
.args(["--no-optional-locks", "--literal-pathspecs"])
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// A release build on Windows opens no console window.
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use ely_gpui_component::Assets;
|
||||
use elyterminal::{
|
||||
app,
|
||||
|
||||
@@ -17,7 +17,7 @@ use gpui::{
|
||||
};
|
||||
|
||||
use super::{Settings, SettingsStore, StartIn};
|
||||
use crate::{menus, term::BLINK};
|
||||
use crate::{app::APP_ID, menus, term::BLINK};
|
||||
|
||||
mod appearance;
|
||||
mod terminal;
|
||||
@@ -75,6 +75,7 @@ fn open_window(cx: &mut App) {
|
||||
..Default::default()
|
||||
};
|
||||
match cx.open_window(options, |window, cx| {
|
||||
window.set_app_id(APP_ID);
|
||||
cx.new(|cx| SettingsWindow::new(window, cx))
|
||||
}) {
|
||||
Ok(_) => log::info!("settings: the window opens"),
|
||||
|
||||
Reference in new issue
Block a user