added FULL WINDOWS SUPPORT without msvc lolz

This commit is contained in:
gallant 2023-03-28 11:00:15 -05:00
parent 8a33c0f42e
commit 046c791453
39 changed files with 452 additions and 0 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

42
build.rs Normal file
View file

@ -0,0 +1,42 @@
use std::env;
use std::path::PathBuf;
fn main() {
let target = env::var("TARGET").unwrap();
if target.contains("pc-windows") {
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
let mut lib_dir = manifest_dir.clone();
let mut dll_dir = manifest_dir.clone();
if target.contains("msvc") {
lib_dir.push("msvc");
dll_dir.push("msvc");
}
else {
lib_dir.push("gnu-mingw");
dll_dir.push("gnu-mingw");
}
lib_dir.push("lib");
dll_dir.push("dll");
if target.contains("x86_64") {
lib_dir.push("64");
dll_dir.push("64");
}
else {
lib_dir.push("32");
dll_dir.push("32");
}
println!("cargo:rustc-link-search=all={}", lib_dir.display());
for entry in std::fs::read_dir(dll_dir).expect("Can't read DLL dir") {
let entry_path = entry.expect("Invalid fs entry").path();
let file_name_result = entry_path.file_name();
let mut new_file_path = manifest_dir.clone();
if let Some(file_name) = file_name_result {
let file_name = file_name.to_str().unwrap();
if file_name.ends_with(".dll") {
new_file_path.push(file_name);
std::fs::copy(&entry_path, new_file_path.as_path()).expect("Can't copy from DLL dir");
}
}
}
}
}

BIN
gnu-mingw/.DS_Store vendored Normal file

Binary file not shown.

BIN
gnu-mingw/dll/.DS_Store vendored Normal file

Binary file not shown.

BIN
gnu-mingw/dll/32/SDL2.dll Executable file

Binary file not shown.

BIN
gnu-mingw/dll/32/SDL2_image.dll Executable file

Binary file not shown.

BIN
gnu-mingw/dll/32/SDL2_ttf.dll Executable file

Binary file not shown.

0
SDL2.dll → gnu-mingw/dll/64/SDL2.dll Normal file → Executable file
View file

BIN
gnu-mingw/dll/64/SDL2_image.dll Executable file

Binary file not shown.

BIN
gnu-mingw/dll/64/SDL2_ttf.dll Executable file

Binary file not shown.

BIN
gnu-mingw/lib/.DS_Store vendored Normal file

Binary file not shown.

BIN
gnu-mingw/lib/32/libSDL2.a Normal file

Binary file not shown.

BIN
gnu-mingw/lib/32/libSDL2.dll.a Executable file

Binary file not shown.

41
gnu-mingw/lib/32/libSDL2.la Executable file
View file

@ -0,0 +1,41 @@
# libSDL2.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='../bin/SDL2.dll'
# Names of this library.
library_names='libSDL2.dll.a'
# The name of the static archive.
old_library='libSDL2.a'
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2.
current=2600
age=2600
revision=4
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL2/SDL2-2.26.4/i686-w64-mingw32/lib'

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,41 @@
# libSDL2_image.la - a libtool library file
# Generated by ltmain.sh (GNU libtool) 2.2.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='../bin/SDL2_image.dll'
# Names of this library.
library_names='libSDL2_image.dll.a'
# The name of the static archive.
old_library='libSDL2_image.a'
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -L/usr/local/i686-w64-mingw32/lib -lmingw32 /usr/local/i686-w64-mingw32/lib/libSDL2.la -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2_image.
current=600
age=600
revision=3
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL_image/SDL2_image-2.6.3/i686-w64-mingw32/lib'

Binary file not shown.

View file

@ -0,0 +1,41 @@
# libSDL2_test.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname=''
# Names of this library.
library_names=''
# The name of the static archive.
old_library='libSDL2_test.a'
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=''
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2_test.
current=0
age=0
revision=0
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL2/SDL2-2.26.4/i686-w64-mingw32/lib'

Binary file not shown.

Binary file not shown.

41
gnu-mingw/lib/32/libSDL2_ttf.la Executable file
View file

@ -0,0 +1,41 @@
# libSDL2_ttf.la - a libtool library file
# Generated by ltmain.sh (GNU libtool) 2.2.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='../bin/SDL2_ttf.dll'
# Names of this library.
library_names='libSDL2_ttf.dll.a'
# The name of the static archive.
old_library='libSDL2_ttf.a'
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -lusp10 -lrpcrt4 -L/usr/local/i686-w64-mingw32/lib /usr/local/i686-w64-mingw32/lib/libSDL2.la -ldinput8 -ldxguid -ldxerr8 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lsetupapi -lversion -luuid /opt/homebrew/Cellar/mingw-w64/10.0.0_4/toolchain-i686/i686-w64-mingw32/lib/../lib/libstdc++.la'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2_ttf.
current=2000
age=2000
revision=2
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL_ttf/SDL2_ttf-2.20.2/i686-w64-mingw32/lib'

Binary file not shown.

41
gnu-mingw/lib/32/libSDL2main.la Executable file
View file

@ -0,0 +1,41 @@
# libSDL2main.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname=''
# Names of this library.
library_names=''
# The name of the static archive.
old_library='libSDL2main.a'
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=''
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2main.
current=0
age=0
revision=0
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL2/SDL2-2.26.4/i686-w64-mingw32/lib'

BIN
gnu-mingw/lib/64/libSDL2.a Normal file

Binary file not shown.

BIN
gnu-mingw/lib/64/libSDL2.dll.a Executable file

Binary file not shown.

41
gnu-mingw/lib/64/libSDL2.la Executable file
View file

@ -0,0 +1,41 @@
# libSDL2.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='../bin/SDL2.dll'
# Names of this library.
library_names='libSDL2.dll.a'
# The name of the static archive.
old_library='libSDL2.a'
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2.
current=2600
age=2600
revision=4
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL2/SDL2-2.26.4/x86_64-w64-mingw32/lib'

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,41 @@
# libSDL2_image.la - a libtool library file
# Generated by ltmain.sh (GNU libtool) 2.2.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='../bin/SDL2_image.dll'
# Names of this library.
library_names='libSDL2_image.dll.a'
# The name of the static archive.
old_library='libSDL2_image.a'
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -L/usr/local/x86_64-w64-mingw32/lib -lmingw32 /usr/local/x86_64-w64-mingw32/lib/libSDL2.la -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2_image.
current=600
age=600
revision=3
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL_image/SDL2_image-2.6.3/x86_64-w64-mingw32/lib'

Binary file not shown.

View file

@ -0,0 +1,41 @@
# libSDL2_test.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname=''
# Names of this library.
library_names=''
# The name of the static archive.
old_library='libSDL2_test.a'
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=''
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2_test.
current=0
age=0
revision=0
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL2/SDL2-2.26.4/x86_64-w64-mingw32/lib'

Binary file not shown.

Binary file not shown.

41
gnu-mingw/lib/64/libSDL2_ttf.la Executable file
View file

@ -0,0 +1,41 @@
# libSDL2_ttf.la - a libtool library file
# Generated by ltmain.sh (GNU libtool) 2.2.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='../bin/SDL2_ttf.dll'
# Names of this library.
library_names='libSDL2_ttf.dll.a'
# The name of the static archive.
old_library='libSDL2_ttf.a'
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -lusp10 -lrpcrt4 -L/usr/local/x86_64-w64-mingw32/lib /usr/local/x86_64-w64-mingw32/lib/libSDL2.la -ldinput8 -ldxguid -ldxerr8 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lsetupapi -lversion -luuid /opt/homebrew/Cellar/mingw-w64/10.0.0_4/toolchain-x86_64/x86_64-w64-mingw32/lib/../lib/libstdc++.la'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2_ttf.
current=2000
age=2000
revision=2
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL_ttf/SDL2_ttf-2.20.2/x86_64-w64-mingw32/lib'

Binary file not shown.

41
gnu-mingw/lib/64/libSDL2main.la Executable file
View file

@ -0,0 +1,41 @@
# libSDL2main.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname=''
# Names of this library.
library_names=''
# The name of the static archive.
old_library='libSDL2main.a'
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=''
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libSDL2main.
current=0
age=0
revision=0
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/valve/release/SDL2/SDL2-2.26.4/x86_64-w64-mingw32/lib'