Merge pull request #476 from mattn/mingw

Fix build on mingw64 gcc compiler
This commit is contained in:
Federico Terzi 2020-10-01 20:34:10 +02:00 committed by GitHub
commit 92bc451c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -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")]

View File

@ -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>

View File

@ -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}}}"