Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,18 @@ jobs:

- name: Build
if: success()
run: msbuild win_build\boinc.sln -p:Configuration=${{matrix.configuration}} -p:Platform=${{matrix.platform}} -p:VcpkgTripletConfig=ci -p:DLIB=${{ env.DLIB }} -p:DMDF=${{ env.DMDF }} -m
run: msbuild win_build\boinc.sln -p:Configuration=${{matrix.configuration}} -p:Platform=${{matrix.platform}} -p:VcpkgTripletConfig=ci -p:DLIB=${{ env.DLIB }} -p:DMDF=${{ env.DMDF }} -p:BOINCCAS_TEST=true -m

- name: Run unit tests
if: success() && matrix.platform == 'x64' && matrix.configuration == 'Release'
working-directory: win_build\Build\${{matrix.platform}}\${{matrix.configuration}}
run: |
${{github.workspace}}\temp\OpenCppCoverage\OpenCppCoverage.exe --cover_children --optimized_build --sources ${{github.workspace}} --export_type=binary:gtest.cov -- unittests.exe --gtest_output=xml:gtest.xml

- name: Run crypt_prog tests
if: success() && matrix.platform == 'x64' && matrix.configuration == 'Release'
working-directory: win_build\Build\${{matrix.platform}}\${{matrix.configuration}}
run: |
${{github.workspace}}\temp\OpenCppCoverage\OpenCppCoverage.exe --cover_children --optimized_build --modules ${{github.workspace}} --sources ${{github.workspace}} --input_coverage=gtest.cov --export_type=cobertura:cobertura.xml -- python ${{github.workspace}}\tests\crypt_prog_tests.py ${{github.workspace}}\win_build\Build\x64\${{matrix.configuration}}\crypt_prog.exe

- name: Verify MSI file
Expand Down
4 changes: 3 additions & 1 deletion 3rdParty/vcpkg_ports/configs/msbuild/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
{
"name": "libzip",
"default-features": false
}
},
"wil",
"tinyxml2"
]
}
82 changes: 15 additions & 67 deletions clientsetup/win/CAAnnounceUpgrade.cpp
Original file line number Diff line number Diff line change
@@ -1,84 +1,32 @@
// Berkeley Open Infrastructure for Network Computing
// http://boinc.berkeley.edu
// Copyright (C) 2005 University of California
// This file is part of BOINC.
// https://boinc.berkeley.edu
// Copyright (C) 2025 University of California
//
// This is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation;
// either version 2.1 of the License, or (at your option) any later version.
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// To view the GNU Lesser General Public License visit
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "stdafx.h"
#include "boinccas.h"
#include "CAAnnounceUpgrade.h"

#define CUSTOMACTION_NAME _T("CAAnnounceUpgrade")
#define CUSTOMACTION_PROGRESSTITLE _T("Announce the new BOINC version to all components.")


/////////////////////////////////////////////////////////////////////
//
// Function:
//
// Description:
//
/////////////////////////////////////////////////////////////////////
CAAnnounceUpgrade::CAAnnounceUpgrade(MSIHANDLE hMSIHandle) :
BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
{}


/////////////////////////////////////////////////////////////////////
//
// Function:
//
// Description:
//
/////////////////////////////////////////////////////////////////////
CAAnnounceUpgrade::~CAAnnounceUpgrade()
{
BOINCCABase::~BOINCCABase();
}
BOINCCABase(hMSIHandle, _T("CAAnnounceUpgrade"),
_T("Announce the new BOINC version to all components.")) {}


/////////////////////////////////////////////////////////////////////
//
// Function:
//
// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAAnnounceUpgrade::OnExecution()
{
UINT CAAnnounceUpgrade::OnExecution() {
return SetUpgradeParameters();
}


/////////////////////////////////////////////////////////////////////
//
// Function: AnnounceUpgrade
//
// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall AnnounceUpgrade(MSIHANDLE hInstall)
{
UINT uiReturnValue = 0;

CAAnnounceUpgrade* pCA = new CAAnnounceUpgrade(hInstall);
uiReturnValue = pCA->Execute();
delete pCA;

return uiReturnValue;
UINT __stdcall AnnounceUpgrade(MSIHANDLE hInstall) {
return CAAnnounceUpgrade(hInstall).Execute();
}

35 changes: 12 additions & 23 deletions clientsetup/win/CAAnnounceUpgrade.h
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
// Berkeley Open Infrastructure for Network Computing
// http://boinc.berkeley.edu
// Copyright (C) 2005 University of California
// This file is part of BOINC.
// https://boinc.berkeley.edu
// Copyright (C) 2025 University of California
//
// This is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation;
// either version 2.1 of the License, or (at your option) any later version.
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// To view the GNU Lesser General Public License visit
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//

#ifndef _CAANNOUNCEUPGRADE_H_
#define _CAANNOUNCEUPGRADE_H_
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#pragma once

class CAAnnounceUpgrade : public BOINCCABase
{
public:

CAAnnounceUpgrade(MSIHANDLE hMSIHandle);
~CAAnnounceUpgrade();
virtual UINT OnExecution();
UINT OnExecution() override final;
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using both override and final is redundant for documentation purposes. While technically correct, final implies override, so using both is unnecessary. Consider using only final or keeping just override if the method might be overridden in derived classes (though that seems unlikely here).

Suggested change
UINT OnExecution() override final;
UINT OnExecution() final;

Copilot uses AI. Check for mistakes.
};


#endif

100 changes: 27 additions & 73 deletions clientsetup/win/CACleanupOldBinaries.cpp
Original file line number Diff line number Diff line change
@@ -1,71 +1,40 @@
// Berkeley Open Infrastructure for Network Computing
// http://boinc.berkeley.edu
// Copyright (C) 2005 University of California
// This file is part of BOINC.
// https://boinc.berkeley.edu
// Copyright (C) 2025 University of California
//
// This is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation;
// either version 2.1 of the License, or (at your option) any later version.
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// To view the GNU Lesser General Public License visit
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "stdafx.h"
#include "boinccas.h"
#include "CACleanupOldBinaries.h"

#define CUSTOMACTION_NAME _T("CACleanupOldBinaries")
#define CUSTOMACTION_PROGRESSTITLE _T("Cleanup any old binaries that were left lying around from some other install.")


/////////////////////////////////////////////////////////////////////
//
// Function:
//
// Description:
//
/////////////////////////////////////////////////////////////////////
CACleanupOldBinaries::CACleanupOldBinaries(MSIHANDLE hMSIHandle) :
BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
{}


/////////////////////////////////////////////////////////////////////
//
// Function:
//
// Description:
//
/////////////////////////////////////////////////////////////////////
CACleanupOldBinaries::~CACleanupOldBinaries()
{
BOINCCABase::~BOINCCABase();
}


/////////////////////////////////////////////////////////////////////
//
// Function:
//
// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CACleanupOldBinaries::OnExecution()
{
tstring strInstallDirectory;
UINT uiReturnValue;


uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
if ( uiReturnValue ) return uiReturnValue;
BOINCCABase(hMSIHandle, _T("CACleanupOldBinaries"),
_T("Cleanup any old binaries that were left lying around from some "
"other install.")) {}

UINT CACleanupOldBinaries::OnExecution() {
tstring strInstallDirectory;

const auto uiReturnValue =
GetProperty(_T("INSTALLDIR"), strInstallDirectory);
if (uiReturnValue != ERROR_SUCCESS) {
return uiReturnValue;
}
if (strInstallDirectory.empty()) {
return ERROR_INSTALL_FAILURE;
}

DeleteFile(tstring(strInstallDirectory + _T("\\boinc.exe")).c_str());
DeleteFile(tstring(strInstallDirectory + _T("\\boincmgr.exe")).c_str());
Expand All @@ -83,21 +52,6 @@ UINT CACleanupOldBinaries::OnExecution()
return ERROR_SUCCESS;
}


/////////////////////////////////////////////////////////////////////
//
// Function: CleanupOldBinaries
//
// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall CleanupOldBinaries(MSIHANDLE hInstall)
{
UINT uiReturnValue = 0;

CACleanupOldBinaries* pCA = new CACleanupOldBinaries(hInstall);
uiReturnValue = pCA->Execute();
delete pCA;

return uiReturnValue;
UINT __stdcall CleanupOldBinaries(MSIHANDLE hInstall) {
return CACleanupOldBinaries(hInstall).Execute();
}
36 changes: 12 additions & 24 deletions clientsetup/win/CACleanupOldBinaries.h
Original file line number Diff line number Diff line change
@@ -1,37 +1,25 @@
// Berkeley Open Infrastructure for Network Computing
// http://boinc.berkeley.edu
// Copyright (C) 2005 University of California
// This file is part of BOINC.
// https://boinc.berkeley.edu
// Copyright (C) 2025 University of California
//
// This is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation;
// either version 2.1 of the License, or (at your option) any later version.
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// To view the GNU Lesser General Public License visit
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//

#ifndef _CACLEANUPOLDBINARIES_H_
#define _CACLEANUPOLDBINARIES_H_
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#pragma once

class CACleanupOldBinaries : public BOINCCABase
{
public:

CACleanupOldBinaries(MSIHANDLE hMSIHandle);
~CACleanupOldBinaries();
virtual UINT OnExecution();

UINT OnExecution() override final;
};


#endif

Loading