Skip to content

Commit fd5b604

Browse files
committed
[docker_wrapper] add version to the filename
Signed-off-by: Vitalii Koshura <[email protected]>
1 parent 658bddb commit fd5b604

12 files changed

+106
-13
lines changed

configure.ac

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ AC_SUBST([VBOXWRAPPER_RELEASE])
2020
WORKER_RELEASE=4
2121
AC_SUBST([WORKER_RELEASE])
2222

23+
DOCKERWRAPPER_RELEASE=1
24+
AC_SUBST([DOCKERWRAPPER_RELEASE])
25+
2326
AC_CANONICAL_TARGET
2427

2528
dnl generate .tar.gz, .tar.bz2, .zip

deploy/prepare_deployment.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
'./samples/wrappture/wrappture_example',
4949
'./samples/wrappture/fermi',
5050
'./samples/sporadic/sporadic',
51-
'./samples/docker_wrapper/docker_wrapper',
51+
'./samples/docker_wrapper/docker_wrapper*pc-linux-gnu',
5252
]
5353

5454
linux_manager_list = [
@@ -78,7 +78,7 @@
7878
'./samples/wrappture/fermi.exe',
7979
'./samples/sporadic/sporadic.exe',
8080
'./samples/wsl_wrapper/wsl_wrapper.exe',
81-
'./samples/docker_wrapper/docker_wrapper.exe',
81+
'./samples/docker_wrapper/docker_wrapper*.exe',
8282
]
8383

8484
android_apps_list = [
@@ -159,7 +159,7 @@
159159
'./win_build/Build/x64/Release/wrappture*.exe',
160160
'./win_build/Build/x64/Release/crypt_prog.exe',
161161
'./win_build/Build/x64/Release/wsl_wrapper.exe',
162-
'./win_build/Build/x64/Release/docker_wrapper.exe',
162+
'./win_build/Build/x64/Release/docker_wrapper*.exe',
163163
'./win_build/Build/ARM64/Release/htmlgfx*.exe',
164164
'./win_build/Build/ARM64/Release/wrapper*.exe',
165165
'./win_build/Build/ARM64/Release/vboxwrapper*.exe',
@@ -174,7 +174,7 @@
174174
'./win_build/Build/ARM64/Release/wrappture*.exe',
175175
'./win_build/Build/ARM64/Release/crypt_prog.exe',
176176
'./win_build/Build/ARM64/Release/wsl_wrapper.exe',
177-
'./win_build/Build/ARM64/Release/docker_wrapper.exe',
177+
'./win_build/Build/ARM64/Release/docker_wrapper*.exe',
178178
]
179179

180180
windows_client_list = [

samples/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ include $(top_srcdir)/Makefile.incl
55
export WRAPPER_RELEASE_VERSION=$(WRAPPER_RELEASE)
66
export VBOXWRAPPER_RELEASE_VERSION=$(VBOXWRAPPER_RELEASE)
77
export WORKER_RELEASE_VERSION=$(WORKER_RELEASE)
8+
export DOCKERWRAPPER_RELEASE_VERSION=$(DOCKERWRAPPER_RELEASE)
89

910
if BUILD_WITH_MINGW
1011
export BUILD_WITH_MINGW="yes"

samples/docker_wrapper/Makefile

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
1+
ifdef ANDROID
2+
DOCKERWRAPPER_RELEASE_SUFFIX =
3+
else
4+
ifdef RELEASE_ARCH
5+
DOCKERWRAPPER_RELEASE_SUFFIX = _$(DOCKERWRAPPER_RELEASE_VERSION)_$(RELEASE_ARCH)-pc-linux-gnu
6+
else
7+
DOCKERWRAPPER_RELEASE_SUFFIX = _$(DOCKERWRAPPER_RELEASE_VERSION)_x86_64-pc-linux-gnu
8+
endif
9+
endif
210

311
BOINC_DIR = ../..
412
BOINC_SOURCE_API_DIR = $(BOINC_DIR)/api
@@ -36,19 +44,20 @@ ifdef BUILD_WITH_MINGW
3644
-lws2_32
3745
endif
3846

39-
all: docker_wrapper
47+
PROGS = docker_wrapper$(DOCKERWRAPPER_RELEASE_SUFFIX)
48+
all: $(PROGS)
4049

4150
libstdc++.a:
4251
ln -s `$(CXX) $(CXXFLAGS) -print-file-name=libstdc++.a`
4352

4453
clean: distclean
4554

4655
distclean:
47-
/bin/rm -f docker_wrapper $(addsuffix .exe, docker_wrapper) *.o libstdc++.a
56+
/bin/rm -f $(PROGS) $(addsuffix .exe, $(PROGS)) *.o libstdc++.a
4857

4958
install: all
5059

51-
docker_wrapper: docker_wrapper.o $(MAKEFILE_STDLIB) $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
52-
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o docker_wrapper docker_wrapper.o \
60+
docker_wrapper$(DOCKERWRAPPER_RELEASE_SUFFIX): docker_wrapper.o $(MAKEFILE_STDLIB) $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
61+
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o docker_wrapper$(DOCKERWRAPPER_RELEASE_SUFFIX) docker_wrapper.o \
5362
-lboinc_api -lboinc $(MAKEFILE_LDFLAGS) \
5463
$(STDCPPTC)

set-dockerwrapper-version.py

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# This file is part of BOINC.
2+
# https://boinc.berkeley.edu
3+
# Copyright (C) 2025 University of California
4+
#
5+
# BOINC is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU Lesser General Public License
7+
# as published by the Free Software Foundation,
8+
# either version 3 of the License, or (at your option) any later version.
9+
#
10+
# BOINC is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13+
# See the GNU Lesser General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Lesser General Public License
16+
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
17+
18+
import sys
19+
20+
def set_configure_ac(version):
21+
with open('configure.ac', 'r') as f:
22+
lines = f.readlines()
23+
with open('configure.ac', 'w') as f:
24+
for line in lines:
25+
if line.startswith('DOCKERWRAPPER_RELEASE='):
26+
line = f'DOCKERWRAPPER_RELEASE={version}\n'
27+
f.write(line)
28+
29+
def set_version_h(version):
30+
with open('version.h', 'r') as f:
31+
lines = f.readlines()
32+
with open('version.h', 'w') as f:
33+
for line in lines:
34+
if line.startswith('#define DOCKERWRAPPER_RELEASE'):
35+
line = f'#define DOCKERWRAPPER_RELEASE {version}\n'
36+
f.write(line)
37+
38+
def set_vcxproj(version):
39+
for vcxproj in ['win_build/docker_wrapper.vcxproj']:
40+
with open(vcxproj, 'r') as f:
41+
lines = f.readlines()
42+
with open(vcxproj, 'w') as f:
43+
for line in lines:
44+
if line.startswith(' <TargetVersion>'):
45+
line = f' <TargetVersion>{version}</TargetVersion>\n'
46+
f.write(line)
47+
48+
if (len(sys.argv) != 2):
49+
print('Usage: set-dockerwrapper-version.py VERSION')
50+
exit(1)
51+
52+
version = sys.argv[1]
53+
54+
print(f'Setting dockerwrapper version to {version}...')
55+
56+
set_configure_ac(version)
57+
set_version_h(version)
58+
set_vcxproj(version)
59+
60+
print('Done.')

version.h

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
// worker version number
3030
#define WORKER_RELEASE 4
3131

32+
// dockerwrapper version number
33+
#define DOCKERWRAPPER_RELEASE 1
34+
3235
// client version number as string
3336
#define BOINC_VERSION_STRING "8.1.0"
3437

version.h.in

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
// worker version number
3030
#define WORKER_RELEASE @WORKER_RELEASE@
3131

32+
// dockerwrapper version number
33+
#define DOCKERWRAPPER_RELEASE @DOCKERWRAPPER_RELEASE@
34+
3235
// client version number as string
3336
#define BOINC_VERSION_STRING "@BOINC_VERSION_STRING@"
3437

win_build/docker_wrapper.vcxproj

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
<CharacterSet>MultiByte</CharacterSet>
1010
</PropertyGroup>
1111
<Import Project="boinc.props" />
12+
<PropertyGroup>
13+
<PlatformSuffix Condition="'$(Platform)'=='x64'">x86_x64</PlatformSuffix>
14+
<PlatformSuffix Condition="'$(Platform)'=='ARM64'">ARM64</PlatformSuffix>
15+
<TargetVersion>1</TargetVersion>
16+
<TargetName>$(ProjectName)_$(TargetVersion)_windows_$(PlatformSuffix)</TargetName>
17+
</PropertyGroup>
1218
<ItemDefinitionGroup>
1319
<ClCompile>
1420
<AdditionalIncludeDirectories>.;..;../api;../lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

win_build/htmlgfx.vcxproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
</PropertyGroup>
1313
<Import Project="boinc.props" />
1414
<PropertyGroup>
15+
<PlatformSuffix Condition="'$(Platform)'=='x64'">x86_x64</PlatformSuffix>
16+
<PlatformSuffix Condition="'$(Platform)'=='ARM64'">ARM64</PlatformSuffix>
1517
<TargetVersion>26203</TargetVersion>
16-
<TargetName>htmlgfx_$(TargetVersion)_windows_x86_64</TargetName>
18+
<TargetName>$(ProjectName)_$(TargetVersion)_windows_$(PlatformSuffix)</TargetName>
1719
</PropertyGroup>
1820
<ItemDefinitionGroup>
1921
<ClCompile>

win_build/vboxwrapper.vcxproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
</PropertyGroup>
1414
<Import Project="boinc.props" />
1515
<PropertyGroup>
16+
<PlatformSuffix Condition="'$(Platform)'=='x64'">x86_x64</PlatformSuffix>
17+
<PlatformSuffix Condition="'$(Platform)'=='ARM64'">ARM64</PlatformSuffix>
1618
<TargetVersion>26211</TargetVersion>
17-
<TargetName>vboxwrapper_$(TargetVersion)_windows_x86_64</TargetName>
19+
<TargetName>$(ProjectName)_$(TargetVersion)_windows_$(PlatformSuffix)</TargetName>
1820
</PropertyGroup>
1921
<ItemDefinitionGroup>
2022
<ClCompile>

win_build/worker.vcxproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
</PropertyGroup>
1212
<Import Project="boinc.props" />
1313
<PropertyGroup>
14+
<PlatformSuffix Condition="'$(Platform)'=='x64'">x86_x64</PlatformSuffix>
15+
<PlatformSuffix Condition="'$(Platform)'=='ARM64'">ARM64</PlatformSuffix>
1416
<TargetVersion>4</TargetVersion>
15-
<TargetName>worker_$(TargetVersion)_windows_x86_64</TargetName>
17+
<TargetName>$(ProjectName)_$(TargetVersion)_windows_$(PlatformSuffix)</TargetName>
1618
</PropertyGroup>
1719
<ItemDefinitionGroup>
1820
<ClCompile>

win_build/wrapper.vcxproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
</PropertyGroup>
1111
<Import Project="boinc.props" />
1212
<PropertyGroup>
13+
<PlatformSuffix Condition="'$(Platform)'=='x64'">x86_x64</PlatformSuffix>
14+
<PlatformSuffix Condition="'$(Platform)'=='ARM64'">ARM64</PlatformSuffix>
1315
<TargetVersion>26018</TargetVersion>
14-
<TargetName>wrapper_$(TargetVersion)_windows_x86_64</TargetName>
16+
<TargetName>$(ProjectName)_$(TargetVersion)_windows_$(PlatformSuffix)</TargetName>
1517
</PropertyGroup>
1618
<ItemDefinitionGroup>
1719
<ClCompile>

0 commit comments

Comments
 (0)