Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
0b94b47f
Commit
0b94b47f
authored
Aug 25, 2015
by
marco
Browse files
Servatrice portable + cmake options
Use -DPORTABLE=1 to build a portable version
parent
4125d690
Changes
4
Hide whitespace changes
Inline
Side-by-side
cockatrice/CMakeLists.txt
View file @
0b94b47f
...
...
@@ -333,3 +333,8 @@ Data = Resources\")
install
(
FILES
${
WIN32SSLRUNTIME_LIBRARIES
}
DESTINATION ./
)
endif
()
endif
()
#Compile a portable version, default off
option
(
PORTABLE
"portable build"
OFF
)
IF
(
PORTABLE
)
add_definitions
(
-DPORTABLE_BUILD
)
endif
()
oracle/CMakeLists.txt
View file @
0b94b47f
...
...
@@ -238,3 +238,8 @@ Translations = Resources/translations\")
fixup_bundle(
\"\$
{CMAKE_INSTALL_PREFIX}/oracle.exe
\"
\"\$
{QTPLUGINS}
\"
\"
${
libSearchDirs
}
\"
)
"
COMPONENT Runtime
)
endif
()
#Compile a portable version, default off
option
(
PORTABLE
"portable build"
OFF
)
IF
(
PORTABLE
)
add_definitions
(
-DPORTABLE_BUILD
)
endif
()
servatrice/CMakeLists.txt
View file @
0b94b47f
...
...
@@ -194,3 +194,8 @@ Translations = Resources/translations\")
fixup_bundle(
\"\$
{CMAKE_INSTALL_PREFIX}/servatrice.exe
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
endif
()
#Compile a portable version, default off
option
(
PORTABLE
"portable build"
OFF
)
IF
(
PORTABLE
)
add_definitions
(
-DPORTABLE_BUILD
)
endif
()
servatrice/src/settingscache.cpp
View file @
0b94b47f
...
...
@@ -15,9 +15,11 @@ SettingsCache::SettingsCache(const QString & fileName, QSettings::Format format,
QString
SettingsCache
::
guessConfigurationPath
(
QString
&
specificPath
)
{
const
QString
fileName
=
"servatrice.ini"
;
const
QString
fileName
=
"servatrice.ini"
;
#ifdef PORTABLE_BUILD
return
fileName
;
#endif
QString
guessFileName
;
// specific path
if
(
!
specificPath
.
isEmpty
()
&&
QFile
::
exists
(
specificPath
))
return
specificPath
;
...
...
@@ -40,4 +42,4 @@ QString SettingsCache::guessConfigurationPath(QString & specificPath)
guessFileName
=
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
)
+
"/"
+
fileName
;
#endif
return
guessFileName
;
}
\ No newline at end of file
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment