Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #2926

Draft
wants to merge 61 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
bac85dd
Compile on windows
iXialumy Oct 21, 2023
cdcb06b
Merge remote-tracking branch 'origin/main'
iXialumy Nov 6, 2023
3c1520a
IPC seems to be working on windows
iXialumy Nov 10, 2023
8a82b6c
More progress
iXialumy Nov 26, 2023
1e178b0
Merge branch 'main' of github.com:zellij-org/zellij
iXialumy Nov 26, 2023
6ed105e
Default Terminal in server_os_input
iXialumy Nov 26, 2023
07ac69b
Implement more of the windows terminal spawning
iXialumy Dec 10, 2023
6640289
Able to read from pty on windows
iXialumy Jan 20, 2024
c3cdc14
Able to write to pty on windows. Kinda
iXialumy Jan 20, 2024
e3d58ba
Reading from terminal works now!!!
iXialumy Jan 30, 2024
29dac13
implemented get_terminal_size for windows
maxle5 Feb 2, 2024
19d1030
implement future for winptyreader
ulyssesdotcodes Feb 8, 2024
f58a7c7
write and read from pty
ulyssesdotcodes Feb 8, 2024
a6f1e1c
dont mutex the pty
ulyssesdotcodes Feb 9, 2024
585cab6
set_raw_mode
ulyssesdotcodes Feb 9, 2024
58dbc64
working pane
ulyssesdotcodes Feb 9, 2024
d55f9dd
implement kill
ulyssesdotcodes Feb 10, 2024
c1ffe20
get size from stdout
ulyssesdotcodes Feb 10, 2024
4cc78bc
remove logs
ulyssesdotcodes Feb 10, 2024
63879a3
redo config dir so layouts work
ulyssesdotcodes Feb 11, 2024
d2c4aef
spawn process
ulyssesdotcodes Feb 11, 2024
7347a6f
virtual_terminal
ulyssesdotcodes Feb 12, 2024
300b3ac
deduplicate unix/windows code
ulyssesdotcodes Feb 14, 2024
09bdf76
Try to disable ENABLE_PROCESSED_INPUT.
jakob-ledermann Mar 13, 2024
77e18bb
Detect Exit of the spawned process and close pane.
jakob-ledermann Mar 13, 2024
bb20881
Implement `get_receiver` and `get_sender` for windows
jakob-ledermann Mar 29, 2024
5939354
Revert doubling of pipes
jakob-ledermann Mar 29, 2024
9cf8146
Use duplicated handle and not the original fixes (double free)
jakob-ledermann Mar 30, 2024
bf1c3cd
Add Display to message-Enums to enable more extensive logging
jakob-ledermann Mar 31, 2024
3a5bc36
rustfmt and more logging while sending
jakob-ledermann Mar 31, 2024
dd8058f
Expand errorhandling on `recv` from LocalSocket to identify deadlock
jakob-ledermann Mar 31, 2024
3ea7696
Further expand logging and drop the level to debug for now
jakob-ledermann Mar 31, 2024
3f67cba
Add the process PID to the logmessage to help distinguish between ser…
jakob-ledermann Mar 31, 2024
9fb7325
Remove deprecated feature from `insta` in Cargo.toml
jakob-ledermann Mar 31, 2024
8ee8aed
Extract mod `ipc` into folder to enable submodules with their own files
jakob-ledermann Mar 31, 2024
4483395
Switch IPC to OverlappedIO based NamedPipe on windows
jakob-ledermann Mar 31, 2024
5cb3ac7
Ermittlung der offenen Sessions
jakob-ledermann Apr 1, 2024
ee4d47d
Add information to get session resurrection closer to availability
jakob-ledermann Apr 6, 2024
b8f1a52
Fix some compile errors on unix
jakob-ledermann Apr 7, 2024
6071bdd
Ensure the created event is cleaned up properly after the read or wri…
jakob-ledermann Apr 12, 2024
5c9d356
Detect Resizes of the Terminal and send them to the server.
jakob-ledermann Mar 28, 2024
630d7ce
Add Safety-Comment and preserve detection of session name change
jakob-ledermann Mar 29, 2024
033155c
Fix compile errors
iXialumy May 2, 2024
87bc349
reconcile with main a bit
ulyssesdotcodes May 6, 2024
3f93969
wip fix lock
ulyssesdotcodes May 6, 2024
1f7da0a
pull in session changes
ulyssesdotcodes May 6, 2024
876465b
remove unused extra stuff
ulyssesdotcodes May 6, 2024
95da436
pr comments
ulyssesdotcodes May 8, 2024
ad5dd5b
Revert "remove unused extra stuff"
ulyssesdotcodes May 8, 2024
800ab9f
fix read-locked session issue
ulyssesdotcodes May 8, 2024
a03ccb9
Add windows to gh actions
iXialumy May 19, 2024
3fe4c1f
Merge pull request #7 from ulyssesdotcodes/session_support
iXialumy Jun 20, 2024
aa41987
Update dependencies: add ioapiset feature to winapi
iXialumy Jun 26, 2024
a476688
`IntoRawHandle` is unused
jakob-ledermann Jul 9, 2024
680f895
Just tell windows we want UTF8 as Codepage
jakob-ledermann Aug 30, 2024
e182276
Fix unix build errors from CI
jakob-ledermann Aug 30, 2024
ea3835f
run cargo fmt
jakob-ledermann Aug 30, 2024
ec6b42f
Merge pull request #8 from jakob-ledermann/maybe_setconsole_cp
iXialumy Sep 13, 2024
af47d66
fix(mouse): zellij no longer panics while using the mouse to select text
jakob-ledermann Sep 24, 2024
7feecb7
run cargo fix for zellij-server
jakob-ledermann Sep 25, 2024
ff5057c
Merge pull request #10 from jakob-ledermann/fix(mouse)_windows_panic_…
iXialumy Oct 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip fix lock
  • Loading branch information
ulyssesdotcodes committed May 6, 2024
commit 3f9396909f9ab00c86e93020ec6990151ed4d49a
3 changes: 3 additions & 0 deletions zellij-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ pub fn start_client(
if let Ok(()) = os_input.unset_raw_mode(0) {
handle_panic(info, &send_client_instructions);
}

#[cfg(windows)]
handle_panic(info, &send_client_instructions);
})
});

Expand Down
23 changes: 16 additions & 7 deletions zellij-client/src/os_input_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use std::os::unix::io::RawFd;
#[cfg(windows)]
use std::os::windows::io::{AsHandle, AsRawHandle, FromRawHandle, RawHandle};
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::sync::{Arc, Mutex, TryLockError};
use std::{io, process, thread, time};
#[cfg(windows)]
use windows_sys::Win32::{
Expand Down Expand Up @@ -386,12 +386,21 @@ impl ClientOsApi for ClientOsInputOutput {
.send(msg);
}
fn recv_from_server(&self) -> Option<(ServerToClientMsg, ErrorContext)> {
self.receive_instructions_from_server
.lock()
.unwrap()
.as_mut()
.unwrap()
.recv()
log::info!("Receiving from Server");
let receiver = self.receive_instructions_from_server.try_lock();
let result = match receiver {
Ok(mut receiver) => receiver
.as_mut()
.expect("Receiver should be initialized by now")
.recv(),
Err(TryLockError::WouldBlock) => {
thread::sleep(std::time::Duration::from_secs_f32(0.1));
None
},
Err(TryLockError::Poisoned(err)) => panic!("receiver has been poisoned"),
};
log::info!("{:?} received from server", &result);
result
}
fn handle_signals(&self, sigwinch_cb: Box<dyn Fn()>, quit_cb: Box<dyn Fn()>) {
#[cfg(unix)]
Expand Down