mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-21 14:50:26 -08:00
Servatrice portable + cmake options
Use -DPORTABLE=1 to build a portable version
This commit is contained in:
@@ -333,3 +333,8 @@ Data = Resources\")
|
|||||||
install(FILES ${WIN32SSLRUNTIME_LIBRARIES} DESTINATION ./)
|
install(FILES ${WIN32SSLRUNTIME_LIBRARIES} DESTINATION ./)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
#Compile a portable version, default off
|
||||||
|
option(PORTABLE "portable build" OFF)
|
||||||
|
IF(PORTABLE)
|
||||||
|
add_definitions(-DPORTABLE_BUILD)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -238,3 +238,8 @@ Translations = Resources/translations\")
|
|||||||
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/oracle.exe\" \"\${QTPLUGINS}\" \"${libSearchDirs}\")
|
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/oracle.exe\" \"\${QTPLUGINS}\" \"${libSearchDirs}\")
|
||||||
" COMPONENT Runtime)
|
" COMPONENT Runtime)
|
||||||
endif()
|
endif()
|
||||||
|
#Compile a portable version, default off
|
||||||
|
option(PORTABLE "portable build" OFF)
|
||||||
|
IF(PORTABLE)
|
||||||
|
add_definitions(-DPORTABLE_BUILD)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -194,3 +194,8 @@ Translations = Resources/translations\")
|
|||||||
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/servatrice.exe\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\")
|
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/servatrice.exe\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\")
|
||||||
" COMPONENT Runtime)
|
" COMPONENT Runtime)
|
||||||
endif()
|
endif()
|
||||||
|
#Compile a portable version, default off
|
||||||
|
option(PORTABLE "portable build" OFF)
|
||||||
|
IF(PORTABLE)
|
||||||
|
add_definitions(-DPORTABLE_BUILD)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ SettingsCache::SettingsCache(const QString & fileName, QSettings::Format format,
|
|||||||
QString SettingsCache::guessConfigurationPath(QString & specificPath)
|
QString SettingsCache::guessConfigurationPath(QString & specificPath)
|
||||||
{
|
{
|
||||||
const QString fileName="servatrice.ini";
|
const QString fileName="servatrice.ini";
|
||||||
|
#ifdef PORTABLE_BUILD
|
||||||
|
return fileName;
|
||||||
|
#endif
|
||||||
QString guessFileName;
|
QString guessFileName;
|
||||||
|
|
||||||
// specific path
|
// specific path
|
||||||
if(!specificPath.isEmpty() && QFile::exists(specificPath))
|
if(!specificPath.isEmpty() && QFile::exists(specificPath))
|
||||||
return specificPath;
|
return specificPath;
|
||||||
|
|||||||
Reference in New Issue
Block a user