Fixes for mingw compilation and Android.
@@ -147,7 +147,7 @@
|
||||
"file_patterns": ["%.dart"]
|
||||
},
|
||||
{
|
||||
"language": "bash",
|
||||
"language": "shellscript",
|
||||
"name": "bash-language-server",
|
||||
"url": "https://github.com/bash-lsp/bash-language-server",
|
||||
"command": "bash-language-server start",
|
||||
|
||||
@@ -235,13 +235,13 @@ function postsymlinklib(src_path, dst_path, lib)
|
||||
if os.is("windows") then
|
||||
postbuildcommands { "mklink \"" .. dst_path .. lib .. ".dll\"" .. " \"" .. src_path .. lib .. ".dll\" || ver>nul" }
|
||||
else
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
end
|
||||
configuration { "debug", "windows" }
|
||||
if os.is("windows") then
|
||||
postbuildcommands { "mklink \"" .. dst_path .. lib .. "-debug.dll\"" .. " \"" .. src_path .. lib .. "-debug.dll\" || ver>nul" }
|
||||
else
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "-debug." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. lib .. "-debug." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
end
|
||||
configuration { "release", "not windows" }
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
|
||||
18
premake5.lua
@@ -21,9 +21,9 @@ newoption {
|
||||
}
|
||||
|
||||
function get_dll_extension()
|
||||
if os.target("macosx") then
|
||||
if os.target() == "macosx" then
|
||||
return "dylib"
|
||||
elseif os.target("windows") then
|
||||
elseif os.target() == "windows" then
|
||||
return "dll"
|
||||
else
|
||||
return "so"
|
||||
@@ -35,13 +35,13 @@ function postsymlinklib(src_path, dst_path, lib, arch)
|
||||
if os.ishost("windows") then
|
||||
postbuildcommands { "mklink \"" .. dst_path .. lib .. ".dll\"" .. " \"" .. src_path .. lib .. ".dll\" || ver>nul" }
|
||||
else
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
end
|
||||
filter { "configurations:debug*", "system:windows", arch }
|
||||
if os.ishost("windows") then
|
||||
postbuildcommands { "mklink \"" .. dst_path .. lib .. "-debug.dll\"" .. " \"" .. src_path .. lib .. "-debug.dll\" || ver>nul" }
|
||||
else
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "-debug." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. lib .. "-debug." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
end
|
||||
filter { "configurations:release*", "not system:windows", arch }
|
||||
postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" }
|
||||
@@ -924,7 +924,7 @@ workspace "eepp"
|
||||
defines { "EE_STATIC" }
|
||||
end
|
||||
build_base_cpp_configuration( "eepp-maps-static" )
|
||||
target_dir_lib("eepp-maps")
|
||||
target_dir_lib("")
|
||||
filter "action:not vs*"
|
||||
buildoptions { "-Wall" }
|
||||
|
||||
@@ -938,7 +938,7 @@ workspace "eepp"
|
||||
defines { "EE_MAPS_EXPORTS" }
|
||||
build_base_cpp_configuration( "eepp-maps" )
|
||||
postsymlinklib_arch( "eepp-maps" )
|
||||
target_dir_lib("eepp-maps")
|
||||
target_dir_lib("")
|
||||
filter "action:not vs*"
|
||||
buildoptions { "-Wall" }
|
||||
|
||||
@@ -953,7 +953,7 @@ workspace "eepp"
|
||||
defines { "EE_STATIC" }
|
||||
end
|
||||
build_base_cpp_configuration( "eepp-physics-static" )
|
||||
target_dir_lib("eepp-physics")
|
||||
target_dir_lib("")
|
||||
filter "action:not vs*"
|
||||
buildoptions { "-Wall" }
|
||||
|
||||
@@ -967,7 +967,7 @@ workspace "eepp"
|
||||
defines { "EE_PHYSICS_EXPORTS" }
|
||||
build_base_cpp_configuration( "eepp-physics" )
|
||||
postsymlinklib_arch( "eepp-physics" )
|
||||
target_dir_lib("eepp-physics")
|
||||
target_dir_lib("")
|
||||
filter "action:not vs*"
|
||||
buildoptions { "-Wall" }
|
||||
|
||||
@@ -981,7 +981,7 @@ workspace "eepp"
|
||||
defines { "EE_STATIC" }
|
||||
end
|
||||
build_base_cpp_configuration( "eterm" )
|
||||
target_dir_lib("eterm")
|
||||
target_dir_lib("")
|
||||
filter "action:not vs*"
|
||||
buildoptions { "-Wall" }
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 13 KiB |
@@ -2,7 +2,6 @@
|
||||
cd "$(dirname "$0")" || exit
|
||||
|
||||
ARCH=32
|
||||
ARCHI=x86
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
config=*)
|
||||
@@ -16,29 +15,9 @@ done
|
||||
|
||||
if [[ "$CONFIG" == *"x86_64"* ]]; then
|
||||
ARCH=64
|
||||
ARCHI=x86_64
|
||||
fi
|
||||
|
||||
premake5 --file=../../premake5.lua --os=windows --cc=mingw --with-mojoal --windows-mingw-build gmake2
|
||||
cd ../../make/windows/ || exit
|
||||
|
||||
mingw"$ARCH"-make "$@"
|
||||
|
||||
case "$OSTYPE" in
|
||||
darwin*|linux*|freebsd*)
|
||||
cd ../../bin/ || exit
|
||||
ln -sf ../libs/windows/$ARCHI/eepp.dll eepp.dll
|
||||
ln -sf ../libs/windows/$ARCHI/eepp-debug.dll eepp-debug.dll
|
||||
;;
|
||||
cygwin*|win*)
|
||||
cd ../../libs/windows/$ARCHI || exit
|
||||
|
||||
if [ -f eepp.dll ]; then
|
||||
cp -f eepp.dll ../../bin/eepp.dll
|
||||
fi
|
||||
|
||||
if [ -f eepp-debug.dll ]; then
|
||||
cp -f eepp-debug.dll ../../bin/eepp-debug.dll
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -458,7 +458,7 @@ void RendererGLES2::texCoordPointer( int size, unsigned int type, int stride, co
|
||||
}
|
||||
|
||||
int RendererGLES2::getStateIndex( const Uint32& State ) {
|
||||
eeASSERT( State < EEGL_ARRAY_STATES_COUNT );
|
||||
eeASSERT( State < EEGL_ARRAY_STATES_COUNT || State == EEGL_TEXTURE_COORD_ARRAY );
|
||||
|
||||
if ( EEGL_TEXTURE_COORD_ARRAY == State )
|
||||
return mTextureUnits[mCurActiveTex];
|
||||
|
||||
@@ -178,7 +178,8 @@ void VertexBuffer::addQuad( const Vector2f& pos, const Sizef& size, const Color&
|
||||
void VertexBuffer::setQuad( const Vector2u& gridPos, const Vector2f& pos, const Sizef& size,
|
||||
const Color& color ) {
|
||||
eeASSERT( mDrawType == PrimitiveType::PRIMITIVE_QUADS ||
|
||||
mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP );
|
||||
mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP ||
|
||||
mDrawType == PrimitiveType::PRIMITIVE_TRIANGLES );
|
||||
eeASSERT( mGridSize != Sizei::Zero );
|
||||
eeASSERT( static_cast<Uint32>( gridPos.x * GLi->quadVertexs() +
|
||||
gridPos.y * mGridSize.x * GLi->quadVertexs() +
|
||||
@@ -214,7 +215,8 @@ void VertexBuffer::setQuad( const Vector2u& gridPos, const Vector2f& pos, const
|
||||
|
||||
void VertexBuffer::setQuadColor( const Vector2u& gridPos, const Color& color ) {
|
||||
eeASSERT( mDrawType == PrimitiveType::PRIMITIVE_QUADS ||
|
||||
mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP );
|
||||
mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP ||
|
||||
mDrawType == PrimitiveType::PRIMITIVE_TRIANGLES );
|
||||
eeASSERT( mGridSize != Sizei::Zero );
|
||||
eeASSERT( static_cast<Uint32>( gridPos.x * GLi->quadVertexs() +
|
||||
gridPos.y * mGridSize.x * GLi->quadVertexs() +
|
||||
@@ -241,7 +243,8 @@ void VertexBuffer::setQuadColor( const Vector2u& gridPos, const Color& color ) {
|
||||
void VertexBuffer::setQuadFree( const Vector2u& gridPos, const Vector2f& pos0, const Vector2f& pos1,
|
||||
const Vector2f& pos2, const Vector2f& pos3, const Color& color ) {
|
||||
eeASSERT( mDrawType == PrimitiveType::PRIMITIVE_QUADS ||
|
||||
mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP );
|
||||
mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP ||
|
||||
mDrawType == PrimitiveType::PRIMITIVE_TRIANGLES );
|
||||
eeASSERT( mGridSize != Sizei::Zero );
|
||||
eeASSERT( static_cast<Uint32>( gridPos.x * GLi->quadVertexs() +
|
||||
gridPos.y * mGridSize.x * GLi->quadVertexs() +
|
||||
@@ -278,7 +281,8 @@ void VertexBuffer::setQuadFree( const Vector2u& gridPos, const Vector2f& pos0, c
|
||||
void VertexBuffer::setQuadTexCoords( const Vector2u& gridPos, const Rectf& coords,
|
||||
const Uint32& textureLevel ) {
|
||||
eeASSERT( mDrawType == PrimitiveType::PRIMITIVE_QUADS ||
|
||||
mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP );
|
||||
mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP ||
|
||||
mDrawType == PrimitiveType::PRIMITIVE_TRIANGLES );
|
||||
eeASSERT( mGridSize != Sizei::Zero );
|
||||
eeASSERT( static_cast<Uint32>( gridPos.x * GLi->quadVertexs() +
|
||||
gridPos.y * mGridSize.x * GLi->quadVertexs() +
|
||||
|
||||
@@ -2715,7 +2715,7 @@ void App::loadFileSystemMatcher( const std::string& folderPath ) {
|
||||
static std::string GetCurrentProcessName() {
|
||||
#if defined( __APPLE__ ) || defined( __FreeBSD__ )
|
||||
return getprogname();
|
||||
#elif defined( _GNU_SOURCE )
|
||||
#elif defined( _GNU_SOURCE ) && EE_PLATFORM != EE_PLATFORM_ANDROID && EE_PLATFORM != EE_PLATFORM_IOS
|
||||
return program_invocation_name;
|
||||
#elif defined( _WIN32 )
|
||||
return __argv[0];
|
||||
@@ -2730,7 +2730,7 @@ static std::string GetCurrentProcessName() {
|
||||
#endif
|
||||
|
||||
static std::string getCurrentProcessPath() {
|
||||
#if EE_PLATFORM != EE_PLATFORM_MACOSX
|
||||
#if EE_PLATFORM != EE_PLATFORM_MACOSX && EE_PLATFORM != EE_PLATFORM_ANDROID
|
||||
auto path( Sys::getProcessPath() );
|
||||
FileSystem::dirAddSlashAtEnd( path );
|
||||
if ( String::startsWith( GetCurrentProcessName(), Sys::getProcessPath() ) ) {
|
||||
@@ -2741,6 +2741,8 @@ static std::string getCurrentProcessPath() {
|
||||
path += GetCurrentProcessName();
|
||||
}
|
||||
return path;
|
||||
#elif EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
return Sys::getProcessPath();
|
||||
#else
|
||||
char pathbuf[PROC_PIDPATHINFO_MAXSIZE];
|
||||
pid_t pid = getpid();
|
||||
@@ -2833,7 +2835,12 @@ FontTrueType* App::loadFont( const std::string& name, std::string fontPath,
|
||||
const std::string& fallback ) {
|
||||
if ( FileSystem::isRelativePath( fontPath ) )
|
||||
fontPath = mResPath + fontPath;
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
if ( fontPath.empty() ||
|
||||
( !FileSystem::fileExists( fontPath ) && !PackManager::instance()->exists( fontPath ) ) ) {
|
||||
#else
|
||||
if ( fontPath.empty() || !FileSystem::fileExists( fontPath ) ) {
|
||||
#endif
|
||||
fontPath = fallback;
|
||||
if ( !fontPath.empty() && FileSystem::isRelativePath( fontPath ) )
|
||||
fontPath = mResPath + fontPath;
|
||||
@@ -2878,11 +2885,20 @@ void App::init( const LogLevel& logLevel, std::string file, const Float& pidelDe
|
||||
: 0 );
|
||||
mDisplayDPI = currentDisplay->getDPI();
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
mConfig.windowState.pixelDensity =
|
||||
pidelDensity > 0
|
||||
? pidelDensity
|
||||
: ( mConfig.windowState.pixelDensity > 0 ? mConfig.windowState.pixelDensity
|
||||
: currentDisplay->getPixelDensity() > 2 ? currentDisplay->getPixelDensity() / 2
|
||||
: currentDisplay->getPixelDensity() );
|
||||
#else
|
||||
mConfig.windowState.pixelDensity =
|
||||
pidelDensity > 0
|
||||
? pidelDensity
|
||||
: ( mConfig.windowState.pixelDensity > 0 ? mConfig.windowState.pixelDensity
|
||||
: currentDisplay->getPixelDensity() );
|
||||
#endif
|
||||
|
||||
displayManager->enableScreenSaver();
|
||||
displayManager->enableMouseFocusClickThrough();
|
||||
|
||||
@@ -24,6 +24,7 @@ const char* LAYOUT = R"xml(
|
||||
background-image: icon(ecode,256dp);
|
||||
background-position: center center;
|
||||
background-tint: var(--font-hint);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
#home_logo:hover {
|
||||
background-tint: var(--primary);
|
||||
|
||||