Skip to content

Commit bbee5bb

Browse files
authored
Build projectGenerator for windows in CI - fix bug with addons.make not being parsed (openframeworks#359)
1 parent aded557 commit bbee5bb

File tree

4 files changed

+88
-1
lines changed

4 files changed

+88
-1
lines changed

.github/workflows/build-vs.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: build-vs
2+
3+
# make the action not run on the local repo if the branch is also in a pull request to OF/OF
4+
on:
5+
push:
6+
if: github.event_name == 'push' && github.event.pull_request == null
7+
paths-ignore:
8+
- '**/*.md'
9+
- 'examples/**'
10+
pull_request:
11+
if: github.event_name == 'pull_request' && github.repository == 'openframeworks/openFrameworks'
12+
paths-ignore:
13+
- '**/*.md'
14+
- 'examples/**'
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build-vs2019:
22+
runs-on: windows-2019
23+
strategy:
24+
matrix:
25+
include:
26+
- platform: x64
27+
bits: 64
28+
env:
29+
BITS: ${{ matrix.bits }}
30+
steps:
31+
- name: Clone repository
32+
uses: actions/checkout@v3
33+
- uses: msys2/setup-msys2@v2
34+
with:
35+
update: true
36+
install: >-
37+
git
38+
unzip
39+
zip
40+
rsync
41+
wget
42+
- name: Install dependencies
43+
shell: msys2 {0}
44+
run:
45+
./scripts/vs/install.sh
46+
- name: Setup MSBuild
47+
uses: microsoft/[email protected]
48+
- name: Build projectGenerator
49+
working-directory: ${{env.GITHUB_WORKSPACE}}
50+
run:
51+
msbuild ../openFrameworks/apps/projectGenerator/commandLine/commandLine.vcxproj /p:configuration=release /p:platform=${{ matrix.platform }} /p:PlatformToolset=v142
52+
- name: Create zip
53+
if: github.repository == 'openframeworks/projectGenerator' && github.ref == 'refs/heads/master'
54+
shell: msys2 {0}
55+
run:
56+
./scripts/vs/create_package.sh
57+
- name: Update Release
58+
if: github.repository == 'openframeworks/projectGenerator' && github.ref == 'refs/heads/master'
59+
uses: IsaacShelton/[email protected]
60+
with:
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
tag: nightly
63+
release: nightly
64+
prerelease: false
65+
replace: true
66+
files: ../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator-vs.zip

commandLine/src/main.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@ int main(int argc, char** argv){
485485
else {
486486
mode = PG_MODE_CREATE;
487487
}
488-
mode = PG_MODE_CREATE;
488+
489+
//mode = PG_MODE_CREATE;
489490

490491

491492
if (bVerbose){

scripts/vs/create_package.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
OF_ROOT=$PWD
2+
SCRIPT_DIR="${BASH_SOURCE%/*}"
3+
4+
cd ../openFrameworks/apps/projectGenerator/commandLine/bin/
5+
mv commandLine.exe projectGenerator.exe
6+
zip -r projectGenerator-vs.zip projectGenerator.exe data
7+
8+

scripts/vs/install.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
OF_ROOT=$PWD
2+
3+
SCRIPT_DIR="${BASH_SOURCE%/*}"
4+
5+
cd ..
6+
of_root=${PWD}/openFrameworks
7+
pg_root=${PWD}/openFrameworks/apps/projectGenerator
8+
git clone https://github.com/openframeworks/openFrameworks --depth=1
9+
cp -r projectGenerator openFrameworks/apps/
10+
cd openFrameworks
11+
scripts/vs/download_libs.sh -p vs --silent
12+

0 commit comments

Comments
 (0)