Merge pull request #476 from mattn/mingw
Fix build on mingw64 gcc compiler
This commit is contained in:
commit
92bc451c91
4
build.rs
4
build.rs
|
@ -28,6 +28,10 @@ fn get_config() -> PathBuf {
|
||||||
fn print_config() {
|
fn print_config() {
|
||||||
println!("cargo:rustc-link-lib=static=winbridge");
|
println!("cargo:rustc-link-lib=static=winbridge");
|
||||||
println!("cargo:rustc-link-lib=dylib=user32");
|
println!("cargo:rustc-link-lib=dylib=user32");
|
||||||
|
#[cfg(target_env = "gnu")]
|
||||||
|
println!("cargo:rustc-link-lib=dylib=gdiplus");
|
||||||
|
#[cfg(target_env = "gnu")]
|
||||||
|
println!("cargo:rustc-link-lib=dylib=stdc++");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
|
|
|
@ -27,7 +27,15 @@
|
||||||
|
|
||||||
#define UNICODE
|
#define UNICODE
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
# ifndef WINVER
|
||||||
|
# define WINVER 0x0606
|
||||||
|
# endif
|
||||||
|
# define STRSAFE_NO_DEPRECATE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <winuser.h>
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
class Espanso < Formula
|
class Espanso < Formula
|
||||||
desc "{{{app_desc}}}"
|
desc "{{{app_desc}}}"
|
||||||
homepage "{{{app_url}}}"
|
homepage "{{{app_url}}}"
|
||||||
url "https://github.com/federico-terzi/espanso/releases/v{{{app_version}}}/download/espanso-mac.tar.gz"
|
url "https://github.com/federico-terzi/espanso/releases/download/v{{{app_version}}}/espanso-mac.tar.gz"
|
||||||
sha256 "{{{release_hash}}}"
|
sha256 "{{{release_hash}}}"
|
||||||
version "{{{app_version}}}"
|
version "{{{app_version}}}"
|
||||||
|
|
||||||
|
@ -17,5 +17,5 @@ class Espanso < Formula
|
||||||
bin.install "espanso"
|
bin.install "espanso"
|
||||||
|
|
||||||
resource("modulo").stage { bin.install "modulo-mac" => "modulo" }
|
resource("modulo").stage { bin.install "modulo-mac" => "modulo" }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user