mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[cmake] Rebrand desktop version to CoMaps
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -59,8 +59,8 @@ endif()
|
|||||||
target_include_directories(${PROJECT_NAME} PUBLIC ${OMIM_ROOT}/3party/glfw/include)
|
target_include_directories(${PROJECT_NAME} PUBLIC ${OMIM_ROOT}/3party/glfw/include)
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC ${OMIM_ROOT}/3party/imgui)
|
target_include_directories(${PROJECT_NAME} PUBLIC ${OMIM_ROOT}/3party/imgui)
|
||||||
|
|
||||||
set(BUNDLE_NAME "OMapsDevSandbox")
|
set(BUNDLE_NAME "DevSandbox")
|
||||||
set(BUNDLE_DISPLAY_NAME "Organic Maps: Developer Sandbox")
|
set(BUNDLE_DISPLAY_NAME "Developer Render Sandbox")
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${BUNDLE_NAME})
|
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${BUNDLE_NAME})
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ VulkanContextFactory::VulkanContextFactory(uint32_t appVersionCode, int sdkVersi
|
|||||||
appInfo.apiVersion = VK_MAKE_VERSION(1, 0, 0);
|
appInfo.apiVersion = VK_MAKE_VERSION(1, 0, 0);
|
||||||
appInfo.applicationVersion = appVersionCode;
|
appInfo.applicationVersion = appVersionCode;
|
||||||
appInfo.engineVersion = appVersionCode;
|
appInfo.engineVersion = appVersionCode;
|
||||||
appInfo.pApplicationName = "OMaps";
|
appInfo.pApplicationName = "CoMaps";
|
||||||
appInfo.pEngineName = "Drape Engine";
|
appInfo.pEngineName = "Drape Engine";
|
||||||
|
|
||||||
bool enableDiagnostics = false;
|
bool enableDiagnostics = false;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <gflags/gflags.h>
|
#include <gflags/gflags.h>
|
||||||
|
|
||||||
|
|
||||||
DEFINE_string(path_resources, "", "OMaps resources directory");
|
DEFINE_string(path_resources, "", "CoMaps resources directory");
|
||||||
DEFINE_string(path_roads_file, "", "OSM file in o5m format.");
|
DEFINE_string(path_roads_file, "", "OSM file in o5m format.");
|
||||||
DEFINE_string(path_res_file, "", "Path to the resulting file with roads for generator_tool.");
|
DEFINE_string(path_res_file, "", "Path to the resulting file with roads for generator_tool.");
|
||||||
|
|
||||||
|
|||||||
@@ -84,10 +84,10 @@ Platform::Platform()
|
|||||||
auto const homeDir = GetEnv("HOME");
|
auto const homeDir = GetEnv("HOME");
|
||||||
CHECK(homeDir, ("Can't retrieve home directory"));
|
CHECK(homeDir, ("Can't retrieve home directory"));
|
||||||
|
|
||||||
// XDG config directory, usually ~/.config/OMaps/
|
// XDG config directory, usually ~/.config/CoMaps/
|
||||||
m_settingsDir = JoinPath(
|
m_settingsDir = JoinPath(
|
||||||
QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation).toStdString(),
|
QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation).toStdString(),
|
||||||
"OMaps");
|
"CoMaps");
|
||||||
if (!IsFileExistsByFullPath(JoinPath(m_settingsDir, SETTINGS_FILE_NAME)) && !MkDirRecursively(m_settingsDir))
|
if (!IsFileExistsByFullPath(JoinPath(m_settingsDir, SETTINGS_FILE_NAME)) && !MkDirRecursively(m_settingsDir))
|
||||||
MYTHROW(FileSystemException, ("Can't create directory", m_settingsDir));
|
MYTHROW(FileSystemException, ("Can't create directory", m_settingsDir));
|
||||||
m_settingsDir += '/';
|
m_settingsDir += '/';
|
||||||
@@ -103,10 +103,10 @@ Platform::Platform()
|
|||||||
std::string const dirsToScan[] = {
|
std::string const dirsToScan[] = {
|
||||||
"./data", // symlink in the current folder
|
"./data", // symlink in the current folder
|
||||||
"../data", // 'build' folder inside the repo
|
"../data", // 'build' folder inside the repo
|
||||||
JoinPath(*execDir, "..", "organicmaps", "data"), // build-omim-{debug,release}
|
JoinPath(*execDir, "..", "comaps", "data"), // build-omim-{debug,release}
|
||||||
JoinPath(*execDir, "..", "share"), // installed version with packages
|
JoinPath(*execDir, "..", "share"), // installed version with packages
|
||||||
JoinPath(*execDir, "..", "OMaps"), // installed version without packages
|
JoinPath(*execDir, "..", "CoMaps"), // installed version without packages
|
||||||
JoinPath(*execDir, "..", "share", "organicmaps", "data"), // flatpak-build
|
JoinPath(*execDir, "..", "share", "comaps", "data"), // flatpak-build
|
||||||
};
|
};
|
||||||
for (auto const & dir : dirsToScan)
|
for (auto const & dir : dirsToScan)
|
||||||
{
|
{
|
||||||
@@ -119,14 +119,14 @@ Platform::Platform()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Use ~/.local/share/OMaps if resources directory was not writable.
|
// Use ~/.local/share/CoMaps if resources directory was not writable.
|
||||||
if (!m_resourcesDir.empty() && m_writableDir.empty())
|
if (!m_resourcesDir.empty() && m_writableDir.empty())
|
||||||
{
|
{
|
||||||
// The writableLocation does the same for AppDataLocation, AppLocalDataLocation,
|
// The writableLocation does the same for AppDataLocation, AppLocalDataLocation,
|
||||||
// and GenericDataLocation. Provided, that test mode is not enabled, then
|
// and GenericDataLocation. Provided, that test mode is not enabled, then
|
||||||
// first it checks ${XDG_DATA_HOME}, if empty then it falls back to ${HOME}/.local/share
|
// first it checks ${XDG_DATA_HOME}, if empty then it falls back to ${HOME}/.local/share
|
||||||
m_writableDir = JoinPath(QStandardPaths::writableLocation(
|
m_writableDir = JoinPath(QStandardPaths::writableLocation(
|
||||||
QStandardPaths::AppDataLocation).toStdString(), "OMaps");
|
QStandardPaths::AppDataLocation).toStdString(), "CoMaps");
|
||||||
|
|
||||||
if (!MkDirRecursively(m_writableDir))
|
if (!MkDirRecursively(m_writableDir))
|
||||||
MYTHROW(FileSystemException, ("Can't create writable directory:", m_writableDir));
|
MYTHROW(FileSystemException, ("Can't create writable directory:", m_writableDir));
|
||||||
|
|||||||
@@ -75,12 +75,12 @@ target_link_libraries(${PROJECT_NAME}
|
|||||||
|
|
||||||
if (BUILD_DESIGNER)
|
if (BUILD_DESIGNER)
|
||||||
target_link_libraries(${PROJECT_NAME} generator)
|
target_link_libraries(${PROJECT_NAME} generator)
|
||||||
set(BUNDLE_NAME "OMaps.Designer")
|
set(BUNDLE_NAME "CoMaps.Designer")
|
||||||
set(BUNDLE_DISPLAY_NAME "Organic Maps Designer")
|
set(BUNDLE_DISPLAY_NAME "CoMaps Designer")
|
||||||
set(BUNDLE_ICON designer.icns)
|
set(BUNDLE_ICON designer.icns)
|
||||||
else()
|
else()
|
||||||
set(BUNDLE_NAME "OMaps")
|
set(BUNDLE_NAME "CoMaps")
|
||||||
set(BUNDLE_DISPLAY_NAME "Organic Maps Desktop")
|
set(BUNDLE_DISPLAY_NAME "CoMaps Desktop")
|
||||||
set(BUNDLE_ICON mac.icns)
|
set(BUNDLE_ICON mac.icns)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -138,12 +138,12 @@ copy_resources(
|
|||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/)
|
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/)
|
||||||
install(DIRECTORY ${OMIM_ROOT}/data DESTINATION ${CMAKE_INSTALL_PREFIX}/share/organicmaps/)
|
install(DIRECTORY ${OMIM_ROOT}/data DESTINATION ${CMAKE_INSTALL_PREFIX}/share/comaps/)
|
||||||
|
|
||||||
if (PLATFORM_LINUX)
|
if (PLATFORM_LINUX)
|
||||||
install(FILES ${OMIM_ROOT}/packaging/app.organicmaps.desktop.metainfo.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/)
|
install(FILES ${OMIM_ROOT}/packaging/app.comaps.desktop.metainfo.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/)
|
||||||
install(FILES ${OMIM_ROOT}/qt/res/app.organicmaps.desktop.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/)
|
install(FILES ${OMIM_ROOT}/qt/res/app.comaps.desktop.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/)
|
||||||
install(FILES ${OMIM_ROOT}/qt/res/logo.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps/ RENAME organicmaps.png)
|
install(FILES ${OMIM_ROOT}/qt/res/logo.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps/ RENAME comaps.png)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT PLATFORM_LINUX)
|
if (NOT PLATFORM_LINUX)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ DEFINE_string(api_results, "", "Path to directory with api router results.");
|
|||||||
DEFINE_string(save_results, "", "The directory where results of tool will be saved.");
|
DEFINE_string(save_results, "", "The directory where results of tool will be saved.");
|
||||||
|
|
||||||
DEFINE_double(kml_percent, 0.0, "The percent of routes for which kml file will be generated."
|
DEFINE_double(kml_percent, 0.0, "The percent of routes for which kml file will be generated."
|
||||||
"With kml files you can make screenshots with desktop app of OMaps");
|
"With kml files you can make screenshots with a desktop app");
|
||||||
|
|
||||||
DEFINE_bool(benchmark_stat, false, "Dump statistics about route time building.");
|
DEFINE_bool(benchmark_stat, false, "Dump statistics about route time building.");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user