Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ build and readme updates #210

Merged
merged 6 commits into from
May 30, 2024
Merged
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
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@ concurrency:
cancel-in-progress: true

env:
ICE_HOME: ${{ github.workspace }}/ice
PLATFORM: x64
ICE_HOME: ${{ github.workspace }}/ice # Makefile
IceHome: ${{ github.workspace }}/ice # MSBuild
Platform: x64 # For Msbuild
Configuration: Release # For Msbuild

jobs:
ci:
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
ubuntu-22.04,
macos-14,
# windows-2022
]
os: [ubuntu-22.04, macos-14, windows-2022]

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -57,4 +55,4 @@ jobs:
timeout-minutes: 30
with:
working_directory: ice-demos/cpp
msbuild_project: \"C++ demos.sln\"
msbuild_project: msbuild/ice.proj
4 changes: 2 additions & 2 deletions cpp/Ice/async/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ process the request. While a long request is processing, short
requests are still able to be processed and more long requests can be
queued for processing by the worker thread.

[1]: https://doc.zeroc.com/ice/3.7/language-mappings/c++11-mapping/client-side-slice-to-c++11-mapping/asynchronous-method-invocation-ami-in-c++11
[2]: https://doc.zeroc.com/ice/3.7/language-mappings/c++11-mapping/server-side-slice-to-c++11-mapping/asynchronous-method-dispatch-amd-in-c++11
[1]: https://doc.zeroc.com/ice/3.8/language-mappings/c++-mapping/client-side-slice-to-c++-mapping/asynchronous-method-invocation-ami-in-c++
[2]: https://doc.zeroc.com/ice/3.8/language-mappings/c++-mapping/server-side-slice-to-c++-mapping/asynchronous-method-dispatch-amd-in-c++
2 changes: 1 addition & 1 deletion cpp/Ice/asyncInvocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ In a second window, start the client:
```
client
```
[1]: https://doc.zeroc.com/ice/3.7/language-mappings/c++11-mapping/client-side-slice-to-c++11-mapping/asynchronous-method-invocation-ami-in-c++11
[1]: https://doc.zeroc.com/ice/3.8/language-mappings/c++-mapping/client-side-slice-to-c++-mapping/asynchronous-method-invocation-ami-in-c++
16 changes: 8 additions & 8 deletions cpp/Ice/plugin/msbuild/hello/hello.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">helloplugin37++11d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">helloplugin37++11d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">helloplugin37++11</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">helloplugin37++11</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">helloplugin38d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">helloplugin38d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">helloplugin38</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">helloplugin38</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
Expand All @@ -107,7 +107,7 @@
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>helloplugin37d.lib</ImportLibrary>
<ImportLibrary>helloplugin38d.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
Expand All @@ -134,7 +134,7 @@
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>helloplugin37d.lib</ImportLibrary>
<ImportLibrary>helloplugin38d.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
Expand Down Expand Up @@ -163,7 +163,7 @@
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>helloplugin37.lib</ImportLibrary>
<ImportLibrary>helloplugin38.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
Expand Down Expand Up @@ -192,7 +192,7 @@
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>helloplugin37.lib</ImportLibrary>
<ImportLibrary>helloplugin38.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
Expand Down
16 changes: 8 additions & 8 deletions cpp/Ice/plugin/msbuild/logger/logger.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">loggerplugin37++11d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">loggerplugin37++11d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">loggerplugin37++11</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">loggerplugin37++11</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">loggerplugin38d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">loggerplugin38d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">loggerplugin38</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">loggerplugin38</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
Expand All @@ -107,7 +107,7 @@
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>loggerplugin37d.lib</ImportLibrary>
<ImportLibrary>loggerplugin38d.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
Expand All @@ -134,7 +134,7 @@
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>loggerplugin37d.lib</ImportLibrary>
<ImportLibrary>loggerplugin38d.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
Expand Down Expand Up @@ -163,7 +163,7 @@
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>loggerplugin37.lib</ImportLibrary>
<ImportLibrary>loggerplugin38.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
Expand Down Expand Up @@ -192,7 +192,7 @@
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>loggerplugin37.lib</ImportLibrary>
<ImportLibrary>loggerplugin38.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
Expand Down
8 changes: 4 additions & 4 deletions cpp/IceBox/hello/msbuild/server/server.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">helloservice++11d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">helloservice++11d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">helloservice++11</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">helloservice++11</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">helloserviced</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">helloserviced</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">helloservice</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">helloservice</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
Expand Down
13 changes: 7 additions & 6 deletions cpp/IceBox/hello/msbuild/server/server.vcxproj.user
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand>$(IceHome)\build\native\bin\$(Platform)\$(Configuration)\icebox++11.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(IceHome)\build\native\bin\$(Platform)\$(Configuration)\icebox.exe</LocalDebuggerCommand>
<LocalDebuggerCommandArguments>--Ice.Config=config.icebox</LocalDebuggerCommandArguments>
<LocalDebuggerWorkingDirectory>..\..</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommand>$(IceHome)\build\native\bin\$(Platform)\$(Configuration)\icebox++11.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(IceHome)\build\native\bin\$(Platform)\$(Configuration)\icebox.exe</LocalDebuggerCommand>
<LocalDebuggerCommandArguments>--Ice.Config=config.icebox</LocalDebuggerCommandArguments>
<LocalDebuggerWorkingDirectory>..\..</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
Expand All @@ -16,12 +17,12 @@
<LocalDebuggerWorkingDirectory>..\..</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>--Ice.Config=config.icebox</LocalDebuggerCommandArguments>
<LocalDebuggerCommand>$(IceHome)\build\native\bin\$(Platform)\$(Configuration)\icebox++11.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(IceHome)\build\native\bin\$(Platform)\$(Configuration)\icebox.exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>..\..</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>--Ice.Config=config.icebox</LocalDebuggerCommandArguments>
<LocalDebuggerCommand>$(IceHome)\build\native\bin\$(Platform)\$(Configuration)\icebox++11.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(IceHome)\build\native\bin\$(Platform)\$(Configuration)\icebox.exe</LocalDebuggerCommand>
</PropertyGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion cpp/IceGrid/icebox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ icegridadmin --Ice.Config=config.grid -e "application add application.xml"
```

If you are using 32-bit binaries on a Linux 64-bit host, first edit
`application.xml` and replace `exe="icebox++11"` by `exe="icebox32++11"`.
`application.xml` and replace `exe="icebox"` by `exe="icebox32"`.

Using the IceGrid GUI
---------------------
Expand Down
2 changes: 1 addition & 1 deletion cpp/IceGrid/icebox/application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</properties>
</server-instance>

<icebox id="IceBox" activation="on-demand" exe="icebox++11">
<icebox id="IceBox" activation="on-demand" exe="icebox">
<description>A sample IceBox server</description>
<properties>
<properties refid="mx"/>
Expand Down
8 changes: 4 additions & 4 deletions cpp/IceGrid/icebox/msbuild/server/server.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">helloservice++11d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">helloservice++11d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">helloservice++11</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">helloservice++11</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">helloserviced</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">helloserviced</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">helloservice</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">helloservice</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
Expand Down
1 change: 0 additions & 1 deletion cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ lang_srcdir := $(top_srcdir)/cpp
include $(top_srcdir)/make/Make.rules
include $(lang_srcdir)/make/Make.rules

exclude := Ice/qt
demos := $(filter-out $(exclude),$(call demos-without-project-makefile,Client.cpp))
include $(shell find $(lang_srcdir) -name Makefile.mk)
$(foreach t,$(demos),$(eval $(call create-cpp-demo-project,$(t))))
Expand Down
19 changes: 10 additions & 9 deletions cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

## Overview

This directory contains C++ sample programs for various Ice components. These examples are provided to get you started on
This directory contains C++ sample programs for various Ice components. These examples
are provided to get you started on
using a particular Ice feature or coding technique.

Most of the subdirectories here correspond directly to Ice components, such as
Expand Down Expand Up @@ -108,7 +109,7 @@ select `Build`.
- Open a Visual Studio command prompt:

```shell
cd ice-demos\cpp11
cd ice-demos\cpp
MSBuild /p:IceHome=<Ice dist path> /p:Configuration=<Release or Debug> msbuild\ice.proj
```

Expand All @@ -118,15 +119,15 @@ select `Build`.
- Open a Visual Studio command prompt:

```shell
cd ice-demos\cpp11
MSBuild /p:IceHome=<Ice dist path> /p:Configuration=<Release or Debug> /t:InstallLocalPackages msbuild\ice.proj
cd ice-demos\cpp
MSBuild /p:IceHome=<Ice dist path> /p:Configuration=<Release or Debug> msbuild\ice.proj
```

The command above creates NuGet packages for the source tree designated by
`Ice dist path` (and first builds this source tree if needed), and then installs these
NuGet packages in the `ice-demos\cpp11\packages` folder.
NuGet packages in the `ice-demos\cpp\packages` folder.

- Start Visual Studio, open the `C++11 demos.sln` solution, and select your target
- Start Visual Studio, open the `C++ demos.sln` solution, and select your target
configuration (Debug or Release) and platform (Win32 or x64). Right click on the
desired demo in the Solution Explorer window and select `Build`.

Expand All @@ -138,7 +139,7 @@ If you are building Debug, add both the Debug and Release `bin` directories with
command similar to:

```shell
set PATH=%USERPROFILE%\ice-demos\cpp11\packages\zeroc.ice.v140.3.7.10\build\native\bin\x64\Debug;%USERPROFILE%\ice-demos\cpp11\packages\zeroc.ice.v140.3.7.10\build\native\bin\x64\Release;%PATH%
set PATH=%USERPROFILE%\ice-demos\cpp\packages\zeroc.ice.v148.3.8.0-alpha0\build\native\bin\x64\Debug;%USERPROFILE%\ice-demos\cpp\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\bin\x64\Release;%PATH%
```

This is required because the Debug `bin` directories provide only a subset of all
Expand All @@ -148,10 +149,10 @@ If you are building Release, you should add only the Release `bin` directory to
your PATH with a command similar to:

```shell
set PATH=%USERPROFILE%\ice-demos\cpp11\packages\zeroc.ice.v140.3.7.10\build\native\bin\x64\Release;%PATH%
set PATH=%USERPROFILE%\ice-demos\cpp\packages\zeroc.ice.v143.3.8.0-alpha0\build\native\bin\x64\Release;%PATH%
```

Then refer to the README.md file in each demo directory for usage instructions.

[1]: https://doc.zeroc.com/ice/3.7/introduction
[1]: https://doc.zeroc.com/ice/3.8/introduction
[2]: https://doc.zeroc.com/technical-articles/general-topics/chat-demo
2 changes: 1 addition & 1 deletion make/Make.rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# The default for the demos is to build with debug information and no
# optimization.
#
#OPTIMIZE = yes
OPTIMIZE ?= yes

#
# Define PLATFORMS to the list of platforms to build. This defaults
Expand Down