Fixes and improvements for the windows build.

This commit is contained in:
Martín Lucas Golini
2020-07-02 16:37:20 -03:00
parent f07acb13a0
commit 92a89abb65
10 changed files with 21 additions and 44 deletions

3
.gitignore vendored
View File

@@ -21,7 +21,7 @@ projects/android-project-ant/gen
projects/android-project-ant/assets
projects/android-project-ant/libs
src/examples/strobe
src/thirdparty/SDL2-2.0.10*
src/thirdparty/SDL2-2.0.12*
*.dll
bin/ee*
bin/eepp-*
@@ -44,3 +44,4 @@ bin/libeepp.dylib
eepp.kdev4
eepp.tags
eepp.geany
/bin/assets/icon/ee.aps

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -196,6 +196,10 @@ function build_link_configuration( package_name, use_ee_icon )
linkoptions { "../../bin/assets/icon/ee.res" }
end
filter { "system:windows", "action:vs*" }
files { "bin/assets/icon/ee.rc", "bin/assets/icon/ee.ico" }
vpaths { ['Resources/*'] = { "ee.rc", "ee.ico" } }
filter "action:not vs*"
cppdialect "C++14"
buildoptions { "-Wall" }
@@ -568,6 +572,9 @@ workspace "eepp"
filter "configurations:release*"
optimize "Speed"
filter { "system:windows", "action:vs*" }
flags { "MultiProcessorCompile" }
project "SOIL2-static"
kind "StaticLib"
language "C"

View File

@@ -1,33 +0,0 @@
--- a/configure Mon Dec 30 17:56:56 2019 -0800
+++ b/configure Tue Dec 31 10:40:30 2019 -0800
@@ -25106,6 +25106,14 @@
# have_haptic=yes
# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
#fi
+ # Set up files for the sensor library
+ if test x$enable_sensor = xyes; then
+
+$as_echo "#define SDL_SENSOR_COREMOTION 1" >>confdefs.h
+
+ SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m"
+ have_sensor=yes
+ fi
# Set up files for the power library
if test x$enable_power = xyes; then
--- a/configure.ac Mon Dec 30 17:56:56 2019 -0800
+++ b/configure.ac Tue Dec 31 10:40:30 2019 -0800
@@ -3856,6 +3856,12 @@
# have_haptic=yes
# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
#fi
+ # Set up files for the sensor library
+ if test x$enable_sensor = xyes; then
+ AC_DEFINE(SDL_SENSOR_COREMOTION, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m"
+ have_sensor=yes
+ fi
# Set up files for the power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_UIKIT, 1, [ ])

View File

@@ -3,7 +3,7 @@ cd $(dirname "$0")
if [ ! -f ../../libs/ios/libSDL2.a ]; then
cd ../../src/thirdparty/SDL2-2.0.10/build-scripts
cd ../../src/thirdparty/SDL2-2.0.12/build-scripts
./iosbuild.sh
cp lib/libSDL2.a ../../../../libs/ios/
cd ../../../../projects/ios

View File

@@ -1,11 +1,11 @@
#!/bin/bash
premake5 --file=../../premake5.lua --os=ios --with-static-eepp --with-gles1 --with-gles2 --with-static-backend --use-frameworks xcode4
premake5 --file=../../premake5.lua --os=ios --with-static-eepp --with-gles1 --with-gles2 --with-static-backend --use-frameworks xcode4
cp Info.plist ../../make/ios
if [ ! -f ../../libs/ios/libSDL2.a ]; then
cd ../../src/thirdparty/SDL2-2.0.10/build-scripts
cd ../../src/thirdparty/SDL2-2.0.12/build-scripts
./iosbuild.sh
cp lib/libSDL2.a ../../../../libs/ios/

View File

@@ -18,12 +18,10 @@ namespace EE {
bool PrintDebugInLog = true;
void eeREPORT_ASSERT( const char* File, int Line, const char* Exp ) {
#ifdef EE_COMPILER_MSVC
#if defined( EE_COMPILER_MSVC ) && defined( EE_DEBUG )
_CrtDbgReport( _CRT_ASSERT, File, Line, "", Exp );
DebugBreak();
#else
if ( PrintDebugInLog ) {

View File

@@ -606,7 +606,7 @@ std::string Sys::getConfigPath( std::string appname ) {
_dupenv_s( &ppath, &ssize, "APPDATA" );
String::strCopy( path, ppath, EE_MAX_CFG_PATH_LEN );
_snprintf( path, EE_MAX_CFG_PATH_LEN, "%s\\%s", ppath, appname.c_str() );
free( ppath );

View File

@@ -695,6 +695,11 @@ bool WindowSDL::setIcon( const std::string& Path ) {
Image Img( Path );
if ( NULL != Img.getPixelsPtr() ) {
#if EE_PLATFORM == EE_PLATFORM_WIN
if ( Img.getWidth() > 64 || Img.getHeight() > 64 ) {
Img.resize( 64, 64 );
}
#endif
const Uint8* Ptr = Img.getPixelsPtr();
x = Img.getWidth();
y = Img.getHeight();

View File

@@ -248,8 +248,7 @@ void App::loadConfig() {
mRecentFiles = String::split( recent, ';' );
mInitColorScheme = mConfig.editor.colorScheme =
mIni.getValue( "editor", "colorscheme", "lite" );
mConfig.editor.fontSize =
mIni.getValue( "editor", "font_size", mDisplayDPI > 105 ? "11dp" : "14dp" );
mConfig.editor.fontSize = mIni.getValue( "editor", "font_size", "11dp" );
mConfig.window.size.setWidth(
mIniState.getValueI( "window", "width", mDisplayDPI > 105 ? 1920 : 1280 ) );
mConfig.window.size.setHeight(
@@ -264,7 +263,7 @@ void App::loadConfig() {
mConfig.editor.highlightCurrentLine =
mIni.getValueB( "editor", "highlight_current_line", true );
mConfig.editor.horizontalScrollbar = mIni.getValueB( "editor", "horizontal_scrollbar", false );
mConfig.ui.fontSize = mIni.getValue( "ui", "font_size", mDisplayDPI > 105 ? "11dp" : "14dp" );
mConfig.ui.fontSize = mIni.getValue( "ui", "font_size", "11dp" );
mConfig.editor.trimTrailingWhitespaces =
mIni.getValueB( "editor", "trim_trailing_whitespaces", false );
mConfig.editor.forceNewLineAtEndOfFile =