mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Now instead of having AI and scripting as separate .dll/.so that is dynamically loaded on requests, these components are part of VCMI library directly. This removes need of custom code for Android/iOS where dynamic loading is blocked as well removes multiple issues on desktop platforms Changes: - Added libFacade module that actually generates libvcmi.so and has all librrary components as its dependencies to resolve circular dependencies - All library components are now OBJECT libraries (and not dynamic or static libraries). Reasoning: STATIC libraries don't work due to way linker walks through compiled units, and DYNAMIC would work, but would keep overhead from inability to inline functions from library. - Removed no longer necessary RPATH handling since here are no more AI and scripting libraries to load - Replaced CDynLibHandler with scaled down AIFactory class
64 lines
1.9 KiB
C++
64 lines
1.9 KiB
C++
/*
|
|
* VCMIDirs.h, part of VCMI engine
|
|
*
|
|
* Authors: listed in file AUTHORS in main folder
|
|
*
|
|
* License: GNU General Public License v2.0 or later
|
|
* Full text of license available in license.txt file, in main folder
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
class DLL_LINKAGE IVCMIDirs
|
|
{
|
|
public:
|
|
// Path to user-specific data directory
|
|
virtual boost::filesystem::path userDataPath() const = 0;
|
|
|
|
// Path to "cache" directory, can be used for any non-essential files
|
|
virtual boost::filesystem::path userCachePath() const = 0;
|
|
|
|
// Path to writeable directory with user configs
|
|
virtual boost::filesystem::path userConfigPath() const = 0;
|
|
|
|
// Path to writeable directory to store log files
|
|
virtual boost::filesystem::path userLogsPath() const;
|
|
|
|
// Path to saved games
|
|
virtual boost::filesystem::path userSavePath() const;
|
|
|
|
// Path to "extracted" directory, used to temporarily hold extracted Original H3 files
|
|
virtual boost::filesystem::path userExtractedPath() const;
|
|
|
|
// Paths to global system-wide data directories. First items have higher priority
|
|
virtual std::vector<boost::filesystem::path> dataPaths() const = 0;
|
|
|
|
// Full path to client executable, including name (e.g. /usr/bin/vcmiclient)
|
|
virtual boost::filesystem::path clientPath() const = 0;
|
|
|
|
// Full path to editor executable, including name (e.g. /usr/bin/vcmieditor)
|
|
virtual boost::filesystem::path mapEditorPath() const = 0;
|
|
|
|
// Full path to server executable, including name (e.g. /usr/bin/vcmiserver)
|
|
virtual boost::filesystem::path serverPath() const = 0;
|
|
|
|
// Path where vcmi binaries can be found
|
|
virtual boost::filesystem::path binaryPath() const = 0;
|
|
|
|
virtual std::string genHelpString() const;
|
|
|
|
// Creates not existed, but required directories.
|
|
// Updates directories what change name/path between versions.
|
|
// Function called automatically.
|
|
virtual void init();
|
|
};
|
|
|
|
namespace VCMIDirs
|
|
{
|
|
extern DLL_LINKAGE const IVCMIDirs & get();
|
|
}
|
|
|
|
VCMI_LIB_NAMESPACE_END
|