Skip to content

Commit

Permalink
Update build scripts for VS2022
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Gervais <gervais.maxime@gmail.com>
  • Loading branch information
g-maxime committed Nov 27, 2024
1 parent a1d4f84 commit 0c66378
Show file tree
Hide file tree
Showing 24 changed files with 506 additions and 644 deletions.
4 changes: 4 additions & 0 deletions AVIMetaEdit/UpgradeVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ function btask.UpgradeVersion.run () {
Files[((index++))]="Project/MSVC2015/GUI/AVI_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2017/CLI/AVI_MetaEdit_CLI.rc"
Files[((index++))]="Project/MSVC2017/GUI/AVI_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2022/GUI/AVI_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2022/CLI/AVI_MetaEdit_CLI.rc"
Files[((index++))]="Project/QtCreator/avimetaedit-gui.rc"
Files[((index++))]="Source/Install/AVI_MetaEdit_GUI_Windows_i386.nsi"
Files[((index++))]="Source/Install/AVI_MetaEdit_GUI_Windows_x64.nsi"
Expand All @@ -65,6 +67,8 @@ function btask.UpgradeVersion.run () {
Files[((index++))]="Project/MSVC2015/GUI/AVI_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2017/CLI/AVI_MetaEdit_CLI.rc"
Files[((index++))]="Project/MSVC2017/GUI/AVI_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2022/GUI/AVI_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2022/CLI/AVI_MetaEdit_CLI.rc"
Files[((index++))]="Project/QtCreator/avimetaedit-gui.rc"

for File in ${Files[@]}
Expand Down
2 changes: 2 additions & 0 deletions BWFMetaEdit/UpgradeVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function btask.UpgradeVersion.run () {
Files[((index++))]="Project/MSVC2015/GUI/BWF_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2017/CLI/BWF_MetaEdit_CLI.rc"
Files[((index++))]="Project/MSVC2017/GUI/BWF_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2022/CLI/BWF_MetaEdit_CLI.rc"
Files[((index++))]="Project/QtCreator/bwfmetaedit-gui.rc"
Files[((index++))]="Source/Install/BWF_MetaEdit_GUI_Windows_i386.nsi"
Files[((index++))]="Source/Install/BWF_MetaEdit_GUI_Windows_x64.nsi"
Expand All @@ -66,6 +67,7 @@ function btask.UpgradeVersion.run () {
Files[((index++))]="Project/MSVC2015/GUI/BWF_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2017/CLI/BWF_MetaEdit_CLI.rc"
Files[((index++))]="Project/MSVC2017/GUI/BWF_MetaEdit_GUI.rc"
Files[((index++))]="Project/MSVC2022/CLI/BWF_MetaEdit_CLI.rc"
Files[((index++))]="Project/QtCreator/bwfmetaedit-gui.rc"

for File in ${Files[@]}
Expand Down
4 changes: 4 additions & 0 deletions DVAnalyzer/UpgradeVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ function btask.UpgradeVersion.run () {
Files[((index++))]="Project/MSVC2015/GUI/AVPS_DV_Analyzer_GUI.rc"
Files[((index++))]="Project/MSVC2017/CLI/AVPS_DV_Analyzer_CLI.rc"
Files[((index++))]="Project/MSVC2017/GUI/AVPS_DV_Analyzer_GUI.rc"
Files[((index++))]="Project/MSVC2022/CLI/AVPS_DV_Analyzer_CLI.rc"
Files[((index++))]="Project/MSVC2022/GUI/AVPS_DV_Analyzer_GUI.rc"
Files[((index++))]="Project/QtCreator/dvanalyzer-gui.rc"
Files[((index++))]="Source/Install/AVPS_DV_Analyzer_GUI_Windows_i386.nsi"
Files[((index++))]="Source/Install/AVPS_DV_Analyzer_GUI_Windows_x64.nsi"
Expand All @@ -65,6 +67,8 @@ function btask.UpgradeVersion.run () {
Files[((index++))]="Project/MSVC2015/GUI/AVPS_DV_Analyzer_GUI.rc"
Files[((index++))]="Project/MSVC2017/CLI/AVPS_DV_Analyzer_CLI.rc"
Files[((index++))]="Project/MSVC2017/GUI/AVPS_DV_Analyzer_GUI.rc"
Files[((index++))]="Project/MSVC2022/CLI/AVPS_DV_Analyzer_CLI.rc"
Files[((index++))]="Project/MSVC2022/GUI/AVPS_DV_Analyzer_GUI.rc"
Files[((index++))]="Project/QtCreator/dvanalyzer-gui.rc"

for File in ${Files[@]}
Expand Down
6 changes: 6 additions & 0 deletions MediaConch_SourceCode/UpgradeVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ function btask.UpgradeVersion.run () {
MC_files[((index++))]="Project/MSVC2019/CLI/MediaConch_CLI.rc"
MC_files[((index++))]="Project/MSVC2019/Server/MediaConch-Server.rc"
MC_files[((index++))]="Project/MSVC2019/GUI/MediaConch_GUI.rc"
MC_files[((index++))]="Project/MSVC2022/CLI/MediaConch_CLI.rc"
MC_files[((index++))]="Project/MSVC2022/Server/MediaConch-Server.rc"
MC_files[((index++))]="Project/MSVC2022/GUI/MediaConch_GUI.rc"
MC_files[((index++))]="Project/OBS/obs_mediaconch"

for MC_file in ${MC_files[@]}
Expand All @@ -116,6 +119,9 @@ function btask.UpgradeVersion.run () {
MC_files[((index++))]="Project/MSVC2019/CLI/MediaConch_CLI.rc"
MC_files[((index++))]="Project/MSVC2019/Server/MediaConch-Server.rc"
MC_files[((index++))]="Project/MSVC2019/GUI/MediaConch_GUI.rc"
MC_files[((index++))]="Project/MSVC2022/CLI/MediaConch_CLI.rc"
MC_files[((index++))]="Project/MSVC2022/Server/MediaConch-Server.rc"
MC_files[((index++))]="Project/MSVC2022/GUI/MediaConch_GUI.rc"

for MC_file in ${MC_files[@]}
do
Expand Down
2 changes: 2 additions & 0 deletions RAWcooked/UpgradeVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function btask.UpgradeVersion.run () {
Files[((index++))]="debian/changelog"
Files[((index++))]="Project/MSVC2017/CLI/RAWcooked.rc"
Files[((index++))]="Project/MSVC2019/CLI/RAWcooked.rc"
Files[((index++))]="Project/MSVC2022/CLI/RAWcooked.rc"
Files[((index++))]="Source/Lib/Compressed/RAWcooked/RAWcooked.cpp"
Files[((index++))]="Source/CLI/rawcooked.1"

Expand All @@ -59,6 +60,7 @@ function btask.UpgradeVersion.run () {
index=0
Files[((index++))]="Project/MSVC2017/CLI/RAWcooked.rc"
Files[((index++))]="Project/MSVC2019/CLI/RAWcooked.rc"
Files[((index++))]="Project/MSVC2022/CLI/RAWcooked.rc"

for File in ${Files[@]}
do
Expand Down
37 changes: 18 additions & 19 deletions build_release/BuildRelease.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off

rem ***********************************************************************************************
rem * You need Visual Studio 2019 and Git installed at default places *
rem * You need Visual Studio 2022 and Git installed at default places *
rem * You need Embarcadero RAD Studio 9 installed at default place for official MediaInfo GUI *
rem * You need (Project)-AllInOne, MediaArea-Utils, MediaArea-Utils-Binaries repos *
rem * Code signing certificate is expected to be in %USERPROFILE%\CodeSigningCertificate.p12 *
Expand Down Expand Up @@ -34,7 +34,7 @@ if EXIST ThankYou call:Rtree ThankYou\ || exit /b 1
rem *** Handling of paths for 64-bit compilation ***
set OLD_PATH=%PATH%
set OLD_CD=%CD%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%PATH%;"C:\Program Files\Git\bin"

rem *** Parse command line ***
Expand Down Expand Up @@ -132,7 +132,7 @@ set Version=%Version:"=%

rem *** MediaConch CLI and Server ***
call:Patch_MediaConch
cd ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019
cd ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022
MSBuild /maxcpucount:1 /verbosity:quiet /p:Configuration=Release;Platform=Win32 || exit /b 1
MSBuild /maxcpucount:1 /verbosity:quiet /p:Configuration=Release;Platform=x64 || exit /b 1
cd %OLD_CD%
Expand All @@ -142,7 +142,7 @@ call:Patch_MediaConch_GUI
if NOT EXIST ..\..\%MC_SOURCES%\Qt5.9-msvc2017\ mklink /D ..\..\%MC_SOURCES%\Qt5.9-msvc2017\ %OLD_CD%\..\..\MediaArea-Utils-Binaries\Windows\Qt\Qt5.9-msvc2017 || exit /b 1
if NOT EXIST ..\..\%MC_SOURCES%\Qt5.9-msvc2017_64\ mklink /D ..\..\%MC_SOURCES%\Qt5.9-msvc2017_64\ %OLD_CD%\..\..\MediaArea-Utils-Binaries\Windows\Qt\Qt5.9-msvc2017_64 || exit /b 1
ping 127.0.0.1 -n 5 -w 10000 > NUL
cd ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019
cd ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022
MSBuild /maxcpucount:1 /verbosity:quiet /p:Configuration=Release;Platform=Win32
ping 127.0.0.1 -n 5 -w 10000 > NUL
if %ERRORLEVEL% NEQ 0 (
Expand All @@ -159,14 +159,14 @@ cd %OLD_CD%

rem *** libcurl ***
cd %OLD_CD%
copy ..\..\MediaArea-Utils-Binaries\Windows\libcurl\Win32\Release\* ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019\Win32\Release\ || exit /b 1
copy ..\..\MediaArea-Utils-Binaries\Windows\libcurl\x64\Release\* ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019\x64\Release\ || exit /b 1
copy ..\..\MediaArea-Utils-Binaries\Windows\libcurl\Win32\Release\* ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022\Win32\Release\ || exit /b 1
copy ..\..\MediaArea-Utils-Binaries\Windows\libcurl\x64\Release\* ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022\x64\Release\ || exit /b 1

rem *** Signature of executables ***
set /P CodeSigningCertificatePass= < %USERPROFILE%\CodeSigningCertificate.pass
if "%NOSIGN%"=="" (
cd %OLD_CD%
signtool sign /f %USERPROFILE%\CodeSigningCertificate.p12 /p %CodeSigningCertificatePass% /fd sha256 /v /tr http://ts.ssl.com /td sha256 /d MediaConch /du http://mediaarea.net ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019\Win32\Release\MediaConch-Server.exe ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019\x64\Release\MediaConch-Server.exe ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019\Win32\Release\MediaConch.exe ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019\x64\Release\MediaConch.exe ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2019\win32\Release\MediaConch-GUI.exe || set CodeSigningCertificatePass= && exit /b 1
signtool sign /f %USERPROFILE%\CodeSigningCertificate.p12 /p %CodeSigningCertificatePass% /fd sha256 /v /tr http://ts.ssl.com /td sha256 /d MediaConch /du http://mediaarea.net ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022\Win32\Release\MediaConch-Server.exe ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022\x64\Release\MediaConch-Server.exe ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022\Win32\Release\MediaConch.exe ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022\x64\Release\MediaConch.exe ..\..\%MC_SOURCES%\MediaConch\Project\MSVC2022\win32\Release\MediaConch-GUI.exe || set CodeSigningCertificatePass= && exit /b 1
)
set CodeSigningCertificatePass=

Expand Down Expand Up @@ -215,7 +215,7 @@ call:Patch %MC_SOURCES% libevent MT
call:Patch %MC_SOURCES% libxml2 MT
call:Patch %MC_SOURCES% libxslt MT
call:Patch %MC_SOURCES% MediaConch MT
call:Patch %MC_SOURCES% MediaInfoLib MP MT
call:Patch %MC_SOURCES% MediaInfoLib MT
call:Patch %MC_SOURCES% ZenLib MT
call:Patch %MC_SOURCES% zlib MT
GOTO:EOF
Expand All @@ -226,11 +226,10 @@ call:RPatch %MC_SOURCES% libevent MT
call:RPatch %MC_SOURCES% libxml2 MT
call:RPatch %MC_SOURCES% libxslt MT
call:RPatch %MC_SOURCES% MediaConch MT
call:RPatch %MC_SOURCES% MediaInfoLib MT MP
call:RPatch %MC_SOURCES% MediaInfoLib MT
call:RPatch %MC_SOURCES% ZenLib MT
call:RPatch %MC_SOURCES% zlib MT
call:Patch %MC_SOURCES% MediaConch MD
call:Patch %MC_SOURCES% MediaInfoLib MP
GOTO:EOF

rem ***********************************************************************************************
Expand Down Expand Up @@ -268,12 +267,12 @@ rem *** MediaInfo global ***
call:Patch_MediaInfo || exit /b 1

rem *** MediaInfoLib ***
cd %OLD_CD%\..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2019
cd %OLD_CD%\..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2022
MSBuild /maxcpucount:1 /verbosity:quiet /p:Configuration=Release;Platform=Win32 MediaInfoLib.sln || exit /b 1
MSBuild /maxcpucount:1 /verbosity:quiet /p:Configuration=Release;Platform=x64 MediaInfoLib.sln || exit /b 1

rem *** MediaInfo ***
cd %OLD_CD%\..\..\%MI_SOURCES%\MediaInfo\Project\MSVC2019
cd %OLD_CD%\..\..\%MI_SOURCES%\MediaInfo\Project\MSVC2022
MSBuild /maxcpucount:1 /verbosity:quiet /p:Configuration=Release;Platform=Win32 || exit /b 1
MSBuild /maxcpucount:1 /verbosity:quiet /p:Configuration=Release;Platform=x64 || exit /b 1
call set PATH_TEMP=%PATH%
Expand All @@ -296,12 +295,12 @@ call set /P CodeSigningCertificatePass= < %USERPROFILE%\CodeSigningCertificate.p
if "%NOSIGN%"=="" (
cd %OLD_CD%
signtool sign /f %USERPROFILE%\CodeSigningCertificate.p12 /p %CodeSigningCertificatePass% /fd sha256 /v /tr http://ts.ssl.com /td sha256 /d MediaInfo /du http://mediaarea.net^
..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2019\Win32\Release\MediaInfo.dll^
..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2019\x64\Release\MediaInfo.dll^
..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2019\Win32\Release\MediaInfo_InfoTip.dll^
..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2019\x64\Release\MediaInfo_InfoTip.dll^
..\..\%MI_SOURCES%\MediaInfo\Project\MSVC2019\Win32\Release\MediaInfo.exe^
..\..\%MI_SOURCES%\MediaInfo\Project\MSVC2019\x64\Release\MediaInfo.exe^
..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo.dll^
..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo.dll^
..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo_InfoTip.dll^
..\..\%MI_SOURCES%\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo_InfoTip.dll^
..\..\%MI_SOURCES%\MediaInfo\Project\MSVC2022\Win32\Release\MediaInfo.exe^
..\..\%MI_SOURCES%\MediaInfo\Project\MSVC2022\x64\Release\MediaInfo.exe^
..\..\%MI_SOURCES%\MediaInfo\Project\BCB\GUI\Win32\Release\MediaInfo_GUI.exe^
..\..\%MI_SOURCES%\MediaInfo\Project\BCB\GUI\Win64\Release\MediaInfo_GUI.exe || set CodeSigningCertificatePass= && exit /b 1
)
Expand Down Expand Up @@ -375,7 +374,7 @@ rem *** Helpers ***

:Patch_MediaInfo
call:Patch %MI_SOURCES% MediaInfo Log MT NoGUI || exit /b 1
call:Patch %MI_SOURCES% MediaInfoLib MP MT || exit /b 1
call:Patch %MI_SOURCES% MediaInfoLib MT || exit /b 1
call:Patch %MI_SOURCES% ZenLib MT || exit /b 1
call:Patch %MI_SOURCES% zlib MT || exit /b 1
GOTO:EOF
8 changes: 4 additions & 4 deletions build_release/Diff/MediaConch_MD.diff
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Project/MSVC2019/MediaConch.sln | 4 ----
Project/MSVC2022/MediaConch.sln | 4 ----
1 file changed, 4 deletions(-)

diff --git a/Project/MSVC2019/MediaConch.sln b/Project/MSVC2019/MediaConch.sln
diff --git a/Project/MSVC2022/MediaConch.sln b/Project/MSVC2022/MediaConch.sln
index 9e9db96..cdf3e36 100644
--- a/Project/MSVC2019/MediaConch.sln
+++ b/Project/MSVC2019/MediaConch.sln
--- a/Project/MSVC2022/MediaConch.sln
+++ b/Project/MSVC2022/MediaConch.sln
@@ -43,9 +43,7 @@ Global
{8A1AE679-131A-493C-86CA-91179B0955A4}.Debug|x64.ActiveCfg = Debug|x64
{8A1AE679-131A-493C-86CA-91179B0955A4}.Debug|x64.Build.0 = Debug|x64
Expand Down
Loading

0 comments on commit 0c66378

Please sign in to comment.