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
c7131e3a
Commit
c7131e3a
authored
Jun 27, 2012
by
Max-Wilhelm Bruker
Browse files
Windows client: translation path fix
parent
37129955
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/CMakeLists.txt
View file @
c7131e3a
...
...
@@ -160,12 +160,6 @@ SET(cockatrice_HEADERS
if
(
UNIX
)
set_source_files_properties
(
src/main.cpp PROPERTIES COMPILE_FLAGS -DTRANSLATION_PATH=\\"
${
CMAKE_INSTALL_PREFIX
}
/share/cockatrice/translations\\"
)
endif
(
UNIX
)
if
(
WIN32
)
set_source_files_properties
(
src/main.cpp PROPERTIES COMPILE_FLAGS -DTRANSLATION_PATH=\\"translations\\"
)
endif
(
WIN32
)
if
(
APPLE
)
set_source_files_properties
(
src/main.cpp PROPERTIES COMPILE_FLAGS -DTRANSLATION_PATH=\\"../../../translations\\"
)
endif
(
APPLE
)
set
(
cockatrice_RESOURCES cockatrice.qrc
)
set
(
cockatrice_TS
...
...
cockatrice/src/main.cpp
View file @
c7131e3a
...
...
@@ -69,8 +69,6 @@ void installNewTranslator()
qtTranslator
->
load
(
"qt_"
+
lang
,
QLibraryInfo
::
location
(
QLibraryInfo
::
TranslationsPath
));
qApp
->
installTranslator
(
qtTranslator
);
if
(
!
translationPath
.
startsWith
(
"/"
))
translationPath
.
prepend
(
qApp
->
applicationDirPath
()
+
"/"
);
translator
->
load
(
translationPrefix
+
"_"
+
lang
,
translationPath
);
qApp
->
installTranslator
(
translator
);
}
...
...
@@ -99,6 +97,17 @@ int main(int argc, char *argv[])
QCoreApplication
::
setOrganizationDomain
(
"cockatrice.de"
);
QCoreApplication
::
setApplicationName
(
"Cockatrice"
);
if
(
translationPath
.
isEmpty
())
{
#ifdef Q_OS_MAC
QDir
translationsDir
=
baseDir
;
translationsDir
.
cd
(
"translations"
);
translationPath
=
translationsDir
.
absolutePath
();
#endif
#ifdef Q_OS_WIN
translationPath
=
app
.
applicationDirPath
()
+
"/translations"
;
#endif
}
rng
=
new
RNG_SFMT
;
settingsCache
=
new
SettingsCache
;
db
=
new
CardDatabase
;
...
...
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