Commit c299b18 1 parent 58e1adf commit c299b18 Copy full SHA for c299b18
File tree 6 files changed +60
-34
lines changed
6 files changed +60
-34
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- CI_BRANCH=" $1 "
5
4
CI_BRANCH=" $1 "
6
5
CI_JSDEC=" $PWD "
7
6
CI_RZ_VERSION=$2
8
7
9
- if [ " $2 " != " dev" ]; then
8
+ if [ " $CI_BRANCH " != " dev" ]; then
10
9
# master branch always build against latest release of rizin
11
10
CI_RZ_VERSION=$( curl -s GET https://api.github.com/repos/rizinorg/rizin/tags\? per_page\= 1 | jq -r ' .[].name' )
11
+ else
12
+ CI_RZ_VERSION=" $CI_BRANCH "
12
13
fi
13
14
14
15
echo " CI_BRANCH: $CI_BRANCH "
@@ -19,7 +20,7 @@ echo "CI_JSDEC: $CI_JSDEC"
19
20
cd ..
20
21
21
22
# download rizin
22
- if [ " $CI_RZ_VERSION " == " dev" ]; then
23
+ if [ " $CI_BRANCH " == " dev" ]; then
23
24
# dev branch always build against latest commit of rizin
24
25
wget -O " rizin.tar.gz" " https://github.com/rizinorg/rizin/archive/refs/heads/dev.tar.gz"
25
26
tar xf " rizin.tar.gz"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ .ci- scripts\vsdevenv.ps1 64
2
+
3
+ function Invoke-NativeCommand () {
4
+ if ($args.Count -eq 0 ) {
5
+ throw " Must supply some arguments."
6
+ }
7
+
8
+ $command = $args [0 ]
9
+ $commandArgs = @ ()
10
+ if ($args.Count -gt 1 ) {
11
+ $commandArgs = $args [1 .. ($args.Count - 1 )]
12
+ }
13
+
14
+ & $command $commandArgs
15
+ $result = $LASTEXITCODE
16
+
17
+ if ($result -ne 0 ) {
18
+ throw " $command $commandArgs exited with code $result ."
19
+ }
20
+ }
21
+
22
+
23
+ $rizin_path = " C:$env: HOMEPATH \AppData\Local\Programs\rizin"
24
+ $env: PATH = " $env: PATH ;C:$env: HOMEPATH \AppData\Local\Programs\rizin\bin"
25
+ $env: PKG_CONFIG_PATH = " C:$env: HOMEPATH \AppData\Local\Programs\rizin\lib\pkgconfig"
26
+ $env: CFLAGS = " -IC:$env: HOMEPATH \AppData\Local\Programs\rizin\include\librz -IC:$env: HOMEPATH \AppData\Local\Programs\rizin\include\librz\sdb"
27
+ $env: LDFLAGS = " -LC:$env: HOMEPATH \AppData\Local\Programs\rizin\lib"
28
+
29
+
30
+ Invoke-NativeCommand meson setup -- buildtype= release -- prefix= " $rizin_path " build
31
+ Invoke-NativeCommand ninja - C build install
32
+ rizin.exe - e log.level= 2 - Qc " Lc"
33
+ rizin.exe - Qc " af ; pdd" " C:\Windows\System32\calc.exe"
Original file line number Diff line number Diff line change 3
3
import sys
4
4
import os
5
5
6
- file_name = sys .argv [1 ]
7
- latest = "master" if len (sys .argv ) < 2 else sys .argv [2 ]
6
+ out_file = "rizin.zip"
8
7
9
- _ , file_extension = os .path .splitext (file_name )
10
- out_file = f"rizin{ file_extension } "
11
- print (file_name , out_file )
8
+ latest = "master" if len (sys .argv ) < 1 else sys .argv [1 ]
12
9
13
10
if latest != "dev" :
14
11
# master branch always build against latest release of rizin
15
12
tags = None
16
13
with urllib .request .urlopen ('https://api.github.com/repos/rizinorg/rizin/tags?per_page=1' ) as f :
17
14
tags = json .load (f )
18
15
latest = tags [0 ]['name' ]
19
- url = f"https://github.com/rizinorg/rizin/releases/download/{ latest } /{ file_name } "
20
- url = url .format (version = latest )
16
+ url = f"https://github.com/rizinorg/rizin/archive/refs/tags/{ latest } .zip"
21
17
else :
22
18
# dev branch always build against latest commit of rizin
23
19
url = "https://github.com/rizinorg/rizin/archive/refs/heads/dev.zip"
Original file line number Diff line number Diff line change
1
+ $bits = $args [0 ]
1
2
$installationPath = vswhere.exe - latest - property installationPath
2
- if ($installationPath -and (test-path " $installationPath \Common7\Tools\vsdevcmd.bat" )) {
3
- & " ${env: COMSPEC} " / s / c " `" $installationPath \Common7\Tools\vsdevcmd.bat`" -no_logo && set" | foreach-object {
4
- $name , $value = $_ -split ' =' , 2
5
- set-content env:\" $name " $value
3
+ if (-not $installationPath -or -not (test-path " $installationPath \VC\Auxiliary\Build\vcvars$bits .bat" )) {
4
+ throw " vcvars$bits .bat file not found"
5
+ }
6
+ & " ${env: COMSPEC} " / s / c " `" $installationPath \VC\Auxiliary\Build\vcvars$bits .bat`" > nul 2>&1 && set" | . { process {
7
+ if ($_ -match ' ^([^=]+)=(.*)' ) {
8
+ [System.Environment ]::SetEnvironmentVariable($matches [1 ], $matches [2 ])
6
9
}
7
- }
10
+ }}
Original file line number Diff line number Diff line change 20
20
uses : actions/checkout@v4
21
21
- name : Install dependencies
22
22
run : sudo apt -y install meson ninja-build
23
- - name : Build & run the plugin
23
+ - name : Build & run jsdec as rizin plugin
24
24
run : bash .ci-scripts/ci-build-linux.sh "${{ github.event.pull_request.base.ref || github.ref_name }}"
25
25
26
26
windows-64 :
@@ -44,19 +44,23 @@ jobs:
44
44
- name : Install dependencies
45
45
shell : bash
46
46
run : |
47
- pip install ninja meson
47
+ pip install ninja meson PyYAML
48
48
choco install pkgconfiglite
49
49
choco install zip
50
- - name : Install rizin
50
+ - name : Fetch & build rizin
51
51
shell : bash
52
52
run : |
53
53
WORKDIR="$PWD"
54
54
cd ..
55
- python "$WORKDIR/.ci-scripts/ci-rizin-dl.py" 'rizin-${{ matrix.release }}-{version}.zip' ' ${{ github.event.pull_request.base.ref || github.ref_name }}'
55
+ python "$WORKDIR/.ci-scripts/ci-rizin-dl.py" '${{ github.event.pull_request.base.ref || github.ref_name }}'
56
56
unzip -q rizin.zip
57
57
rm *.zip
58
- mv rizin* rizin
58
+ mv rizin* rizin-build
59
+ cd rizin-build
60
+ powershell.exe ".\dist\windows\build_windows_installer.ps1 vs2019_static 64 --default-library=shared -Dportable=true"
61
+ ls ./dist/windows/Output
62
+ powershell.exe '.\dist\windows\Output\rizin.exe /SP- /SILENT /CURRENTUSER'
59
63
cd "$WORKDIR"
60
- - name : Build & run the plugin
61
- shell : cmd
62
- run : .ci-scripts/ ci-build-win.bat x64
64
+ - name : Build & run jsdec as rizin plugin
65
+ shell : pwsh
66
+ run : .ci-scripts\ ci-build-win.ps1 64
You can’t perform that action at this time.
0 commit comments