Skip to content

Commit

Permalink
Fixed building with MSVC 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
make-42 committed May 7, 2023
1 parent 4d808a5 commit ada4784
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 178 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "0.38.5",
"version": "3.0.0",
"commands": [
"dotnet-cake"
]
Expand Down
17 changes: 8 additions & 9 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#addin "nuget:?package=Cake.CMake&version=1.2.0"
#tool "nuget:?package=GitVersion.CommandLine&version=5.3.7"
#tool "nuget:?package=WiX&version=3.11.2"
#addin "nuget:?package=Cake.CMake&version=1.3.1"
#tool "nuget:?package=GitVersion.CommandLine&version=5.12.0"
#tool "nuget:?package=WiX&version=4.0.0"

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand Down Expand Up @@ -44,9 +44,9 @@ Task("Generate-Project")
{
SourcePath = ".",
OutputPath = OutputDirectory,
Generator = "Visual Studio 16 2019",
Generator = "Visual Studio 17 2022",
Platform = platform == "x86" ? "Win32" : "x64",
Toolset = "v142",
Toolset = "v143",
Options = new []
{
$"-DGITVERSION_VAR_BRANCHNAME={Version.BranchName}",
Expand All @@ -68,8 +68,7 @@ Task("Build")
var settings = new MSBuildSettings()
.SetConfiguration(configuration)
.SetMaxCpuCount(0)
.UseToolVersion(MSBuildToolVersion.VS2019);

.UseToolVersion(MSBuildToolVersion.VS2022);
if(platform == "x86")
{
settings.WithProperty("Platform", "Win32")
Expand Down Expand Up @@ -164,7 +163,7 @@ Task("Build-Installer-Bootstrapper")
var settings = new MSBuildSettings()
.SetConfiguration(configuration)
.SetMaxCpuCount(0)
.UseToolVersion(MSBuildToolVersion.VS2019);
.UseToolVersion(MSBuildToolVersion.VS2022);

MSBuild("./src/installer/PicoTorrentBootstrapper.sln", settings);
});
Expand Down Expand Up @@ -194,7 +193,7 @@ Task("Build-Installer-Bundle")
OutputDirectory = BuildDirectory
});

WiXLight(BuildDirectory + File("PicoTorrentBundle.wixobj"), new LightSettings
WiXLight((BuildDirectory + File("PicoTorrentBundle.wixobj")).ToString(), new LightSettings
{
Extensions = new [] { "WixBalExtension", "WixNetFxExtension", "WixUtilExtension" },
OutputFile = PackagesDirectory + File(InstallerBundle)
Expand Down
1 change: 1 addition & 0 deletions src/picotorrent/ui/dialogs/createtorrentdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <boost/log/trivial.hpp>
#include <fmt/format.h>
#include <fmt/xchar.h>
#include <libtorrent/add_torrent_params.hpp>
#include <libtorrent/create_torrent.hpp>
#include <libtorrent/torrent_info.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/picotorrent/ui/models/peerlistmodel.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "peerlistmodel.hpp"

#include <fmt/format.h>
#include <fmt/xchar.h>
#include <libtorrent/peer_info.hpp>

#include "../../core/utils.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/picotorrent/ui/models/torrentlistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <boost/log/trivial.hpp>
#include <fmt/format.h>
#include <fmt/xchar.h>

#include "../../bittorrent/torrenthandle.hpp"
#include "../../bittorrent/torrentstatus.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/picotorrent/ui/models/trackerlistmodel.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "trackerlistmodel.hpp"

#include <fmt/format.h>
#include <fmt/xchar.h>
#include <libtorrent/announce_entry.hpp>
#include <libtorrent/peer_info.hpp>

Expand Down
1 change: 1 addition & 0 deletions src/picotorrent/ui/statusbar.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "statusbar.hpp"

#include <fmt/format.h>
#include <fmt/xchar.h>

#include "translator.hpp"
#include "../core/utils.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/picotorrent/ui/torrentdetailsoverviewpanel.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "torrentdetailsoverviewpanel.hpp"

#include <fmt/format.h>
#include <fmt/xchar.h>
#include <wx/clipbrd.h>
#include <wx/dcbuffer.h>
#include <wx/sizer.h>
Expand Down
2 changes: 1 addition & 1 deletion vendor/vcpkg
Submodule vcpkg updated 11017 files
26 changes: 0 additions & 26 deletions vendor/vcpkg-overlays/ports/libtorrent/CONTROL

This file was deleted.

25 changes: 0 additions & 25 deletions vendor/vcpkg-overlays/ports/libtorrent/fix-AppleClang-test.patch

This file was deleted.

31 changes: 0 additions & 31 deletions vendor/vcpkg-overlays/ports/libtorrent/no_use_iconv.patch

This file was deleted.

85 changes: 0 additions & 85 deletions vendor/vcpkg-overlays/ports/libtorrent/portfile.cmake

This file was deleted.

0 comments on commit ada4784

Please sign in to comment.