Skip to content

Commit 318ee9f

Browse files
danoli3Dan Rosser
and
Dan Rosser
authored
C++2b / C++23 / C17 - Clang macOS/iOS - MSVC VS2022 - VS (#8052)
* VS2022 - cppstd23 * macOS / iOS - CLANG_CXX = c++23 - CLANG_C = c17 * vs c++latest (23) * getenv wrapped * MSVC - PreprocessorDefinitions: _HAS_STREAM_INSERTION_OPERATORS_DELETED_IN_CXX20 * addons/ofxKinect fix for libfreenect c code * Windows Test VS Debug / Release and - addonsExample * VS - Fix CI tests for Addons and variables passed * Fix ci install * VS2022 - Project Updates. C++23. C17. C++Modules. Unicode Enabled. * Linux64 2204 disabled * projectGenerator download script fix * projectGenerator downloader osx fixes. added arch determine code for target arch downloads in future * script fix for projectGenerator download --------- Co-authored-by: Dan Rosser <danoli@gmail.com>
1 parent 361d460 commit 318ee9f

File tree

14 files changed

+202
-165
lines changed

14 files changed

+202
-165
lines changed

.github/workflows/of.yml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,16 @@ jobs:
118118
./scripts/ci/vs/install_bleeding.sh
119119
- name: Setup MSBuild
120120
uses: microsoft/setup-msbuild@v2
121-
- name: Build DEBUG emptyExample
121+
- name: Build DEBUG and RELEASE emptyExample
122122
working-directory: ${{env.GITHUB_WORKSPACE}}
123-
run:
123+
run: |
124124
msbuild examples/templates/emptyExample/emptyExample.vcxproj /p:configuration=debug /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143
125-
# - name: Build DEBUG allAddonsExample
126-
# working-directory: ${{env.GITHUB_WORKSPACE}}
127-
# run:
128-
# msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:configuration=debug /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143
129-
125+
msbuild examples/templates/emptyExample/emptyExample.vcxproj /p:configuration=release /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143
126+
- name: Build DEBUG and RELEASE allAddonsExample
127+
working-directory: ${{env.GITHUB_WORKSPACE}}
128+
run: |
129+
msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:configuration=debug /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143
130+
msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:configuration=release /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143
130131
131132
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
132133

@@ -235,42 +236,42 @@ jobs:
235236
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
236237

237238

238-
build-linux64-2204:
239-
runs-on: ubuntu-22.04
240-
strategy:
241-
matrix:
242-
cfg:
243-
- {target: linux64, libs: 64gcc6}
244-
env:
245-
TARGET: ${{matrix.cfg.target}}
246-
steps:
247-
- name: Remove Old lib-unwind
248-
run: if [ "$TARGET" = "linux64" ]; then
249-
sudo apt-get remove libunwind-14 -y;
250-
fi
251-
- name: Cache Packages
252-
uses: awalsh128/cache-apt-pkgs-action@latest
253-
with:
254-
packages: aptitude aptitude-common libboost-iostreams1.83.0 libcwidget4 libsigc++-2.0-0v5 libxapian30 fonts-wine{a} libasound2-plugins{a} libcapi20-3t64{a} libosmesa6{a} libpcsclite1{a} libspeexdsp1{a} libwine{a} libxkbregistry0{a} libz-mingw-w64{a} wine{a} wine64 wget2 make libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile1-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libpulse-dev libusb-1.0-0-dev libgtk2.0-dev libopencv-dev libassimp-dev librtaudio-dev gdb libglfw3-dev liburiparser-dev libpugixml-dev libgconf-2-4 libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-pulseaudio gstreamer1.0-x gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good
255-
version: 1.0
256-
257-
- uses: actions/checkout@v4
258-
- name: ccache
259-
uses: hendrikmuhs/ccache-action@v1.2.13
260-
with:
261-
key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }}
262-
263-
- name: Download libs
264-
run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}};
265-
- name: Install dependencies
266-
run: ./scripts/ci/$TARGET/install.sh;
267-
- name: Build
268-
run: if [ "$TARGET" = "linux64" ]; then
269-
scripts/ci/linux64/build.sh;
270-
scripts/ci/$TARGET/run_tests.sh;
271-
else
272-
scripts/ci/$TARGET/build.sh;
273-
fi
239+
# build-linux64-2204:
240+
# runs-on: ubuntu-22.04
241+
# strategy:
242+
# matrix:
243+
# cfg:
244+
# - {target: linux64, libs: 64gcc6}
245+
# env:
246+
# TARGET: ${{matrix.cfg.target}}
247+
# steps:
248+
# - name: Remove Old lib-unwind
249+
# run: if [ "$TARGET" = "linux64" ]; then
250+
# sudo apt-get remove libunwind-14 -y;
251+
# fi
252+
# - name: Cache Packages
253+
# uses: awalsh128/cache-apt-pkgs-action@latest
254+
# with:
255+
# packages: aptitude aptitude-common libboost-iostreams1.83.0 libcwidget4 libsigc++-2.0-0v5 libxapian30 fonts-wine{a} libasound2-plugins{a} libcapi20-3t64{a} libosmesa6{a} libpcsclite1{a} libspeexdsp1{a} libwine{a} libxkbregistry0{a} libz-mingw-w64{a} wine{a} wine64 wget2 make libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile1-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libpulse-dev libusb-1.0-0-dev libgtk2.0-dev libopencv-dev libassimp-dev librtaudio-dev gdb libglfw3-dev liburiparser-dev libpugixml-dev libgconf-2-4 libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-pulseaudio gstreamer1.0-x gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good
256+
# version: 1.0
257+
258+
# - uses: actions/checkout@v4
259+
# - name: ccache
260+
# uses: hendrikmuhs/ccache-action@v1.2.13
261+
# with:
262+
# key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }}
263+
264+
# - name: Download libs
265+
# run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}};
266+
# - name: Install dependencies
267+
# run: ./scripts/ci/$TARGET/install.sh;
268+
# - name: Build
269+
# run: if [ "$TARGET" = "linux64" ]; then
270+
# scripts/ci/linux64/build.sh;
271+
# scripts/ci/$TARGET/run_tests.sh;
272+
# else
273+
# scripts/ci/$TARGET/build.sh;
274+
# fi
274275

275276
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
276277

addons/ofxKinect/libs/libfreenect/src/loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ FN_INTERNAL int upload_firmware(fnusb_dev* dev, char * filename) {
169169
if (!home)
170170
continue;
171171
int homelen = strlen(home);
172-
char* dotfolder = "/.libfreenect";
172+
char dotfolder[14] = "/.libfreenect";
173173
int locallen = strlen(dotfolder);
174174
fwfile = (char*)malloc(homelen + locallen + filenamelen + 1);
175175
strcpy(fwfile, home);

addons/ofxKinect/libs/libfreenect/src/usb_libusb10.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,8 @@ FN_INTERNAL int fnusb_open_subdevices(freenect_device *dev, int index)
585585
}
586586
else
587587
{
588-
res = upload_firmware(&dev->usb_audio, "audios.bin");
588+
char audiosBin[11] = "audios.bin";
589+
res = upload_firmware(&dev->usb_audio, audiosBin);
589590
}
590591

591592
if (res < 0) {

libs/openFrameworks/app/ofAppEGLWindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,10 @@ void ofAppEGLWindow::setup(const ofAppEGLWindowSettings & _settings) {
409409

410410
// X11 check
411411
// char * pDisplay;
412-
// pDisplay = getenv ("DISPLAY");
412+
// pDisplay = ofGetEnv("DISPLAY");
413413
// bool bIsX11Available = (pDisplay != NULL);
414414

415-
bool bIsX11Available = getenv("DISPLAY") != NULL;
415+
bool bIsX11Available = ofGetEnv("DISPLAY") != NULL;
416416

417417
if(settings.eglWindowPreference == OF_APP_WINDOW_AUTO) {
418418
if(bIsX11Available) {

libs/openFrameworks/graphics/ofTrueTypeFont.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ void initWindows(){
302302
char fontsPath[2048];
303303
SHGetKnownFolderIDList(FOLDERID_Fonts, 0, nullptr, &ppidl);
304304
SHGetPathFromIDList(ppidl,&fontsPath);*/
305-
string fontsDir = getenv ("windir");
305+
string fontsDir = ofGetEnv("windir");
306306
fontsDir += "\\Fonts\\";
307307
for (DWORD i = 0; i < value_count; ++i)
308308
{

libs/openFrameworks/utils/ofLog.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,11 +504,12 @@ class ofLog{
504504
/// \tparam T the data type to be streamed.
505505
/// \param value the data to be streamed.
506506
/// \returns A reference to itself.
507-
template <class T>
508-
ofLog& operator<<(const T& value){
507+
template <class T>
508+
ofLog & operator<<(const T & value) {
509509
message << value << getPadding();
510510
return *this;
511511
}
512+
512513

513514
/// \brief Define flexible stream operator.
514515
///

libs/openFrameworks/utils/ofUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ std::string ofGetEnv(const std::string & var, const std::string defaultValue) {
11321132
return defaultValue;
11331133
}
11341134
#else
1135-
auto value = getenv(var.c_str());
1135+
auto value = std::getenv(var.c_str());
11361136
if (value) {
11371137
return value;
11381138
} else {

libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// once all libraries are compiled for libc++ / all architectures
22
CLANG_CXX_LIBRARY = libc++
33
CLANG_ENABLE_OBJC_ARC = YES
4-
CLANG_CXX_LANGUAGE_STANDARD = c++17
4+
CLANG_CXX_LANGUAGE_STANDARD = c++23
5+
CLANG_C_LANGUAGE_STANDARD = c17
56
IPHONEOS_DEPLOYMENT_TARGET = 15.0
67

78

libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// define which C++ library is required to build, based on target architecture
22
CLANG_CXX_LIBRARY = libc++
33
CLANG_ENABLE_OBJC_ARC = YES
4-
CLANG_CXX_LANGUAGE_STANDARD = c++17
4+
CLANG_CXX_LANGUAGE_STANDARD = c++23
5+
CLANG_C_LANGUAGE_STANDARD = c17
56
MACOSX_DEPLOYMENT_TARGET = 10.15
67

78

libs/openFrameworksCompiled/project/vs/openframeworksLib.vcxproj

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,32 @@
7676
<ClCompile>
7777
<Optimization>Disabled</Optimization>
7878
<AdditionalIncludeDirectories>$(OF_ROOT)\libs\openFrameworks;$(OF_ROOT)\libs\openFrameworks\graphics;$(OF_ROOT)\libs\openFrameworks\app;$(OF_ROOT)\libs\openFrameworks\sound;$(OF_ROOT)\libs\openFrameworks\utils;$(OF_ROOT)\libs\openFrameworks\communication;$(OF_ROOT)\libs\openFrameworks\video;$(OF_ROOT)\libs\openFrameworks\types;$(OF_ROOT)\libs\openFrameworks\math;$(OF_ROOT)\libs\openFrameworks\3d;$(OF_ROOT)\libs\openFrameworks\gl;$(OF_ROOT)\libs\openFrameworks\events;$(OF_ROOT)\libs\glut\include;$(OF_ROOT)\libs\glm\include;$(OF_ROOT)\libs\rtAudio\include;$(OF_ROOT)\libs\quicktime\include;$(OF_ROOT)\libs\freetype\include;$(OF_ROOT)\libs\freetype\include\freetype2;$(OF_ROOT)\libs\freeImage\include;$(OF_ROOT)\libs\fmod\include;$(OF_ROOT)\libs\videoInput\include;$(OF_ROOT)\libs\glew\include\;$(OF_ROOT)\libs\glu\include;$(OF_ROOT)\libs\tess2\include;$(OF_ROOT)\libs\cairo\include;$(OF_ROOT)\libs\poco\include;$(OF_ROOT)\libs\glfw\include;$(OF_ROOT)\libs\openssl\include;$(OF_ROOT)\libs\utf8\include;$(OF_ROOT)\libs\boost\include;$(OF_ROOT)\libs\json\include;$(OF_ROOT)\libs\curl\include;$(OF_ROOT)\libs\uriparser\include;$(OF_ROOT)\libs\pugixml\include;$(OF_ROOT)\addons;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
79-
<PreprocessorDefinitions>WIN32;CURL_STATICLIB;FREEIMAGE_LIB;URI_STATIC_BUILD;_DEBUG;_CONSOLE;POCO_STATIC;CAIRO_WIN32_STATIC_BUILD;DISABLE_SOME_FLOATING_POINT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
79+
<PreprocessorDefinitions>WIN32;CURL_STATICLIB;FREEIMAGE_LIB;URI_STATIC_BUILD;_HAS_STREAM_INSERTION_OPERATORS_DELETED_IN_CXX20;_DEBUG;_CONSOLE;POCO_STATIC;CAIRO_WIN32_STATIC_BUILD;DISABLE_SOME_FLOATING_POINT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
8080
<MultiProcessorCompilation>true</MultiProcessorCompilation>
8181
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
8282
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
8383
<WarningLevel>Level3</WarningLevel>
8484
<BrowseInformation>false</BrowseInformation>
8585
<CompileAs>CompileAsCpp</CompileAs>
86-
<LanguageStandard>stdcpp17</LanguageStandard>
86+
<LanguageStandard>stdcpplatest</LanguageStandard>
8787
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
8888
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">false</BufferSecurityCheck>
89+
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">stdc17</LanguageStandard_C>
90+
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">stdc17</LanguageStandard_C>
91+
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">stdc17</LanguageStandard_C>
92+
<EnableModules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</EnableModules>
93+
<BuildStlModules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</BuildStlModules>
94+
<EnableModules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">true</EnableModules>
95+
<BuildStlModules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">true</BuildStlModules>
96+
<EnableModules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</EnableModules>
97+
<BuildStlModules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BuildStlModules>
8998
</ClCompile>
9099
<Lib>
91100
<AdditionalLibraryDirectories>
92101
</AdditionalLibraryDirectories>
102+
<UseUnicodeResponseFiles Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</UseUnicodeResponseFiles>
103+
<UseUnicodeResponseFiles Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">true</UseUnicodeResponseFiles>
104+
<UseUnicodeResponseFiles Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</UseUnicodeResponseFiles>
93105
</Lib>
94106
<PreLinkEvent>
95107
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">for /d %%f in ("$(OF_ROOT)\libs\*") do (if exist "%%f\lib\vs\x64\*.dll" (xcopy /Y /E "%%f\lib\vs\x64\*.dll" "$(SolutionDir)dll\x64\"))</Command>
@@ -105,18 +117,27 @@
105117
<ClCompile>
106118
<WholeProgramOptimization>false</WholeProgramOptimization>
107119
<AdditionalIncludeDirectories>$(OF_ROOT)\libs\openFrameworks;$(OF_ROOT)\libs\openFrameworks\graphics;$(OF_ROOT)\libs\openFrameworks\app;$(OF_ROOT)\libs\openFrameworks\sound;$(OF_ROOT)\libs\openFrameworks\utils;$(OF_ROOT)\libs\openFrameworks\communication;$(OF_ROOT)\libs\openFrameworks\video;$(OF_ROOT)\libs\openFrameworks\types;$(OF_ROOT)\libs\openFrameworks\math;$(OF_ROOT)\libs\openFrameworks\3d;$(OF_ROOT)\libs\openFrameworks\gl;$(OF_ROOT)\libs\openFrameworks\events;$(OF_ROOT)\libs\glut\include;$(OF_ROOT)\libs\glm\include;$(OF_ROOT)\libs\rtAudio\include;$(OF_ROOT)\libs\quicktime\include;$(OF_ROOT)\libs\freetype\include;$(OF_ROOT)\libs\freetype\include\freetype2;$(OF_ROOT)\libs\freeImage\include;$(OF_ROOT)\libs\fmod\include;$(OF_ROOT)\libs\videoInput\include;$(OF_ROOT)\libs\glew\include\;$(OF_ROOT)\libs\glu\include;$(OF_ROOT)\libs\tess2\include;$(OF_ROOT)\libs\cairo\include;$(OF_ROOT)\libs\poco\include;$(OF_ROOT)\libs\glfw\include;$(OF_ROOT)\libs\openssl\include;$(OF_ROOT)\libs\utf8\include;$(OF_ROOT)\libs\boost\include;$(OF_ROOT)\libs\json\include;$(OF_ROOT)\libs\curl\include;$(OF_ROOT)\libs\uriparser\include;$(OF_ROOT)\libs\pugixml\include;$(OF_ROOT)\addons;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
108-
<PreprocessorDefinitions>WIN32;CURL_STATICLIB;FREEIMAGE_LIB;URI_STATIC_BUILD;NDEBUG;_CONSOLE;POCO_STATIC;CAIRO_WIN32_STATIC_BUILD;DISABLE_SOME_FLOATING_POINT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
120+
<PreprocessorDefinitions>WIN32;CURL_STATICLIB;FREEIMAGE_LIB;URI_STATIC_BUILD;_HAS_STREAM_INSERTION_OPERATORS_DELETED_IN_CXX20;NDEBUG;_CONSOLE;POCO_STATIC;CAIRO_WIN32_STATIC_BUILD;DISABLE_SOME_FLOATING_POINT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
109121
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
110122
<WarningLevel>Level1</WarningLevel>
111123
<MultiProcessorCompilation>true</MultiProcessorCompilation>
112-
<LanguageStandard>stdcpp17</LanguageStandard>
124+
<LanguageStandard>stdcpplatest</LanguageStandard>
113125
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
114126
<LanguageStandard_C>stdc17</LanguageStandard_C>
115127
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">false</BufferSecurityCheck>
128+
<EnableModules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</EnableModules>
129+
<BuildStlModules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</BuildStlModules>
130+
<EnableModules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">true</EnableModules>
131+
<BuildStlModules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">true</BuildStlModules>
132+
<EnableModules Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</EnableModules>
133+
<BuildStlModules Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</BuildStlModules>
116134
</ClCompile>
117135
<Lib>
118136
<AdditionalLibraryDirectories>
119137
</AdditionalLibraryDirectories>
138+
<UseUnicodeResponseFiles Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</UseUnicodeResponseFiles>
139+
<UseUnicodeResponseFiles Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">true</UseUnicodeResponseFiles>
140+
<UseUnicodeResponseFiles Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</UseUnicodeResponseFiles>
120141
</Lib>
121142
<PreLinkEvent>
122143
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">for /d %%f in ("$(OF_ROOT)\libs\*") do (if exist "%%f\lib\vs\x64\*.dll" (xcopy /Y /E "%%f\lib\vs\x64\*.dll" "$(SolutionDir)dll\x64\"))</Command>

scripts/ci/vs/install_bleeding.sh

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ if [[ ! -d "$SCRIPT_DIR" ]]; then SCRIPT_DIR="$PWD"; fi
55
. "$SCRIPT_DIR/../../dev/downloader.sh"
66

77
unset BITS
8-
9-
cd ${OF_ROOT}
8+
cd "${OF_ROOT}"
109
./scripts/vs/download_latest_libs.sh -p vs --silent
1110

1211
rm -rf projectGenerator
@@ -15,25 +14,39 @@ cd projectGenerator
1514

1615
echo "Downloading projectGenerator from Github Bleeding"
1716
downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs.zip 2> /dev/null
18-
unzip projectGenerator-vs.zip 2> /dev/null
19-
rm projectGenerator-vs.zip
20-
ls
21-
cd ../
17+
unzip -o projectGenerator-vs.zip 2> /dev/null
18+
#rm projectGenerator-vs.zip
19+
20+
#downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs-gui.zip 2> /dev/null
21+
#unzip projectGenerator-vs-gui.zip 2> /dev/null
22+
#rm projectGenerator-vs-gui.zip
23+
24+
cd "${OF_ROOT}"
2225

23-
# downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs-gui.zip 2> /dev/null
24-
# unzip projectGenerator-vs-gui.zip 2> /dev/null
25-
# rm projectGenerator-vs-gui.zip
26+
OFW_ROOT=$(cygpath -w "$PWD")
27+
PG_OFX_PATH="${OF_ROOT}\\projectGenerator\\projectGenerator.exe"
28+
PG_OF_PATH="${OF_ROOT}/projectGenerator/projectGenerator.exe"
2629

27-
PG_OF_PATH=$OF_ROOT/projectGenerator/projectGenerator.exe
30+
PGW_OFX_PATH=$(cygpath -w "$PG_OF_PATH")
2831

2932
PROJECTS=(
30-
"examples/templates/emptyExample"
31-
"examples/templates/allAddonsExample"
33+
"examples\\templates\\emptyExample"
34+
"examples\\templates\\allAddonsExample"
3235
)
3336

34-
for PROJECT in "${PROJECTS[@]}"; do
35-
OPTIONS="-o\"$OF_ROOT\" \"$OF_ROOT/$PROJECT\""
37+
ADDONS=(
38+
""
39+
"ofxAssimpModelLoader,ofxGui,ofxKinect,ofxNetwork,ofxOpenCv,ofxOsc,ofxSvg,ofxThreadedImageLoader,ofxXmlSettings"
40+
)
41+
42+
echo "Updating projects with PG at:${PG_OF_PATH}"
43+
44+
for i in "${!PROJECTS[@]}"; do
45+
PROJECT=${PROJECTS[i]}
46+
ADDON=${ADDONS[i]}
47+
OPTIONS="-o\"${OF_ROOT}\" -v -a\"$ADDON\" -p\"vs\" -t\"\" \"${OF_ROOT}\\${PROJECT}\""
3648
# Run the project generator executable with the combined options
37-
eval "$PG_OF_PATH $OPTIONS"
38-
#"$PG_OF_PATH" -o"$OF_ROOT" "$OF_ROOT/$PROJECT"
49+
echo "Updating: ${PROJECT} with:${PG_OF_PATH}"
50+
#cmd.exe /c "${PG_OF_PATH} ${OPTIONS}"
51+
eval "${PG_OF_PATH} ${OPTIONS}"
3952
done

0 commit comments

Comments
 (0)