Fix linux build and distribution release processes.
This commit is contained in:
parent
0f2deb5f99
commit
d0366c21c7
4
.gitignore
vendored
4
.gitignore
vendored
@ -11,6 +11,7 @@
|
||||
*.sln.docstates
|
||||
emsdk
|
||||
emscripten
|
||||
release
|
||||
commercial_assets
|
||||
*.o
|
||||
*.h.gch
|
||||
@ -400,3 +401,6 @@ test.cpp
|
||||
/x64/Release/Adventures in Lestoria.zip
|
||||
/x64/Release/Adventures in Lestoria_web.zip
|
||||
/x64/Release/AdventuresInLestoria_web.zip
|
||||
Adventures in Lestoria/packkey.cpp
|
||||
Adventures in Lestoria/packkey.cpp
|
||||
packkey.cpp
|
@ -2691,9 +2691,17 @@ int main()
|
||||
windowPosConf={loadSystemFile["Window Pos"].GetInt(0),loadSystemFile["Window Pos"].GetInt(1)};
|
||||
}
|
||||
if(loadSystemFile.HasProperty("Window Size"))windowSizeConf={loadSystemFile["Window Size"].GetInt(0),loadSystemFile["Window Size"].GetInt(1)};
|
||||
size_t requiredSize;
|
||||
size_t requiredSize=0;
|
||||
|
||||
getenv_s( &requiredSize, NULL, 0, "SteamTenfoot");
|
||||
#ifdef WIN32
|
||||
getenv_s( &requiredSize, NULL, 0, "SteamTenfoot");
|
||||
#else
|
||||
const char*bigPicture=getenv("SteamTenfoot");
|
||||
if(bigPicture){
|
||||
requiredSize=strlen(bigPicture);
|
||||
LOG("Big Picture reported a length of "<<requiredSize);
|
||||
}
|
||||
#endif
|
||||
if(loadSystemFile.HasProperty("Fullscreen"))fullscreenConf=loadSystemFile["Fullscreen"].GetBool();
|
||||
if(requiredSize>0)fullscreenConf=true;
|
||||
}
|
||||
|
@ -43,6 +43,8 @@ All rights reserved.
|
||||
#include "InputDisplayComponent.h"
|
||||
#include "olcPGEX_Gamepad.h"
|
||||
|
||||
#undef KEY_BACK
|
||||
|
||||
using A=Attribute;
|
||||
|
||||
INCLUDE_WINDOW_SIZE
|
||||
|
@ -142,7 +142,7 @@ std::unordered_map<EInputActionOrigin,std::string>Input::steamIconToGameIcon{
|
||||
};
|
||||
|
||||
Input::Input(InputType type,int key)
|
||||
:type(type),key(key){}
|
||||
:type(type),key(key){}
|
||||
|
||||
void Input::Initialize(){
|
||||
for(int i=0;i<STEAM_INPUT_MAX_COUNT;i++){
|
||||
|
@ -36,11 +36,16 @@ All rights reserved.
|
||||
*/
|
||||
#pragma endregion
|
||||
#pragma once
|
||||
#include "AdventuresInLestoria.h"
|
||||
#include "MenuComponent.h"
|
||||
#include "LoadingScreen.h"
|
||||
#include "Key.h"
|
||||
#include "Menu.h"
|
||||
#undef KEY_LEFT
|
||||
#undef KEY_UP
|
||||
#undef KEY_RIGHT
|
||||
#undef KEY_DOWN
|
||||
#include "AdventuresInLestoria.h"
|
||||
|
||||
|
||||
using A=Attribute;
|
||||
|
||||
|
0
Adventures in Lestoria/libsteam_api.so
Normal file → Executable file
0
Adventures in Lestoria/libsteam_api.so
Normal file → Executable file
@ -32,9 +32,17 @@ struct MatchMakingKeyValuePair_t
|
||||
MatchMakingKeyValuePair_t() { m_szKey[0] = m_szValue[0] = 0; }
|
||||
MatchMakingKeyValuePair_t( const char *pchKey, const char *pchValue )
|
||||
{
|
||||
strncpy_s( m_szKey, pchKey, sizeof(m_szKey) ); // this is a public header, use basic c library string funcs only!
|
||||
#ifdef WIN32
|
||||
strncpy_s( m_szKey, pchKey, sizeof(m_szKey) ); // this is a public header, use basic c library string funcs only!
|
||||
#else
|
||||
strncpy( m_szKey, pchKey, sizeof(m_szKey) );
|
||||
#endif
|
||||
m_szKey[ sizeof( m_szKey ) - 1 ] = '\0';
|
||||
strncpy_s( m_szValue, pchValue, sizeof(m_szValue) );
|
||||
#ifdef WIN32
|
||||
strncpy_s( m_szValue, pchValue, sizeof(m_szValue) );
|
||||
#else
|
||||
strncpy( m_szValue, pchValue, sizeof(m_szValue) );
|
||||
#endif
|
||||
m_szValue[ sizeof( m_szValue ) - 1 ] = '\0';
|
||||
}
|
||||
char m_szKey[ 256 ];
|
||||
@ -223,7 +231,11 @@ inline const char* gameserveritem_t::GetName() const
|
||||
|
||||
inline void gameserveritem_t::SetName( const char *pName )
|
||||
{
|
||||
strncpy_s( m_szServerName, pName, sizeof( m_szServerName ) );
|
||||
#ifdef WIN32
|
||||
strncpy_s( m_szServerName, pName, sizeof( m_szServerName ) );
|
||||
#else
|
||||
strncpy( m_szServerName, pName, sizeof( m_szServerName ) );
|
||||
#endif
|
||||
m_szServerName[ sizeof( m_szServerName ) - 1 ] = '\0';
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,9 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_PROFILE "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_PROFILE "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_PROFILE "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS
|
||||
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,\"Adventures in Lestoria\"")
|
||||
|
||||
set(SOURCE_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${ASSETS_DIR})
|
||||
set(SOURCE_DATA_EMSCRIPTEN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${ASSETS_EMSCRIPTEN_DIR})
|
||||
set(SOURCE_CXX_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${C_CXX_HEADERS_DIR})
|
||||
@ -262,6 +265,7 @@ if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
|
||||
target_include_directories(${OutputExecutable} PRIVATE ${FREETYPE_INCLUDE_DIRS})
|
||||
|
||||
target_include_directories(${OutputExecutable} PRIVATE "${C_CXX_SOURCES_DIR}/discord-files")
|
||||
target_include_directories(${OutputExecutable} PRIVATE "${C_CXX_SOURCES_DIR}/steam")
|
||||
link_directories("Adventures in Lestoria")
|
||||
|
||||
# TODO: sanity checks
|
||||
@ -297,11 +301,12 @@ if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
|
||||
|
||||
# stdc++fs
|
||||
target_link_libraries(${OutputExecutable} stdc++fs)
|
||||
link_directories("${CMAKE_SOURCE_DIR}/Adventures in Lestoria")
|
||||
target_link_options(
|
||||
${OutputExecutable}
|
||||
PRIVATE
|
||||
-g
|
||||
"Adventures in Lestoria/discord_game_sdk.so")
|
||||
"Adventures in Lestoria/discord_game_sdk.so"
|
||||
"Adventures in Lestoria/libsteam_api.so")
|
||||
|
||||
endif() # Linux
|
||||
|
||||
|
BIN
discord_game_sdk.so
Normal file
BIN
discord_game_sdk.so
Normal file
Binary file not shown.
20
distribute.sh
Executable file
20
distribute.sh
Executable file
@ -0,0 +1,20 @@
|
||||
rm -R release
|
||||
mkdir release
|
||||
mkdir release/assets
|
||||
cp -R "Adventures in Lestoria/assets/Campaigns" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/config" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/maps" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/backgrounds" release/assets
|
||||
rm -R release/assets/backgrounds/commercial_assets
|
||||
rm -R release/assets/maps/commercial_assets
|
||||
cp -R "Adventures in Lestoria/assets/monsters" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/music" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/npcs" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/sounds" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/themes" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/gamepack.pak" release/assets
|
||||
cp -R "Adventures in Lestoria/assets/*.ttf" release/assets
|
||||
cp -R "Adventures in Lestoria/controller_config" release
|
||||
|
||||
|
||||
rm release/*.pdb
|
BIN
libsteam_api.so
Normal file
BIN
libsteam_api.so
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user