Skip to content

Commit

Permalink
Drop support for ICE_BIN_DIST (#3442)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Jan 29, 2025
1 parent db700cd commit 12441f3
Show file tree
Hide file tree
Showing 614 changed files with 3,807 additions and 7,310 deletions.
38 changes: 5 additions & 33 deletions config/Make.rules
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ PLATFORMS ?= $(firstword $(supported-platforms))
#
CONFIGS ?= $(default-configs)

#
# List of binary distributions to build against. Defaults to undefined,
# i.e. build all source distributions. This is useful for building
# a language mapping or tests against a binary distribution.
#
#ICE_BIN_DIST ?=

#
# Third-party libraries (Ice for C++)
#
Expand Down Expand Up @@ -105,35 +98,14 @@ soversion = 38a0
#
compatversion = $(version)

ifneq ($(filter all cpp obj%c,$(ICE_BIN_DIST)),)
# NOTE: on macOS, if ICE_HOME isn't set we build against /usr/local/opt/ice because the
# XCode SDK is not accessible through /usr/local
$(eval $(call create-project-dependencies,ice,$(or $(ICE_HOME),$(if $(filter Darwin,$(os)),/usr/local/opt/ice),$(if $(filter AIX,$(os)),/opt/freeware)),cpp))
else ifneq ($(filter compilers,$(ICE_BIN_DIST)),)
ice_compilers_dir = $(or $(ICE_HOME),$(if $(filter Darwin,$(os)),/usr/local/opt/ice),$(system-install-dir))
endif

ifeq ($(filter all cpp,$(ICE_BIN_DIST)),)
ice_cpp_cppflags = -I$(top_srcdir)/cpp/include -I$(top_srcdir)/cpp/include/generated
else
ice_cpp_cppflags = $(if $(ice_includedir),-I$(ice_includedir) $(if $(ice_src_dist),-I$(ice_includedir)/generated))
endif

ifeq ($(filter all cpp,$(ICE_BIN_DIST)),)
bindir = $(call mappingdir,$(or $1,$(currentdir)),bin)
else
bindir = $(ice_bindir)
endif

# Use the bin distribution if ICE_BIN_DIST=all or if ICE_BIN_DIST=cpp and processing a file from the cpp directory.
use-bin-dist = $(or $(filter all,$(ICE_BIN_DIST)),\
$(and $(filter cpp,$(ICE_BIN_DIST)),$(filter %/cpp/,$(call mappingdir,$(or $1,$(currentdir))))))

bindir = $(if $(use-bin-dist),$(ice_bindir),$(call mappingdir,$(or $1,$(currentdir)),bin))
libdir = $(if $(use-bin-dist),$(ice_libdir),$(call mappingdir,$(or $1,$(currentdir)),lib))
includedir = $(if $(use-bin-dist),$(ice_includedir),$(call mappingdir,$(or $1,$(currentdir)),include))
slicedir = $(if $(use-bin-dist),$(ice_slicedir),$(top_srcdir)/slice)
sdkdir = $(if $(use-bin-dist),$(ice_home)/sdk,$(top_srcdir)/sdk)

bindir = $(call mappingdir,$(or $1,$(currentdir)),bin)
libdir = $(call mappingdir,$(or $1,$(currentdir)),lib)
includedir = $(call mappingdir,$(or $1,$(currentdir)),include)
slicedir = $(top_srcdir)/slice
srcdir = $(call mappingdir,$(or $1,$(currentdir)),src)

usr_dir_install := $(or $(filter yes,$(USR_DIR_INSTALL)),$(filter /usr%,$(prefix)))
Expand Down
2 changes: 0 additions & 2 deletions config/Make.rules.Darwin
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ $1[$2-$3]: $$($1_dependencies) $1/.translator-$2-$3.dep
-project "$1/$$(call $1_project,$2,$3)" \
-configuration "$$(call $1_configuration,$2,$3)" \
-scheme "$$(call $1_scheme,$2,$3)" \
$(if $(ICE_BIN_DIST),HEADER_SEARCH_PATHS=../../Ice\ ../../include\ $(sdkdir)/$2.sdk/usr/include \
LIBRARY_SEARCH_PATHS=$(sdkdir)/$2.sdk/usr/lib) \
$(if $(V),,-quiet) \
$(if $(PLATFORM_NAME),iphonesimulator,-arch `uname -m`) \
build
Expand Down
47 changes: 4 additions & 43 deletions cpp/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ unnecessary.
- [Windows](#windows)
- [Building Ice for Linux or macOS](#building-ice-for-linux-or-macos)
- [Build configurations and platforms](#build-configurations-and-platforms)
- [Ice Xcode SDK (macOS only)](#ice-xcode-sdk-macos-only)
- [Building Ice for Windows](#building-ice-for-windows)
- [Build Using MSBuild](#build-using-msbuild)
- [Build Using Visual Studio](#build-using-visual-studio)
Expand Down Expand Up @@ -105,9 +104,9 @@ These packages are provided with the system and can be installed with:
sudo apt-get install pkg-config libdbus-1-dev libbluetooth-dev
```

> *We have experienced problems with BlueZ versions up to and including 5.39, as
well as 5.44 and 5.45. At this time we recommend using the daemon (`bluetoothd`)
from BlueZ 5.43.*
> _We have experienced problems with BlueZ versions up to and including 5.39, as
> well as 5.44 and 5.45. At this time we recommend using the daemon (`bluetoothd`)
> from BlueZ 5.43._
#### macOS

Expand Down Expand Up @@ -150,20 +149,6 @@ make V=1 -j8 srcs
The build system supports specifying additional preprocessor, compiler and
linker options with the `CPPFLAGS`, `CXXFLAGS` and `LDFLAGS` variables.

To build the test suite using a binary distribution use:

```shell
make ICE_BIN_DIST=all
```

If the binary distribution you are using is not installed in a system wide location
where the C++ compiler can automatically find the header and library files, you also
need to set `ICE_HOME`

```shell
make ICE_HOME=/opt/Ice-3.8.0 ICE_BIN_DIST=all
```

### Build configurations and platforms

The C++ source tree supports multiple build configurations and platforms. To
Expand All @@ -180,19 +165,6 @@ To build all the supported configurations and platforms:
make CONFIGS=all PLATFORMS=all -j8
```

### Ice Xcode SDK (macOS only)

The build system supports building Xcode SDKs for Ice. These SDKs allow you to
easily develop Ice applications with Xcode. To build Xcode SDKs, use the `xcodesdk`
configurations. The [Ice Builder for Xcode][13] must be installed before building
the SDKs:

```shell
make CONFIGS=xcodesdk -j8 srcs # Build the C++ Xcode SDK
```

The Xcode SDKs are built into `ice/sdk`.

## Building Ice for Windows

### Build Using MSBuild
Expand Down Expand Up @@ -243,12 +215,6 @@ You can also skip the build of the test suite with the `BuildDist` target:
msbuild /m msbuild\ice.proj /t:BuildDist /p:Platform=x64
```

To build the test suite using the NuGet binary distribution use:

```shell
msbuild /m msbuild\ice.proj /p:ICE_BIN_DIST=all
```

You can also sign the Ice binaries with Authenticode, by setting the following
environment variables:

Expand All @@ -275,7 +241,7 @@ automatically.

The test suite is built using separate Visual Studio solutions:

- Ice Test Suite [msbuild/ice.test.sln](./msbuild/ice.test.sln)
- Ice Test Suite [msbuild/ice.test.sln](./msbuild/ice.test.sln)
- Ice OpenSSL Test Suite [msbuild/ice.openssl.test.sln](./msbuild/ice.openssl.test.sln)

The solution provides a separate project for each test component. the
Expand All @@ -288,10 +254,6 @@ attempting to build the tests.

For example to build the `Release/x64` tests you must have built the C++ mapping using `Release/x64`.

It is also possible to build the tests using a C++ binary distribution, to do
that you must set the `ICE_BIN_DIST` environment variable to `all` before
starting Visual Studio.

Then launch Visual Studio and open the desired test solution, you must now use
NuGet package manager to restore the NuGet packages, and the build will use Ice
NuGet packages instead of your local source build.
Expand Down Expand Up @@ -373,7 +335,6 @@ Python module `zeroc-ice`, using the following command:

```shell
python3 -m pip install zeroc-ice
```
In order to run the test suite on `iphoneos`, you need to build the
C++ Test Controller app from Xcode:
Expand Down
2 changes: 1 addition & 1 deletion cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $(foreach t, $(slice_translators), $(eval $(call create-translator-project,$(cal

include $(foreach p,$(load_first),src/$p/Makefile.mk)
include $(filter-out $(foreach p,$(load_first),%/src/$p/Makefile.mk),$(shell find $(lang_srcdir)/src -name Makefile.mk))
$(call make-projects,$(projects),make-cpp-src-project,,$(filter all cpp,$(ICE_BIN_DIST)))
$(call make-projects,$(projects),make-cpp-src-project,,)

ifeq ($(os),Darwin)
$(call make-xcframeworks)
Expand Down
4 changes: 0 additions & 4 deletions cpp/config/Make.rules
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,22 @@ endif
# $(call make-cpp-src-project,$1=project)
#
define make-cpp-src-project
ifeq ($(filter all cpp,$(ICE_BIN_DIST)),)
$1_slicecompiler := slice2cpp
$1_sliceflags += -I$(slicedir)
$1_cppflags += -I$1/generated -I$(includedir) -I$(includedir)/generated
$(make-project)
srcs:: $1
endif
endef

#
# $(call make-cpp-doxygen-example-project,$1=project)
#
define make-cpp-doxygen-example-project
ifeq ($(filter all cpp,$(ICE_BIN_DIST)),)
$1_slicecompiler := slice2cpp
$1_sliceflags += -I$(slicedir)
$1_cppflags += -I$(includedir) -I$(includedir)/generated
$(make-project)
doxygen_examples:: $1
endif
endef

#
Expand Down
4 changes: 0 additions & 4 deletions cpp/doxygen/examples/Ice/msbuild/IceExamples.vcxproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0">
<Import Project="..\..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.9\build\zeroc.icebuilder.msbuild.props" Condition="Exists('..\..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.9\build\zeroc.icebuilder.msbuild.props')" />
<Import Project="..\..\..\..\msbuild\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\zeroc.ice.v143.props" Condition="Exists('..\..\..\..\msbuild\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\zeroc.ice.v143.props') and '$(ICE_BIN_DIST)' == 'all'" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand Down Expand Up @@ -98,15 +97,12 @@
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\..\..\msbuild\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\zeroc.ice.v143.targets" Condition="Exists('..\..\..\..\msbuild\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\zeroc.ice.v143.targets') and '$(ICE_BIN_DIST)' == 'all'" />
<Import Project="..\..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.9\build\zeroc.icebuilder.msbuild.targets" Condition="Exists('..\..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.9\build\zeroc.icebuilder.msbuild.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\..\msbuild\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\zeroc.ice.v143.props') and '$(ICE_BIN_DIST)' == 'all'" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\msbuild\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\zeroc.ice.v143.props'))" />
<Error Condition="!Exists('..\..\..\..\msbuild\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\zeroc.ice.v143.targets') and '$(ICE_BIN_DIST)' == 'all'" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\msbuild\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\zeroc.ice.v143.targets'))" />
<Error Condition="!Exists('..\..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.9\build\zeroc.icebuilder.msbuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.9\build\zeroc.icebuilder.msbuild.props'))" />
<Error Condition="!Exists('..\..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.9\build\zeroc.icebuilder.msbuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.9\build\zeroc.icebuilder.msbuild.targets'))" />
</Target>
Expand Down
3 changes: 1 addition & 2 deletions cpp/doxygen/examples/Ice/msbuild/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="zeroc.ice.v143" version="3.8.0-alpha0" targetFramework="native" />
<package id="zeroc.icebuilder.msbuild" version="5.0.9" targetFramework="native" />
</packages>
</packages>
9 changes: 4 additions & 5 deletions cpp/msbuild/ice.cpp.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
<IceBuildingSrc Condition="'$(IceBuildingSrc)' == ''">yes</IceBuildingSrc>
</PropertyGroup>
<!--
If we are building a source distribution, set IceHome to this
source distribution.
Set IceHome to this source distribution.
-->
<PropertyGroup Condition="'$(ICE_BIN_DIST)' != 'all' or '$(IceBuildingSrc)' == yes">
<PropertyGroup>
<IceHome>$(MSBuildThisFileDirectory)..\..</IceHome>
</PropertyGroup>

Expand Down Expand Up @@ -41,7 +40,7 @@
</Otherwise>
</Choose>

<PropertyGroup Condition="'$(ICE_BIN_DIST)' != 'all' or '$(IceBuildingSrc)' == yes">
<PropertyGroup>
<IceToolsPath>$(IceHome)\cpp\bin\$(Platform)\$(Configuration)</IceToolsPath>
</PropertyGroup>

Expand Down Expand Up @@ -73,7 +72,7 @@
</Link>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(ICE_BIN_DIST)' != 'all'">
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(IceHome)\cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IceHome)\cpp\include\generated\$(Platform)\$(Configuration);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Expand Down
24 changes: 3 additions & 21 deletions cpp/msbuild/ice.proj
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,6 @@
<Exec Command="rmdir /s /q $(MSBuildThisFileDirectory)packages" Condition="Exists('$(MSBuildThisFileDirectory)packages')" />
</Target>

<Target Name="TestNuGetRestore" DependsOnTargets="GetNuGet" Condition="'$(ICE_BIN_DIST)' == 'all'">
<Exec Command="$(NuGetExe) restore $(MSBuildThisFileDirectory)$(IceTestSolution)"/>
</Target>

<Target Name="DoxygenExamplesNuGetRestore" DependsOnTargets="GetNuGet" Condition="'$(ICE_BIN_DIST)' == 'all'">
<Exec Command="$(NuGetExe) restore $(MSBuildThisFileDirectory)$(IceDoxygenExamplesSolution)"/>
</Target>

<Target Name="DownloadSymbols" DependsOnTargets="TestNuGetRestore" Condition="'$(ICE_BIN_DIST)' == 'all'">
<Exec IgnoreExitCode="True"
Command="symchk /r $(MSBuildThisFileDirectory)packages\zeroc.ice.$(DefaultPlatformToolset).$(IceJSONVersion)\build\native\bin\$(Platform)\$(Configuration)\* /s $(SymbolServer)">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
</Exec>
<Warning Text="PDBs download failed, stack traces might be missing or incomplete" Condition="'$(ErrorCode)' != '0'" />
</Target>

<!-- Ice for C++ builds. -->
<Choose>
<!--
Expand Down Expand Up @@ -127,24 +111,22 @@
</Choose>

<!-- Build distribution targets -->
<Target Name="BuildDist" DependsOnTargets="NuGetRestore"
Condition="'$(ICE_BIN_DIST)' != 'all'">
<Target Name="BuildDist" DependsOnTargets="NuGetRestore">
<MSBuild Projects="@(DistSolution)"
BuildInParallel="true"
Properties="%(Properties)"/>
</Target>

<!-- Clean distribution targets -->
<Target Name="CleanDist"
Condition="'$(ICE_BIN_DIST)' != 'all'">
<Target Name="CleanDist">
<MSBuild Projects="@(DistSolution)"
BuildInParallel="true"
Properties="%(Properties)"
Targets="Clean" />
</Target>

<!-- Build test solution -->
<Target Name="Build" DependsOnTargets="TestNuGetRestore;BuildDist">
<Target Name="Build" DependsOnTargets="BuildDist">
<MSBuild Projects="@(TestSolution)"
BuildInParallel="true"
Properties="%(Properties)" />
Expand Down
2 changes: 1 addition & 1 deletion cpp/msbuild/zeroc.ice.v143.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Ice C++ SDK for Visual Studio 2022 (v143). The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more.</description>
<releaseNotes>https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes</releaseNotes>
<tags>ice native rpc v141 zeroc</tags>
<tags>ice native rpc v143 zeroc</tags>
<readme>README.md</readme>
</metadata>
</package>
1 change: 0 additions & 1 deletion cpp/test/Common/msbuild/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="zeroc.ice.v143" version="3.8.0-alpha0" targetFramework="native" />
<package id="zeroc.icebuilder.msbuild" version="5.0.9" targetFramework="native" />
</packages>
Loading

0 comments on commit 12441f3

Please sign in to comment.