Skip to content

Conversation

@g-maxime
Copy link
Contributor

No description provided.

Signed-off-by: Maxime Gervais <gervais.maxime@gmail.com>
@JeromeMartinez JeromeMartinez merged commit 2323e33 into MediaArea:master Jan 28, 2026
11 checks passed
@JeromeMartinez
Copy link
Member

@cjee21 FYI due to new security requirements for signing, we can not sign anymore on the build machine, we need to export the binary to the signature machine, reason we separate the build from the packaging (we manage the signature with another workflow between the 2 calls), so for the moment sign.cmd does not work anymore, we are looking for a way to do that.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 28, 2026

@JeromeMartinez, noted. One way is probably to try splitting the uninstaller generation from the main NSIS script. Then build all binaries including uninstaller and sign everything then build the final installer and sign that again.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 28, 2026

btw, does the new CLI build script work? It does not work on my local machine due to this line:

MSBuild "/p:Configuration=Release;Platform=${arch}" "/t:MediaInfo-CLI" MediaInfo.sln

Changing MediaInfo-CLI to MediaInfo works. If it works on build machine then it's okay, maybe due to me using MSVC2026, I can just do a find/replace when wanting to use the script.

MSBuild /restore "/p:RestorePackagesConfig=true;Configuration=Release;Platform=${arch}" "/t:MediaInfo_WindowsShellExtension" MediaInfo.sln

will likely fail during nuget restore if wxwidgets repo is not present as well. Can use slnf solution filter from #1214 to filter out the wxwidgets projects if necessary. If your build machine will always have wxwidgets repo then it is not an issue (only an issue if others want to use the script and do not want to obtain wxwidgets that they do not need).

Also for newer scripts, I think $release_directory = Split-Path -Parent $MyInvocation.MyCommand.Path can be $release_directory = $PSScriptRoot and msbuild cli parameters can use -p and -t instead of slash (Microsoft changed their docs to all use - now) but these don't really matter.

@g-maxime
Copy link
Contributor Author

Building only a subset of the solution using -t: seems to work on our build server (VS2022):

Project "C:\Programmation\workspace\MediaInfoDev\mediainfo_AllInclusive\MediaInfo\Project\MSVC2022\MediaInfo.sln" on node 1 (MediaInfo_PackageHelper target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Release|Win32".
Project "C:\Programmation\workspace\MediaInfoDev\mediainfo_AllInclusive\MediaInfo\Project\MSVC2022\MediaInfo.sln" (1:2) is building "C:\Programmation\workspace\MediaInfoDev\mediainfo_AllInclusive\MediaInfo\Project\MSVC2022\MediaInfo_PackageHelper\MediaInfo_PackageHelper.vcxproj" (15:6) on node 1 (default targets).

@cjee21
Copy link
Collaborator

cjee21 commented Jan 28, 2026

On MSVC2026 targeting MediaInfo-CLI does not work. targeting MediaInfo works. Or maybe this also depends on presence of wxWidgets repo/projects which I do not have.

Project "D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\MediaInfo.slnx" (1) is building "D:\Software\Deve
lopment\MediaInfo\MediaInfo\Project\MSVC2026\CLI\MediaInfo.vcxproj.metaproj" (3) on node 1 (MediaInfo-CLI target(s)).
Project "D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\CLI\MediaInfo.vcxproj.metaproj" (3) is building "
D:\Software\Development\MediaInfo\MediaInfoLib\Project\MSVC2026\Dll\MediaInfoDll.vcxproj.metaproj" (4) on node 1 (Media
Info-CLI target(s)).
Project "D:\Software\Development\MediaInfo\MediaInfoLib\Project\MSVC2026\Dll\MediaInfoDll.vcxproj.metaproj" (4) is buil
ding "D:\Software\Development\MediaInfo\MediaInfoLib\Project\MSVC2026\Library\MediaInfoLib.vcxproj.metaproj" (5) on nod
e 1 (MediaInfo-CLI target(s)).
Project "D:\Software\Development\MediaInfo\MediaInfoLib\Project\MSVC2026\Library\MediaInfoLib.vcxproj.metaproj" (5) is
building "D:\Software\Development\MediaInfo\ZenLib\Project\MSVC2026\Library\ZenLib.vcxproj" (6) on node 1 (MediaInfo-CL
I target(s)).
D:\Software\Development\MediaInfo\ZenLib\Project\MSVC2026\Library\ZenLib.vcxproj : error MSB4057: The target "MediaInfo
-CLI" does not exist in the project.
Done Building Project "D:\Software\Development\MediaInfo\ZenLib\Project\MSVC2026\Library\ZenLib.vcxproj" (MediaInfo-CLI
 target(s)) -- FAILED.

For the shell extension, if wxWidgets repository is not available, targeting just the shell extension will still fail during package restore. If I remember correctly, this also happens on MSVC2022.

MSBuild /restore "/p:RestorePackagesConfig=true;Configuration=Release;Platform=x64" "/t:MediaInfo_WindowsShellExtension" MediaInfo.slnx
MSBuild version 18.0.5+e22287bf1 for .NET Framework
Build started 28/1/2026 8:01:32 PM.

Project "D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\MediaInfo.slnx" on node 1 (Restore target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(519,5)
: error MSB3202: The project file "D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_custom_build.vcxproj" was n
ot found. [D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\MediaInfo.slnx]
C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(519,5)
: error MSB3202: The project file "D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_wxpng.vcxproj" was not foun
d. [D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\MediaInfo.slnx]
Project "D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\MediaInfo.slnx" (1) is building "D:\Software\Deve
lopment\MediaInfo\wxWidgets\build\msw\wx_base.vcxproj" (12) on node 1 (_IsProjectRestoreSupported target(s)).
D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_base.vcxproj : error MSB4025: The project file could not be lo
aded. Could not find a part of the path 'D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_base.vcxproj'.
Done Building Project "D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_base.vcxproj" (_IsProjectRestoreSupport
ed target(s)) -- FAILED.

Project "D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\MediaInfo.slnx" (1) is building "D:\Software\Deve
lopment\MediaInfo\wxWidgets\build\msw\wx_core.vcxproj" (13) on node 1 (_IsProjectRestoreSupported target(s)).
D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_core.vcxproj : error MSB4025: The project file could not be lo
aded. Could not find a part of the path 'D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_core.vcxproj'.
Done Building Project "D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_core.vcxproj" (_IsProjectRestoreSupport
ed target(s)) -- FAILED.

Project "D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\MediaInfo.slnx" (1) is building "D:\Software\Deve
lopment\MediaInfo\wxWidgets\build\msw\wx_html.vcxproj" (14) on node 1 (_IsProjectRestoreSupported target(s)).
D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_html.vcxproj : error MSB4025: The project file could not be lo
aded. Could not find a part of the path 'D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_html.vcxproj'.
Done Building Project "D:\Software\Development\MediaInfo\wxWidgets\build\msw\wx_html.vcxproj" (_IsProjectRestoreSupport
ed target(s)) -- FAILED.

Done Building Project "D:\Software\Development\MediaInfo\MediaInfo\Project\MSVC2026\MediaInfo.slnx" (Restore target(s))
 -- FAILED.


Build FAILED.

If it works on your build server then it's fine. Just note that other users may encounter this (depending on their system / presence of wxWidgets repo) if they want to use the scripts.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 28, 2026

I tested with MSVC2022 on GitHub Actions: https://github.com/cjee21/MediaInfo/actions/runs/21437735410/job/61732558785

So targeting MediaInfo-CLI works on MSVC2022 but not MSVC2026 so not an issue.

Targeting shell extension only does not work on MSVC2022 too if wxWidgets projects are missing. Not an issue if your build server will always have the wxWidgets projects.

@g-maxime
Copy link
Contributor Author

wxWidgets isn't installed on our build server...

The solution with VS2026's slnx seems to be using paths: -t:CLI/MediaInfo.vcxproj (untested)

@JeromeMartinez
Copy link
Member

So targeting MediaInfo-CLI works on MSVC2022 but not MSVC2026 so not an issue.

It should be same between solutions, what is different?
Could you update MSVC2026 for being same as MSVC2022?

Targeting shell extension only does not work on MSVC2022 too if wxWidgets projects are missing. Not an issue if your build server will always have the wxWidgets projects.

Is it possible to avoid that?

@cjee21
Copy link
Collaborator

cjee21 commented Jan 28, 2026

It should be same between solutions, what is different?
Could you update MSVC2026 for being same as MSVC2022?

I am not sure why, in MSVC2026, targeting MediaInfo as I mentioned above works. So targeting the project file name instead of MediaInfo-CLI the 'display name' works. I'll see if it is possible to make targeting MediaInfo-CLI possible.

Is it possible to avoid that?

My proposed solution is to use this: #1214
Enables building everything except wxWidgets GUI as well as targeting only ShellExtension without failure in restore stage.
Also prevents the missing projects messages from being shown in Visual Studio IDE console when the solution is loaded.

wxWidgets isn't installed on our build server...

But I assume you are building from mediainfo_*_AllInclusive that does contain wxWidgets for MSVC2022. If users just clone the necessary MediaInfo, MediaInfoLib, ZenLib and zlib instead of using the packaged source, they won't have wxWidgets. And wxWidgets sources likely does not support MSVC2026 currently too.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 28, 2026

Could you update MSVC2026 for being same as MSVC2022?

Looks like it is due to how msbuild parses slnx files. For MSVC2026, I switch sln files to the newer XML-based slnx because it is smaller, more readable, supposedly faster to parse and results in less diff when making changes to projects. In sln files there is the project name MediaInfo-CLI in there so we can target it. In slnx, it is only possible to target project filename. For MediaInfo CLI, the project name and filename does not match. MediaInfo-CLI is in MediaInfo.vcxproj.

@JeromeMartinez
Copy link
Member

In slnx, it is only possible to target project filename.

I am file with renaming the project file.

@g-maxime
Copy link
Contributor Author

But I assume you are building from mediainfo_*_AllInclusive that does contain wxWidgets for MSVC2022. If users just clone the necessary MediaInfo, MediaInfoLib, ZenLib and zlib instead of using the packaged source, they won't have wxWidgets. And wxWidgets sources likely does not support MSVC2026 currently too.

I'll make a PR to switch to the slnf solution

@cjee21
Copy link
Collaborator

cjee21 commented Jan 28, 2026

so for the moment sign.cmd does not work anymore, we are looking for a way to do that.

Possible solution to still sign the uninstaller: https://nsis.sourceforge.io/Signing_an_Uninstaller_externally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants