Skip to content

Commit

Permalink
update android CMake 3.30.4
Browse files Browse the repository at this point in the history
update android gradle 8.7.0
add cmake ADD_MENGINE_EXECUTABLE_WIN32_CONSOLE
add LoggerService setThreadMode
update shader PSO ps_2_0
ref-in tools to console
wip ProjectBuilder
  • Loading branch information
irov committed Oct 5, 2024
1 parent 01247be commit f36ba29
Show file tree
Hide file tree
Showing 52 changed files with 278 additions and 208 deletions.
2 changes: 1 addition & 1 deletion build/android/build_depends_android.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set CONFIGURATION=%1
@echo Starting android dependencies build %CONFIGURATION% configuration...

set ANDROID_NDK_VERSION=27.1.12297006
set ANDROID_CMAKE_VERSION=3.30.3
set ANDROID_CMAKE_VERSION=3.30.4

set ANDROID_PLATFORM_VERSION=21
set ANDROID_PLATFORM=android-%ANDROID_PLATFORM_VERSION%
Expand Down
38 changes: 38 additions & 0 deletions cmake/macro_template.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -780,8 +780,46 @@ MACRO(ADD_MENGINE_SHARED)
SET(APPLICATION_DEPENDENCIES ${APPLICATION_DEPENDENCIES} ${PROJECT_NAME} PARENT_SCOPE)
ENDMACRO()

MACRO(ADD_MENGINE_EXECUTABLE_WIN32_CONSOLE)
ADD_DEFINITIONS(-DMENGINE_LIBRARY_NAME="${PROJECT_NAME}")

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE")

ADD_EXECUTABLE(${PROJECT_NAME} WIN32 ${SRC_FILES})

if(MSVC)
target_sources(${PROJECT_NAME} INTERFACE ${MENGINE_REPOSITORY}/contributing/codestyle/mengine.natvis)
endif()

if(MENGINE_EXTERNAL_PDB)
if(MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES
COMPILE_PDB_NAME ${PROJECT_NAME}
PDB_OUTPUT_DIRECTORY ${MENGINE_EXTERNAL_PDB_PATH}
)
elseif(MINGW)
target_compile_options(${PROJECT_NAME} PRIVATE -gcodeview)
target_link_options(${PROJECT_NAME} PRIVATE -Wl,-pdb=${MENGINE_EXTERNAL_PDB_PATH}/${PROJECT_NAME}.pdb)
endif()
else()
if(MENGINE_BUILD_TYPE_DEBUG)
if(MINGW)
target_compile_options(${PROJECT_NAME} PRIVATE -gcodeview)
target_link_options(${PROJECT_NAME} PRIVATE -Wl,-pdb=)
endif()
endif()
endif()

IF(MSVC AND MENGINE_USE_PRECOMPILED_HEADER)
ADD_DEPENDENCIES(${PROJECT_NAME} PrecompiledHeader)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PrecompiledHeader)
ENDIF()
ENDMACRO()

MACRO(ADD_MENGINE_EXECUTABLE_WIN32)
ADD_DEFINITIONS(-DMENGINE_LIBRARY_NAME="${PROJECT_NAME}")

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")

ADD_EXECUTABLE(${PROJECT_NAME} WIN32 ${SRC_FILES})

Expand Down
4 changes: 2 additions & 2 deletions cmake/mingw64_template.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -femulated-tls -fuse-ld=lld -DWIN32 -D_WIN64
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -femulated-tls -fuse-ld=lld -DWIN32 -D_WIN64 -m64")

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -fno-strict-aliasing -fomit-frame-pointer -std=c11 -O0")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-strict-aliasing -fomit-frame-pointer -std=c11 -O3 -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-strict-aliasing -fomit-frame-pointer -std=c11 -O2 -DNDEBUG")

set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -fno-strict-aliasing -fomit-frame-pointer -std=c++17 -O0 -UMBCS -D_UNICODE -DUNICODE")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing -fomit-frame-pointer -std=c++17 -O3 -DNDEBUG -UMBCS -D_UNICODE -DUNICODE")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing -fomit-frame-pointer -std=c++17 -O2 -DNDEBUG -UMBCS -D_UNICODE -DUNICODE")

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
4 changes: 2 additions & 2 deletions cmake/mingw_template.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -femulated-tls -fuse-ld=lld -DWIN32 -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -femulated-tls -fuse-ld=lld -DWIN32 -m32")

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -fno-strict-aliasing -fomit-frame-pointer -std=c11 -O0 -D_DEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-strict-aliasing -fomit-frame-pointer -std=c11 -O3 -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-strict-aliasing -fomit-frame-pointer -std=c11 -O2 -DNDEBUG")

set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -fno-strict-aliasing -fomit-frame-pointer -std=c++17 -O0 -D_DEBUG -UMBCS -D_UNICODE -DUNICODE")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing -fomit-frame-pointer -std=c++17 -O3 -DNDEBUG -UMBCS -D_UNICODE -DUNICODE")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing -fomit-frame-pointer -std=c++17 -O2 -DNDEBUG -UMBCS -D_UNICODE -DUNICODE")

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
4 changes: 2 additions & 2 deletions gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:8.6.1'
classpath 'com.android.tools.build:gradle:8.7.0'

if (Utils.existAppPlugin(project, "MENGINE_APP_PLUGIN_GOOGLE_SERVICE") == true) {
classpath 'com.google.gms:google-services:4.4.2'
Expand Down Expand Up @@ -64,7 +64,7 @@ allprojects {
if (ANDROID_APP_CMAKE_VERSION != null) {
cmakeVersion = ANDROID_APP_CMAKE_VERSION
} else {
cmakeVersion = "3.30.3"
cmakeVersion = "3.30.4"
}

if (ANDROID_APP_MULTIDEX_ENABLE != null) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Dec 21 15:34:45 EET 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 4 additions & 0 deletions src/Interface/LoggerServiceInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ namespace Mengine
virtual void setVerboseFilter( uint32_t _filter ) = 0;
virtual uint32_t getVerboseFilter() const = 0;

public:
virtual void setThreadMode( bool _threadMode ) = 0;
virtual bool getThreadMode() const = 0;

public:
virtual void setSilent( bool _silent ) = 0;
virtual bool isSilent() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel/AssertionAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# include "Interface/UnknownAllocatorDebugReportInterface.h"

# define MENGINE_ASSERTION_ALLOCATOR(C) ([=](){\
UnknownAllocatorDebugReportInterface * debugReport = ALLOCATOR_SYSTEM()->getUnknown();\
Mengine::UnknownAllocatorDebugReportInterface * debugReport = ALLOCATOR_SYSTEM()->getUnknown();\
if( debugReport == nullptr ){ return; }\
size_t alloc_count = debugReport->findAllocatorReportInfo( C );\
MENGINE_ASSERTION( alloc_count == 0, "'%s' memleak [%zu]", C , alloc_count);\
Expand Down
6 changes: 3 additions & 3 deletions src/Kernel/AssertionCharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace Mengine
}
}

# define MENGINE_ASSERTION_STANDARD_CHARACTER_SET(Value, Len) Detail::assertionStandardCharacterSet(MENGINE_CODE_LIBRARY, Value, Len, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_LOWER_CHARACTER_SET(Value, Len) Detail::assertionLowerCharacterSet(MENGINE_CODE_LIBRARY, Value, Len, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_UPPER_CHARACTER_SET(Value, Len) Detail::assertionUpperCharacterSet(MENGINE_CODE_LIBRARY, Value, Len, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_STANDARD_CHARACTER_SET(Value, Len) Mengine::Detail::assertionStandardCharacterSet(MENGINE_CODE_LIBRARY, Value, Len, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_LOWER_CHARACTER_SET(Value, Len) Mengine::Detail::assertionLowerCharacterSet(MENGINE_CODE_LIBRARY, Value, Len, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_UPPER_CHARACTER_SET(Value, Len) Mengine::Detail::assertionUpperCharacterSet(MENGINE_CODE_LIBRARY, Value, Len, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
#else
# define MENGINE_ASSERTION_STANDARD_CHARACTER_SET(Value, Len)
# define MENGINE_ASSERTION_LOWER_CHARACTER_SET(Value, Len)
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel/AssertionFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Mengine
}
}
//////////////////////////////////////////////////////////////////////////
# define MENGINE_ASSERTION_FACTORY_EMPTY(F) Detail::assertionFactoryEmpty(MENGINE_CODE_LIBRARY, F, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_FACTORY_EMPTY(F) Mengine::Detail::assertionFactoryEmpty(MENGINE_CODE_LIBRARY, F, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
#else
# define MENGINE_ASSERTION_FACTORY_EMPTY(F)
#endif
2 changes: 1 addition & 1 deletion src/Kernel/AssertionIdentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Mengine
}
}

# define MENGINE_ASSERTION_IDENTITY(Identity) Detail::assertionIdentity(MENGINE_CODE_LIBRARY, Identity, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_IDENTITY(Identity) Mengine::Detail::assertionIdentity(MENGINE_CODE_LIBRARY, Identity, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
#else
# define MENGINE_ASSERTION_IDENTITY(Identity)
#endif
4 changes: 2 additions & 2 deletions src/Kernel/AssertionResourceType.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# define MENGINE_ASSERTION_RESOURCE_TYPE_BY_NAME( ResourceName, ResourceType, Ret, ... )\
if( RESOURCE_SERVICE()->hasResource(ConstString::none(), ResourceName, false, nullptr) == true )\
{\
if( Helper::dynamicResourceCast<ResourceType>(RESOURCE_SERVICE()->getResourceReference(ConstString::none(), ResourceName)) == nullptr )\
if( Mengine::Helper::dynamicResourceCast<ResourceType>(RESOURCE_SERVICE()->getResourceReference(Mengine::ConstString::none(), ResourceName)) == nullptr )\
{\
Mengine::Helper::Assertion(MENGINE_CODE_LIBRARY, Mengine::ASSERTION_LEVEL_FATAL, #ResourceType, MENGINE_CODE_FILE, MENGINE_CODE_LINE, __VA_ARGS__);\
return Ret;\
Expand All @@ -20,7 +20,7 @@
# define MENGINE_ASSERTION_RESOURCE_TYPE_BY_NAME_VOID( ResourceName, ResourceType, Ret, ... )\
if( RESOURCE_SERVICE()->hasResource(ConstString::none(), ResourceName, false, nullptr) == true )\
{\
if( Helper::dynamicResourceCast<ResourceType>(RESOURCE_SERVICE()->getResourceReference(ConstString::none(), ResourceName)) == nullptr )\
if( Mengine::Helper::dynamicResourceCast<ResourceType>(RESOURCE_SERVICE()->getResourceReference(Mengine::ConstString::none(), ResourceName)) == nullptr )\
{\
Mengine::Helper::Assertion(MENGINE_CODE_LIBRARY, Mengine::ASSERTION_LEVEL_FATAL, #ResourceType, MENGINE_CODE_FILE, MENGINE_CODE_LINE, __VA_ARGS__);\
return;\
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel/AssertionStatistic.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Mengine
}
}

# define MENGINE_ASSERTION_STATISTIC_EMPTY(ID) Detail::assertionStatisticEmpty(MENGINE_CODE_LIBRARY, ID, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_STATISTIC_EMPTY(ID) Mengine::Detail::assertionStatisticEmpty(MENGINE_CODE_LIBRARY, ID, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
#else
# define MENGINE_ASSERTION_STATISTIC_EMPTY(ID)
#endif
2 changes: 1 addition & 1 deletion src/Kernel/AssertionType.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#if defined(MENGINE_ASSERTION_DEBUG_ENABLE)
# include "Config/DynamicCast.h"

# define MENGINE_ASSERTION_TYPE(Ptr, Type, ...) if(Helper::dynamicCast<Type>(Ptr) == nullptr) Mengine::Helper::AssertionOperator( MENGINE_CODE_LIBRARY, Mengine::ASSERTION_LEVEL_FATAL, #Ptr " invalid type: '" #Type "'", MENGINE_CODE_FILE, MENGINE_CODE_LINE ) (__VA_ARGS__)
# define MENGINE_ASSERTION_TYPE(Ptr, Type, ...) if(Mengine::Helper::dynamicCast<Type>(Ptr) == nullptr) Mengine::Helper::AssertionOperator( MENGINE_CODE_LIBRARY, Mengine::ASSERTION_LEVEL_FATAL, #Ptr " invalid type: '" #Type "'", MENGINE_CODE_FILE, MENGINE_CODE_LINE ) (__VA_ARGS__)
#else
# define MENGINE_ASSERTION_TYPE(Ptr, Type, ...)
#endif
2 changes: 1 addition & 1 deletion src/Kernel/AssertionUtf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Mengine
}
}

# define MENGINE_ASSERTION_VALIDATE_UTF8(Value, Len) Detail::assertionValidateUtf8(MENGINE_CODE_LIBRARY, Value, Len, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_VALIDATE_UTF8(Value, Len) Mengine::Detail::assertionValidateUtf8(MENGINE_CODE_LIBRARY, Value, Len, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
#else
# define MENGINE_ASSERTION_VALIDATE_UTF8(Value, Len)
#endif
2 changes: 1 addition & 1 deletion src/Kernel/AssertionVSNPRINTF.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Mengine
}
}

# define MENGINE_ASSERTION_VSNPRINTF(CAPACITY, FORMAT, ARGS) Detail::assertionVSNPRINTF(MENGINE_CODE_LIBRARY, CAPACITY, FORMAT, ARGS, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_VSNPRINTF(CAPACITY, FORMAT, ARGS) Mengine::Detail::assertionVSNPRINTF(MENGINE_CODE_LIBRARY, CAPACITY, FORMAT, ARGS, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
#else
# define MENGINE_ASSERTION_VSNPRINTF(CAPACITY, FORMAT, ARGS)
#endif
2 changes: 1 addition & 1 deletion src/Kernel/AssertionVocabulary.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Mengine
}
}

# define MENGINE_ASSERTION_VOCABULARY_EMPTY(Key) Detail::assertionVocabularyEmpty(MENGINE_CODE_LIBRARY, Key, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
# define MENGINE_ASSERTION_VOCABULARY_EMPTY(Key) Mengine::Detail::assertionVocabularyEmpty(MENGINE_CODE_LIBRARY, Key, MENGINE_CODE_FILE, MENGINE_CODE_LINE)
#else
# define MENGINE_ASSERTION_VOCABULARY_EMPTY(Key)
#endif
4 changes: 2 additions & 2 deletions src/Platforms/Win32Platform/Win32DynamicLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ namespace Mengine

if( hInstance == NULL )
{
LOGGER_ERROR( "invalid load '%s' %ls"
, name
LOGGER_ERROR( "invalid load '%ls' %ls"
, unicode_name
, Helper::Win32GetLastErrorMessageW()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace Mengine
full_output += outputFilePath;

WChar command[MENGINE_MAX_COMMAND_LENGTH] = {'\0'};
MENGINE_SWPRINTF( command, MENGINE_MAX_COMMAND_LENGTH, L"/nologo /T ps_1_1 /O3 /Gec /Fo \"%S\" \"%S\""
MENGINE_SWPRINTF( command, MENGINE_MAX_COMMAND_LENGTH, L"/nologo /T ps_2_0 /O3 /Gec /Fo \"%S\" \"%S\""
, full_output.c_str()
, full_input.c_str()
);
Expand Down
20 changes: 16 additions & 4 deletions src/Services/LoggerService/LoggerService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ namespace Mengine
, m_silentMessageRelease( false )
, m_historically( true )
, m_threadly( false )
, m_threadMode( MENGINE_BUILD_PUBLISH_VALUE( true, false ) )
{
m_staticsticLevel[LM_SILENT] = STATISTIC_LOGGER_MESSAGE_SILENT;
m_staticsticLevel[LM_FATAL] = STATISTIC_LOGGER_MESSAGE_FATAL;
Expand Down Expand Up @@ -333,6 +334,16 @@ namespace Mengine
return m_verboseFilter;
}
//////////////////////////////////////////////////////////////////////////
void LoggerService::setThreadMode( bool _threadMode )
{
m_threadMode = _threadMode;
}
//////////////////////////////////////////////////////////////////////////
bool LoggerService::getThreadMode() const
{
return m_threadMode;
}
//////////////////////////////////////////////////////////////////////////
void LoggerService::setSilent( bool _silent )
{
m_silent = _silent;
Expand Down Expand Up @@ -524,11 +535,12 @@ namespace Mengine

this->clearHistory();

#if defined(MENGINE_BUILD_PUBLISH_ENABLE)
MENGINE_THREAD_MUTEX_SCOPE( m_mutexMessageBlock );
if( m_threadMode == true )
{
MENGINE_THREAD_MUTEX_SCOPE( m_mutexMessageBlock );

m_threadly = true;
#endif
m_threadly = true;
}
}
//////////////////////////////////////////////////////////////////////////
void LoggerService::processMessages_( const ThreadIdentityRunnerInterfacePtr & _runner )
Expand Down
5 changes: 5 additions & 0 deletions src/Services/LoggerService/LoggerService.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ namespace Mengine
void setVerboseFilter( uint32_t _filter ) override;
uint32_t getVerboseFilter() const override;

public:
void setThreadMode( bool _threadMode ) override;
bool getThreadMode() const override;

public:
void setSilent( bool _silent ) override;
bool isSilent() const override;
Expand Down Expand Up @@ -126,6 +130,7 @@ namespace Mengine

bool m_historically;
bool m_threadly;
bool m_threadMode;

MemoryInterfacePtr m_memoryOldLog;
ContentInterfacePtr m_currentContentLog;
Expand Down
12 changes: 6 additions & 6 deletions src/Tools/AlphaPremultiplier/AlphaPremultiplier.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "ToolUtils/ToolUtils.h"
#include "Config/Config.h"

#include "ToolUtils/ToolUtils.h"

#define STBI_ONLY_PNG
#define STB_IMAGE_IMPLEMENTATION
Expand All @@ -10,12 +12,10 @@
#include <malloc.h>

//////////////////////////////////////////////////////////////////////////
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
int main( int argc, char * argv[] )
{
(void)hInstance;
(void)hPrevInstance;
(void)lpCmdLine;
(void)nShowCmd;
MENGINE_UNUSED( argc );
MENGINE_UNUSED( argv );

PWSTR pwCmdLine = ::GetCommandLineW();

Expand Down
2 changes: 1 addition & 1 deletion src/Tools/AlphaPremultiplier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ add_definitions(-D_UNICODE)
INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/stb_image)

LINK_DIRECTORIES(${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
ADD_EXECUTABLE(${PROJECT_NAME} WIN32 ${SRC_FILES})
ADD_MENGINE_EXECUTABLE_WIN32_CONSOLE()

TARGET_LINK_LIBRARIES(${PROJECT_NAME} ToolUtils)
12 changes: 6 additions & 6 deletions src/Tools/AlphaSpreading/AlphaSpreading.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "ToolUtils/ToolUtils.h"
#include "Config/Config.h"

#include "ToolUtils/ToolUtils.h"

#define STBI_ONLY_PNG
#define STB_IMAGE_IMPLEMENTATION
Expand All @@ -10,12 +12,10 @@
#include <malloc.h>

//////////////////////////////////////////////////////////////////////////
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
int main( int argc, char * argv[] )
{
(void)hInstance;
(void)hPrevInstance;
(void)lpCmdLine;
(void)nShowCmd;
MENGINE_UNUSED( argc );
MENGINE_UNUSED( argv );

PWSTR pwCmdLine = ::GetCommandLineW();

Expand Down
2 changes: 1 addition & 1 deletion src/Tools/AlphaSpreading/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ add_definitions(-D_UNICODE)
INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/stb_image)

LINK_DIRECTORIES(${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
ADD_MENGINE_EXECUTABLE_WIN32()
ADD_MENGINE_EXECUTABLE_WIN32_CONSOLE()

TARGET_LINK_LIBRARIES(${PROJECT_NAME} ToolUtils)
8 changes: 3 additions & 5 deletions src/Tools/AstralaxCompiler/AstralaxCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ extern "C"
//////////////////////////////////////////////////////////////////////////
}
//////////////////////////////////////////////////////////////////////////
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
int main( int argc, char * argv[] )
{
MENGINE_UNUSED( hInstance );
MENGINE_UNUSED( hPrevInstance );
MENGINE_UNUSED( lpCmdLine );
MENGINE_UNUSED( nShowCmd );
MENGINE_UNUSED( argc );
MENGINE_UNUSED( argv );

PWSTR pwCmdLine = ::GetCommandLineW();

Expand Down
2 changes: 1 addition & 1 deletion src/Tools/AstralaxCompiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ INCLUDE_DIRECTORIES(
)

LINK_DIRECTORIES( ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} )
ADD_MENGINE_EXECUTABLE_WIN32()
ADD_MENGINE_EXECUTABLE_WIN32_CONSOLE()

if(MENGINE_TOOLCHAIN_MINGW)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${THIRDPARTY_DIR}/astralax/libmagic3d.a)
Expand Down
Loading

0 comments on commit f36ba29

Please sign in to comment.