Commit Graph

8 Commits

Author SHA1 Message Date
Joe Wilm 217ad9ec28 Upgrade to Rust 2018
This resolves a lot of NLL issues, however full NLL will be necessary to
handle a couple of remaining issues.
2018-12-10 17:53:56 +00:00
Christian Duerr 6265ef91d5
Display errors and warnings
To make sure that all error and information reporting to the user is
unified, all instances of `print!`, `eprint!`, `println!` and
`eprintln!` have been removed and replaced by logging.

When `RUST_LOG` is not specified, the default Alacritty logger now also
prints to both the stderr and a log file. The log file is only created
when a message is written to it and its name is printed to stdout the
first time it is used.

Whenever a warning or an error has been written to the log file/stderr,
a message is now displayed in Alacritty which points to the log file
where the full error is documented.

The message is cleared whenever the screen is cleared using either the
`clear` command or the `Ctrl+L` key binding.

To make sure that log files created by root don't prevent normal users
from interacting with them, the Alacritty log file is `/tmp/Alacritty-$PID.log`.

Since it's still possible that the log file can't be created, the UI
error/warning message now informs the user if the message was only
written to stderr. The reason why it couldn't be created is then printed
to stderr.

To make sure the deletion of the log file at runtime doesn't create any
issues, the file is re-created if a write is attempted without the file
being present.

To help with debugging Alacritty issues, a timestamp and the error
level are printed in all log messages.

All log messages now follow this format:
    [YYYY-MM-DD HH:MM] [LEVEL] Message

Since it's not unusual to spawn a lot of different terminal emulators
without restarting, Alacritty can create a ton of different log files.

To combat this problem, logfiles are removed by default after
Alacritty has been closed. If the user wants to persist the log of a
single session, the `--persistent_logging` option can be used. For
persisting all log files, the `persistent_logging` option can be set in
the configuration file
2018-11-17 14:39:13 +00:00
OJ Kwon f3a76e24f1 build(package): acquire latest winpty 2018-10-17 18:38:33 +13:00
Zac Pullar-Strecker 15e0deae2b Add support for Windows (#1374)
Initial support for Windows is implemented using the winpty translation
layer. Clipboard support for Windows is provided through the `clipboard`
crate, and font rasterization is provided by RustType.

The tty.rs file has been split into OS-specific files to separate
standard pty handling from the winpty implementation.

Several binary components are fetched via build script on windows
including libclang and winpty. These could be integrated more directly
in the future either by building those dependencies as part of the
Alacritty build process or by leveraging git lfs to store the artifacts.

Fixes #28.
2018-10-16 10:02:52 -07:00
Joe Wilm 672ea9b050 Remove built crate
This became a support burden for me due to various compile and run time
issues.
2017-12-22 14:25:14 -08:00
hcpl 8a09917dd1 Output more info for `--version` (#888)
Useful when requesting more info to help investigating issues.
2017-11-11 17:17:47 -08:00
Joe Wilm c8fd2c090c Add license headers to source files 2016-06-29 20:59:14 -07:00
Joe Wilm c70acbac0b
Correct sub-pixel font rendering with OpenGL
Uses the GL_ARB_blend_func_extended to get single-pass, per-channel
alpha blending. gl_generator is now used instead of gl to enable the
extension.

The background color is removed since that presumably needs to run in a
separate pass.
2016-05-20 21:36:28 -07:00