Skip to content

Commit 11f2a0a

Browse files
VS build (#347)
* Mingw support Signed-off-by: Cervenka Dusan <[email protected]> * mkdirc Signed-off-by: Cervenka Dusan <[email protected]> * Added circleci build for mingw Signed-off-by: Cervenka Dusan <[email protected]> * build VS project Signed-off-by: Cervenka Dusan <[email protected]> --------- Signed-off-by: Cervenka Dusan <[email protected]> Co-authored-by: Michal Princ <[email protected]>
1 parent 8f77dad commit 11f2a0a

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

.circleci/config.yml

+19-6
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
- checkout
2121
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh clang
2222
- run: chmod u+x run_tests.sh && ./run_tests.sh clang
23-
- store_artifacts:
24-
path: ./Release/Linux/erpcgen/erpcgen
23+
# - store_artifacts:
24+
# path: ./Release/Linux/erpcgen/erpcgen
2525
build-mac-gcc:
2626
macos:
2727
xcode: 12.5.1 # https://circleci.com/docs/using-macos/#supported-xcode-versions https://en.wikipedia.org/wiki/MacOS_version_history#Releases
@@ -40,8 +40,8 @@ jobs:
4040
- checkout
4141
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh clang
4242
- run: chmod u+x run_tests.sh && ./run_tests.sh clang
43-
- store_artifacts:
44-
path: ./Release/Darwin/erpcgen/erpcgen
43+
# - store_artifacts:
44+
# path: ./Release/Darwin/erpcgen/erpcgen
4545
build-windows-mingw:
4646
executor:
4747
name: win/default
@@ -50,9 +50,21 @@ jobs:
5050
- checkout
5151
- run: powershell.exe .\install_dependencies.ps1
5252
- run: powershell.exe .\mingw64\bin\mingw32-make erpcgen
53+
# - store_artifacts:
54+
# path: ./Release/MINGW64/erpcgen/erpcgen.exe
55+
build-windows-VS:
56+
executor:
57+
name: win/default
58+
size: large
59+
steps:
60+
- checkout
61+
- run:
62+
name: Install VS buuildtools
63+
no_output_timeout: 60m
64+
command: powershell.exe .\install_dependencies.ps1 VS
65+
- run: powershell.exe "& 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' .\erpcgen\VisualStudio_v14\erpcgen.sln /property:Configuration=Release"
5366
- store_artifacts:
54-
path: ./Release/MINGW64/erpcgen/erpcgen.exe
55-
67+
path: ./erpcgen/VisualStudio_v14/Release/erpcgen.exe
5668
workflows:
5769
build-workflow:
5870
jobs:
@@ -61,3 +73,4 @@ workflows:
6173
- build-mac-gcc
6274
- build-mac-clang
6375
- build-windows-mingw
76+
- build-windows-VS

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,4 @@ boost.7z
111111
boost*/
112112
mingw.7z
113113
mingw64/
114+
vs_BuildTools*

erpcgen/Makefile

-4
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ ifeq "$(build)" "release"
112112
endif
113113
endif
114114

115-
ifeq "$(is_mingw)" "1"
116-
CXXFLAGS += -DBOOST_FILESYSTEM_VERSION=4
117-
endif
118-
119115
# Run flex
120116
$(OBJS_ROOT)/erpcgen_lexer.cpp: $(ERPC_ROOT)/erpcgen/src/erpcgen_lexer.l $(OBJS_ROOT)/erpcgen_parser.tab.hpp | $(OBJECTS_DIRS)
121117
@$(call printmessage,orange,Generating, $(subst $(ERPC_ROOT)/,,$<))

install_dependencies.ps1

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ Set-Location "..\..\"
2222

2323
if ($args[0] -eq "VS")
2424
{
25-
# winget install --id=Microsoft.VisualStudio.2019.BuildTools -e
26-
# & 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' .\erpcgen\VisualStudio_v14\erpcgen.sln /property:Configuration=Release
25+
$URLBuildtools="https://download.visualstudio.microsoft.com/download/pr/33d686db-3937-4a19-bb3c-be031c5d69bf/66d85abf1020496b07c59aba176def5127352f2fbdd3c4c4143738ab7dfcb459/vs_BuildTools.exe"
26+
$PathBuildtools="vs_BuildTools.exe"
27+
Remove-Item -ErrorAction Ignore $PathBuildtools
28+
Invoke-WebRequest -URI $URLBuildtools -OutFile $PathBuildtools
29+
Start-Process $PathBuildtools -ArgumentList "--quiet --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --wait" -Wait
2730
}
2831
else
2932
{

0 commit comments

Comments
 (0)