Skip to content

Commit

Permalink
Pull request #36: windows powershell example build scripts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Hussein Elsherbini authored and jmartinez-silabs committed Mar 27, 2024
1 parent 56144a4 commit 80a3314
Show file tree
Hide file tree
Showing 5 changed files with 868 additions and 1 deletion.
19 changes: 18 additions & 1 deletion build/gn_run_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,25 @@

import subprocess
import sys
import os

# add windows check

if(sys.platform.startswith('win')):
file_name = os.path.splitext(sys.argv[1])
args = ''
for x in file_name:
if x == '.py':
args = ['python.exe'] + sys.argv[1:]
break

if bool(args) == False:

args = sys.argv[1:]

else:
args = sys.argv[1:]

args = sys.argv[1:]

ret = subprocess.call(args)
if ret != 0:
Expand Down
35 changes: 35 additions & 0 deletions scripts/WIN_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Windows Support

short guide on using example build scripts on windows.

## Requirements

1. PowerShell (Version 5.0 and up preferred)
2. git

## Usage

run setup script.

```PowerShell
./scripts/windows_setup.ps1 --setup
```

when running an example build script, the arguments and their order is
important.

```PowerShell
./scripts/examples/gn_efr32_example.sh <AppRootFolder> <outputFolder> <efr32_board_name> [<Build options>]
```

for example:

```PowerShell
./scripts/examples/gn_efr32_example.ps1 /examples/lighting-app/efr32/ /out/lighting-app BRD4161A
```

To cleanup environment:

```PowerShell
./scrips/windows_setup.ps1 --cleanup
```
Loading

0 comments on commit 80a3314

Please sign in to comment.