Skip to content

Commit

Permalink
fix lupdate step for MSVC
Browse files Browse the repository at this point in the history
Replace *.ts mask with the list of real .ts files.
Make lrelease dependent from mscore to call it automatically when building MSVC code
Add debug build to msvc_build.bat
  • Loading branch information
anatoly-os committed Aug 8, 2018
1 parent a88acce commit 9ccc6cc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,15 @@ add_custom_target(lupdate

## lrelease is used to compile the translated text files generated by lupdate into binary resources

file(GLOB TS_FILES
"share/locale/*.ts"
)

add_custom_target(lrelease
COMMAND Qt5::lrelease ${PROJECT_SOURCE_DIR}/share/locale/*.ts
COMMAND Qt5::lrelease
${TS_FILES}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)

)

##
## Create and install the plugin framework manual
Expand Down
1 change: 1 addition & 0 deletions mscore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ else (MINGW)
list(REMOVE_DUPLICATES QtInstallLibraries)

target_link_libraries(mscore ${QT_LIBRARIES})
add_dependencies(mscore lrelease)

install( FILES
# ${MINGW_ROOT}/bin/libgcc_s_dw2-1.dll
Expand Down
11 changes: 10 additions & 1 deletion msvc_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,23 @@ IF "%1"=="release" (
if not exist msvc.build.release\nul mkdir msvc.build.release
if not exist msvc.install\nul mkdir msvc.install
cd msvc.build.release & cmake -G "Visual Studio 15 2017" -DCMAKE_INSTALL_PREFIX=../msvc.install -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_FOR_WINSTORE=%BUILD_FOR_WINSTORE ..
cmake --build . --target lrelease
cd msvc.build.release & cmake --build . --config release --target mscore
)

IF "%1"=="debug" (
cd C:\MuseScore
if not exist msvc.build.debug\nul mkdir msvc.build.debug
if not exist msvc.install\nul mkdir msvc.install
cd msvc.build.debug & cmake -G "Visual Studio 15 2017" -DCMAKE_INSTALL_PREFIX=../msvc.install -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_FOR_WINSTORE=%BUILD_FOR_WINSTORE ..
cmake --build . --target lrelease
cd msvc.build.debug & cmake --build . --config debug --target mscore
)

IF "%1"=="install" (
echo InstallStep
cd C:\MuseScore
cd msvc.build.release
dir
cmake --build . --config release --target install
)

Expand Down

0 comments on commit 9ccc6cc

Please sign in to comment.