Skip to content

Commit 150d275

Browse files
authored
Fix MSBuild paths in some bash (#481)
- exclude .mm/storyboard vs
1 parent 5aec348 commit 150d275

5 files changed

Lines changed: 60 additions & 43 deletions

File tree

commandLine/commandLine.vcxproj

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Release|x64">
5+
<Configuration>Release</Configuration>
6+
<Platform>x64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|x64">
9+
<Configuration>Debug</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
412
<ProjectConfiguration Include="Debug|ARM64">
513
<Configuration>Debug</Configuration>
614
<Platform>ARM64</Platform>
@@ -9,10 +17,6 @@
917
<Configuration>Debug</Configuration>
1018
<Platform>ARM64EC</Platform>
1119
</ProjectConfiguration>
12-
<ProjectConfiguration Include="Debug|x64">
13-
<Configuration>Debug</Configuration>
14-
<Platform>x64</Platform>
15-
</ProjectConfiguration>
1620
<ProjectConfiguration Include="Release|ARM64">
1721
<Configuration>Release</Configuration>
1822
<Platform>ARM64</Platform>
@@ -21,10 +25,6 @@
2125
<Configuration>Release</Configuration>
2226
<Platform>ARM64EC</Platform>
2327
</ProjectConfiguration>
24-
<ProjectConfiguration Include="Release|x64">
25-
<Configuration>Release</Configuration>
26-
<Platform>x64</Platform>
27-
</ProjectConfiguration>
2828
</ItemGroup>
2929
<PropertyGroup Label="Globals">
3030
<ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>
@@ -33,25 +33,25 @@
3333
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
3434
</PropertyGroup>
3535
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
36-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
36+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
3737
<ConfigurationType>Application</ConfigurationType>
3838
<CharacterSet>Unicode</CharacterSet>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
3940
<PlatformToolset>v143</PlatformToolset>
4041
</PropertyGroup>
41-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4243
<ConfigurationType>Application</ConfigurationType>
4344
<CharacterSet>Unicode</CharacterSet>
4445
<PlatformToolset>v143</PlatformToolset>
4546
</PropertyGroup>
46-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="Configuration">
47+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
4748
<ConfigurationType>Application</ConfigurationType>
4849
<CharacterSet>Unicode</CharacterSet>
4950
<PlatformToolset>v143</PlatformToolset>
5051
</PropertyGroup>
51-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
52+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="Configuration">
5253
<ConfigurationType>Application</ConfigurationType>
5354
<CharacterSet>Unicode</CharacterSet>
54-
<WholeProgramOptimization>true</WholeProgramOptimization>
5555
<PlatformToolset>v143</PlatformToolset>
5656
</PropertyGroup>
5757
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">

commandLine/src/projects/visualStudioProject.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void visualStudioProject::addSrc(const fs::path & srcFile, const fs::path & fold
190190
pugi::xml_node nodeAdded = node.append_child("ClInclude");
191191
nodeAdded.append_attribute("Include").set_value(srcFileString.c_str());
192192
nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folderString.c_str());
193-
} else if ( ext == ".vert" || ext == ".frag" ) {
193+
} else if (ext == ".vert" || ext == ".frag") {
194194
// TODO: add to None but there's no None in the original template so this fails
195195
/*appendValue(doc, "None", "Include", srcFile);
196196
@@ -199,6 +199,8 @@ void visualStudioProject::addSrc(const fs::path & srcFile, const fs::path & fold
199199
nodeAdded.append_attribute("Include").set_value(srcFile.c_str());
200200
nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str());*/
201201

202+
} else if (ext == ".storyboard" || ext == ".mm") {
203+
// Do not add files for other platforms
202204
} else{
203205
appendValue(doc, "ClCompile", "Include", srcFileString);
204206

@@ -251,7 +253,7 @@ void visualStudioProject::addSrc(const fs::path & srcFile, const fs::path & fold
251253
break;
252254
}
253255
default:{
254-
ofLogError() << "explicit source type " << type << " not supported yet on osx for " << srcFileString;
256+
ofLogError() << "explicit source type " << type << " not supported yet on VSProject for " << srcFileString;
255257
break;
256258
}
257259
}

frontend/npm-shrinkwrap.json

Lines changed: 29 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/settings.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

scripts/vs/build_cmdline.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,41 @@ cd commandLine
2020

2121
echo "Building openFrameworks commandLine PG - VS"
2222

23+
2324
if [ -z "${PLATFORM+x}" ]; then
2425
PLATFORM=x64
2526
fi
2627

2728
if [ -z "${TOOLSET+x}" ]; then
2829
TOOLSET=v143
2930
fi
31+
32+
if [ -z "${CONFIGURATION+x}" ]; then
33+
CONFIGURATION=${CONFIGURATION:-Release}
34+
fi
35+
36+
37+
3038
pwd
3139
ls
3240

41+
42+
3343
CURRENT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3444

3545

3646
# Check if msbuild is available in PATH
3747
if command -v msbuild &> /dev/null; then
3848
echo "msbuild is available, use it directly"
39-
msbuild "commandLine.vcxproj" /p:configuration=release /p:platform=${PLATFORM} /p:PlatformToolset=${TOOLSET}
49+
msbuild "commandLine.vcxproj" //p:configuration=${CONFIGURATION} //p:platform=${PLATFORM} //p:PlatformToolset=${TOOLSET}
4050
else
4151
echo "msbuild is not available, use the specified path"
4252
#VS_BASE_PATH="/c/Program Files/Microsoft Visual Studio/2022/Community"
4353
#MSBUILD_PATH="${VS_BASE_PATH}/MSBuild/Current/Bin/MSBuild.exe"
4454

45-
MSBUILD_PATH="C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"
46-
MSSTRING=commandLine.sln /p:configuration=release /p:platform=${PLATFORM} /p:PlatformToolset=${TOOLSET}
47-
"${MSBUILD_PATH}" "${MSSTRING}"
55+
MSBUILD_PATH="C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe"
56+
MSSTRING="//p:configuration=${CONFIGURATION} //p:platform=${PLATFORM} //p:PlatformToolset=${TOOLSET}"
57+
"${MSBUILD_PATH}" commandLine.sln ${MSSTRING}
4858

4959
fi
5060

0 commit comments

Comments
 (0)