Skip to content

Commit 80a3314

Browse files
Hussein Elsherbinijmartinez-silabs
Hussein Elsherbini
authored andcommitted
Pull request #36: windows powershell example build scripts
Merge in WMN_TOOLS/matter from windows_support to silabs Squashed commit of the following: commit e828c1093c9cd7b699ec3408c5545ef772ee6a3b Author: Hussein <huelsher@silabs.com> Date: Wed Aug 10 10:39:34 2022 -0400 applied suggestions in gn_efr32_example.ps1 and WIN_README.md jira : MATTER-232 commit bc99b9d0316037d444df2285fa3b8f44e468904a Author: Hussein <huelsher@silabs.com> Date: Wed Aug 10 10:37:02 2022 -0400 applied suggestions in gn_efr32_example.ps1 and WIN_README.md jira : MATTER-232 commit 8af6b19b2d69235c6207ed6b08acf9f32881face Merge: 0cc21fe73 ceb781602 Author: Hussein <huelsher@silabs.com> Date: Wed Aug 10 10:32:29 2022 -0400 applied suggestions in gn_efr32_example.ps1 and WIN_README.md jira : MATTER-232 commit 0cc21fe73cdf5db1de4f7d558d8393f21bd388f2 Author: Hussein <huelsher@silabs.com> Date: Wed Aug 10 10:20:07 2022 -0400 applied suggestions in gn_efr32_example.ps1 and WIN_README.md >> jira : MATTER-232 commit a30ba104ff94bdbd883df090ff1cb8bcceca1f45 Author: Hussein <huelsher@silabs.com> Date: Mon Aug 8 14:51:15 2022 -0400 applied suggestions in gn_efr32_example.ps1 and WIN_README.md jira : MATTER-232 commit ceb78160202858c7d483533f6915392f423a023f Author: Ricardo Casallas <Ricardo.Casallas@silabs.com> Date: Mon Aug 8 17:44:33 2022 +0000 Applied suggestion commit 8278fd076807c1cac4a7342c094f0e0092747d54 Author: Ricardo Casallas <Ricardo.Casallas@silabs.com> Date: Mon Aug 8 17:31:21 2022 +0000 Applied suggestion commit 22f58560e66ac0e8d592c7ca19695d2f5dc72da8 Author: Ricardo Casallas <Ricardo.Casallas@silabs.com> Date: Mon Aug 8 17:31:12 2022 +0000 Applied suggestion commit 45563b525169fedd01994366a33e05f58eec454e Author: Hussein <huelsher@silabs.com> Date: Mon Aug 8 11:13:55 2022 -0400 fixed suggested comment typo in bootstrap.ps1 jira : MATTER-232 commit 139e1963937b3f76376430fc0ec9f31fb5e72afa Author: Hussein <huelsher@silabs.com> Date: Thu Aug 4 16:02:49 2022 -0400 added windows_setup.ps1, WIN_README.md, and modified bootstrap.ps1 and gn_efr32_example.ps1 jira : MATTER-232 commit 5575eacbd939ccb6ce7396c3fca64eeae88a1af7 Author: Hussein <huelsher@silabs.com> Date: Wed Aug 3 17:23:30 2022 -0400 windows powershell example build scripts
1 parent 56144a4 commit 80a3314

File tree

5 files changed

+868
-1
lines changed

5 files changed

+868
-1
lines changed

build/gn_run_binary.py

+18-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,25 @@
5151

5252
import subprocess
5353
import sys
54+
import os
55+
56+
# add windows check
57+
58+
if(sys.platform.startswith('win')):
59+
file_name = os.path.splitext(sys.argv[1])
60+
args = ''
61+
for x in file_name:
62+
if x == '.py':
63+
args = ['python.exe'] + sys.argv[1:]
64+
break
65+
66+
if bool(args) == False:
67+
68+
args = sys.argv[1:]
69+
70+
else:
71+
args = sys.argv[1:]
5472

55-
args = sys.argv[1:]
5673

5774
ret = subprocess.call(args)
5875
if ret != 0:

scripts/WIN_README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Windows Support
2+
3+
short guide on using example build scripts on windows.
4+
5+
## Requirements
6+
7+
1. PowerShell (Version 5.0 and up preferred)
8+
2. git
9+
10+
## Usage
11+
12+
run setup script.
13+
14+
```PowerShell
15+
./scripts/windows_setup.ps1 --setup
16+
```
17+
18+
when running an example build script, the arguments and their order is
19+
important.
20+
21+
```PowerShell
22+
./scripts/examples/gn_efr32_example.sh <AppRootFolder> <outputFolder> <efr32_board_name> [<Build options>]
23+
```
24+
25+
for example:
26+
27+
```PowerShell
28+
./scripts/examples/gn_efr32_example.ps1 /examples/lighting-app/efr32/ /out/lighting-app BRD4161A
29+
```
30+
31+
To cleanup environment:
32+
33+
```PowerShell
34+
./scrips/windows_setup.ps1 --cleanup
35+
```

0 commit comments

Comments
 (0)