1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Fix crates.io publishing restrictions

This works around the problem that crates pushed to crates.io cannot
reference files outside of their crate directory.
This commit is contained in:
Christian Duerr 2020-08-01 01:11:24 +00:00
parent a46bb5a6e8
commit 55a185d00f
No known key found for this signature in database
GPG key ID: 85CDAE3C164BA7B4
9 changed files with 12 additions and 14 deletions

View file

@ -4,7 +4,7 @@ version = "0.5.0"
authors = ["Christian Duerr <contact@christianduerr.com>", "Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0"
description = "GPU-accelerated terminal emulator"
readme = "../README.md"
readme = "README.md"
homepage = "https://github.com/alacritty/alacritty"
edition = "2018"

1
alacritty/README.md Symbolic link
View file

@ -0,0 +1 @@
../README.md

1
alacritty/alacritty.ico Symbolic link
View file

@ -0,0 +1 @@
../extra/windows/alacritty.ico

View file

@ -35,20 +35,16 @@ use crate::renderer::rects::RenderRect;
pub mod rects;
// Shader paths for live reload.
static TEXT_SHADER_F_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.f.glsl");
static TEXT_SHADER_V_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.v.glsl");
static RECT_SHADER_F_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.f.glsl");
static RECT_SHADER_V_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.v.glsl");
static TEXT_SHADER_F_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/res/text.f.glsl");
static TEXT_SHADER_V_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/res/text.v.glsl");
static RECT_SHADER_F_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/res/rect.f.glsl");
static RECT_SHADER_V_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/res/rect.v.glsl");
// Shader source which is used when live-shader-reload feature is disable.
static TEXT_SHADER_F: &str =
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.f.glsl"));
static TEXT_SHADER_V: &str =
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.v.glsl"));
static RECT_SHADER_F: &str =
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.f.glsl"));
static RECT_SHADER_V: &str =
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.v.glsl"));
static TEXT_SHADER_F: &str = include_str!("../../res/text.f.glsl");
static TEXT_SHADER_V: &str = include_str!("../../res/text.v.glsl");
static RECT_SHADER_F: &str = include_str!("../../res/rect.f.glsl");
static RECT_SHADER_V: &str = include_str!("../../res/rect.v.glsl");
/// `LoadGlyph` allows for copying a rasterized glyph into graphics memory.
pub trait LoadGlyph {

View file

@ -42,7 +42,7 @@ use crate::gl;
// It's required to be in this directory due to the `windows.rc` file.
#[cfg(not(any(target_os = "macos", windows)))]
static WINDOW_ICON: &[u8] = include_bytes!("../../extra/windows/alacritty.ico");
static WINDOW_ICON: &[u8] = include_bytes!("../alacritty.ico");
// This should match the definition of IDI_ICON from `windows.rc`.
#[cfg(windows)]