Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
05f1f8f5
Verified
Commit
05f1f8f5
authored
1 year ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Fix translations (and simplify resource files)
parent
ca0340dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4886
failed
1 year ago
Stage: build
Stage: sign
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+13
-4
13 additions, 4 deletions
CMakeLists.txt
cmake/Translations.cmake
+0
-28
0 additions, 28 deletions
cmake/Translations.cmake
with
13 additions
and
32 deletions
CMakeLists.txt
+
13
−
4
View file @
05f1f8f5
...
...
@@ -633,10 +633,13 @@ if (NOT APPLE AND NOT WIN32)
endif
()
#
# Bundle
translations.
# Bundle
resources
#
include
(
Translations
)
set
(
TRANSLATION_DEPS
${
LANG_QRC
}
${
QRC
}
${
QM_SRC
}
)
if
(
Qt6QuickCompiler_FOUND AND COMPILE_QML
)
qtquick_compiler_add_resources
(
QRC resources/res.qrc
)
else
()
qt_add_resources
(
QRC resources/res.qrc
)
endif
()
if
(
APPLE
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
-framework Foundation -framework Cocoa -framework UserNotifications"
)
...
...
@@ -668,7 +671,7 @@ endif ()
set
(
NHEKO_DEPS
${
SRC_FILES
}
${
TRANSLATION_DEPS
}
${
QRC
}
${
META_FILES_TO_INCLUDE
}
)
if
(
ASAN
)
...
...
@@ -691,6 +694,12 @@ set_target_properties(nheko
CMAKE_SKIP_INSTALL_RPATH TRUE
AUTOMOC ON
)
#
# Bundle translations
#
file
(
GLOB LANG_TS_SRC
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/langs/*.ts"
)
qt_add_translations
(
nheko RESOURCE_PREFIX
"/translations"
TS_FILES
${
LANG_TS_SRC
}
)
if
(
WIN32
)
target_compile_definitions
(
nheko PRIVATE WIN32_LEAN_AND_MEAN
)
if
(
MSVC
)
...
...
This diff is collapsed.
Click to expand it.
cmake/Translations.cmake
deleted
100644 → 0
+
0
−
28
View file @
ca0340dd
#
# Generate the translation resource file
#
file
(
GLOB LANG_TS_SRC
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/langs/*.ts"
)
qt_add_translation
(
QM_SRC
${
LANG_TS_SRC
}
)
qt_create_translation
(
${
QM_SRC
}
)
add_custom_target
(
LANG_QRC ALL DEPENDS
${
QM_SRC
}
)
# Generate a qrc file for the translations
set
(
_qrc
${
CMAKE_CURRENT_BINARY_DIR
}
/translations.qrc
)
if
(
NOT EXISTS
${
_qrc
}
)
file
(
WRITE
${
_qrc
}
"<RCC>
\n
<qresource prefix=
\"
/translations
\"
>
\n
"
)
foreach
(
_lang
${
QM_SRC
}
)
get_filename_component
(
_filename
${
_lang
}
NAME
)
file
(
APPEND
${
_qrc
}
" <file>
${
_filename
}
</file>
\n
"
)
endforeach
(
_lang
)
file
(
APPEND
${
_qrc
}
" </qresource>
\n
</RCC>
\n
"
)
endif
()
qt_add_resources
(
LANG_QRC
${
_qrc
}
)
if
(
Qt5QuickCompiler_FOUND AND COMPILE_QML
)
qtquick_compiler_add_resources
(
QRC resources/res.qrc
)
else
()
qt_add_resources
(
QRC resources/res.qrc
)
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment