Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add renode-cli #28944

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5b1d320
Add renode-cli
MementoRC Jan 26, 2025
fca5890
(fix) remove selectors. fix typos
MementoRC Jan 27, 2025
b29216e
(fix) add tests requirements
MementoRC Jan 27, 2025
9e65189
(fix) separate arch/noarch
MementoRC Jan 28, 2025
bded9e6
(fix) update renode-cores for non-unix
MementoRC Jan 28, 2025
ab99f31
(fix) update renode-cores for non-unix
MementoRC Jan 28, 2025
c8a4e1b
(fix) use .bat for non-unix
MementoRC Jan 28, 2025
37d1d27
(wip) damn working with win is like pulling teeth
MementoRC Jan 28, 2025
3388248
(fix) use PS1
MementoRC Jan 28, 2025
e66d7d7
(ref) clean unix
MementoRC Jan 29, 2025
309d872
(fix) call 'cleaned-out' function
MementoRC Jan 29, 2025
35e9924
(fix) unix script args. permissions on non-unix
MementoRC Jan 29, 2025
4606fb7
(fix) unix typos. ppc64 not on win?
MementoRC Jan 29, 2025
51bc4e6
(wip) built non-unix till tests
MementoRC Jan 29, 2025
37927b8
(ref) clean non-unix
MementoRC Jan 29, 2025
413f1f9
(fix) tests fail?
MementoRC Jan 29, 2025
4339a60
(fix) test script: hardcode pkg_name
MementoRC Jan 30, 2025
f206438
(fix) dynamic libraries loader?
MementoRC Jan 30, 2025
cab5f38
(fix) arm64 asm code
MementoRC Jan 31, 2025
020a069
(ref) remove build.sh patch
MementoRC Jan 31, 2025
0d3e416
(dev) remove patches, switch to arch renode-cli
MementoRC Jan 31, 2025
a663b6e
(wip) solved ppc64 non-unix. Odd 'do' fail
MementoRC Jan 31, 2025
4d819f2
(wip) closing in on that wraith of an OS
MementoRC Feb 1, 2025
dc9010d
(dev) sed error?
MementoRC Feb 1, 2025
9094271
(fix) win: .so not copied to cli. arm64: clobbered
MementoRC Feb 2, 2025
b306356
(fix) win build update
MementoRC Feb 5, 2025
5a7e35c
(ref) cleanup
MementoRC Mar 11, 2025
7348f94
(fix) corect OS for licenses
MementoRC Mar 12, 2025
8f4ad8c
(wip) remove build_prefix deps
MementoRC Mar 12, 2025
055d176
(fix) update licenses copy for windows
MementoRC Mar 12, 2025
b5d391b
(ref) skip win
MementoRC Mar 13, 2025
8230d8d
(ref) odd CR ussue with patch
MementoRC Mar 13, 2025
06d557a
(fix) typo
MementoRC Mar 13, 2025
9b35d0b
(fix) link the cores?
MementoRC Mar 13, 2025
a5702cf
(fix) os mismatch
MementoRC Mar 13, 2025
5ec33b3
Update recipes/renode-cli/variants.yaml
MementoRC Mar 14, 2025
066057b
Update recipes/renode-cli/build.sh
MementoRC Mar 14, 2025
ff48eb4
Update recipes/renode-cores/variants.yaml
MementoRC Mar 14, 2025
e4af681
Update recipes/renode-cli/build.sh
MementoRC Mar 14, 2025
37ca761
(fix) removed win build to simplify review. WIP
MementoRC Mar 14, 2025
f3c635e
(fix) no win for cli
MementoRC Mar 15, 2025
a7e1892
(fix) share, not opt
MementoRC Mar 15, 2025
34ffa68
(fix) Do we need to install the tests?
MementoRC Mar 15, 2025
c2d515e
(fix) Simplify win cores to single ps1
MementoRC Mar 15, 2025
77049f7
(fix) ninja. core one build.sh
MementoRC Mar 15, 2025
f6ec8e9
(fix) missing folder
MementoRC Mar 15, 2025
ba81074
(fix) single cli build.sh
MementoRC Mar 15, 2025
9a423f1
(fix) create bin dir
MementoRC Mar 15, 2025
5c24d18
(fix) missing logic in refactor
MementoRC Mar 16, 2025
58b5444
(fix) typo
MementoRC Mar 16, 2025
253120d
(fix) ill-placed ""
MementoRC Mar 16, 2025
3a54b45
(fix) several ill-placed ""
MementoRC Mar 16, 2025
3f7b5be
(fix) consolidate build.sh. adding win scaffold
MementoRC Mar 16, 2025
17f0b53
(wip) updated windows recipe
MementoRC Mar 16, 2025
8678248
(ref) fullpath to license-files
MementoRC Mar 17, 2025
b108e6e
(ref) use _NET properties
MementoRC Mar 17, 2025
62d7e52
(wip) updated windows recipe
MementoRC Mar 18, 2025
c2494cd
(fix) sign. correct location Renode.dll
MementoRC Mar 18, 2025
4c30885
(fix) simplified build (linux passes locally)
MementoRC Mar 19, 2025
4ae7e8d
(fix) remove function
MementoRC Mar 19, 2025
1e10379
(fix) various typos
MementoRC Mar 19, 2025
8ec21af
(wip) updated windows recipe
MementoRC Mar 19, 2025
1e38438
(ref) Clean-up
MementoRC Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions recipes/renode-cli/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
powershell -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\renode_build_with_dotnet.ps1"
if %errorlevel% neq 0 exit /b %errorlevel%
92 changes: 92 additions & 0 deletions recipes/renode-cli/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

export PATH="${DOTNET_ROOT}/dotnet:${PATH}"

dotnet_version=$(dotnet --version)
framework_version=${dotnet_version%.*}

# Patch project files
find lib src tests -name "*.csproj" -exec sed -i -E "s/([>;])net6.0([<;])/\1net${framework_version}\2/g" {} \;

# Remove obj and bin directories
find . -name "obj" -o -name "bin" -type d -exec rm -rf {} +

# Fix typo in Renode_NET.sln
if [[ "${PKG_VERSION}" == "1.15.3" ]]; then
sed -i -E 's/ReleaseHeadless\|Any (.+) = Debug/ReleaseHeadless\|Any \1 = Release/' Renode_NET.sln
sed -i -E 's/GetBytes\(registers.Read\(offset\)\);/GetBytes((ushort)registers.Read(offset));/' src/Infrastructure/src/Emulator/Peripherals/Peripherals/Sensors/PAC1934.cs
sed -i -E 's/"System.Drawing.Common" Version="5.0.2"/"System.Drawing.Common" Version="5.0.3"/' lib/termsharp/TermSharp_NET.csproj lib/termsharp/xwt/Xwt.Gtk/Xwt.Gtk3_NET.csproj
else
echo "Remove these patches from the script after 1.15.3"
exit 1
fi

# Prepare for build
mkdir -p "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/bin/Release/lib"
ln -sf ${PREFIX}/lib/renode-cores/* "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/bin/Release/lib"

rm -f "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/translate*.cproj"

# Build with dotnet
mkdir -p "${SRC_DIR}/output/bin/Release/net${framework_version}"
cp "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/${target_platform%%-*}-properties_NET.csproj" "${SRC_DIR}/output/properties.csproj"

dotnet build \
-p:GUI_DISABLED=true \
-p:Configuration=ReleaseHeadless \
-p:GenerateFullPaths=true \
-p:Platform="Any CPU" \
${SRC_DIR}/Renode_NET.sln
echo -n "dotnet" > "${SRC_DIR}/output/bin/Release/build_type"

# Copy LLVM library (simplified logic)
LLVM_LIB="libllvm-disas"
cp "lib/resources/llvm/$LLVM_LIB$SHLIB_EXT" "${SRC_DIR}/output/bin/Release/libllvm-disas$SHLIB_EXT"

# Install procedure
mkdir -p ${PREFIX}/bin ${PREFIX}/libexec/${PKG_NAME} ${PREFIX}/share/${PKG_NAME}/{scripts,platforms,tests} ${SRC_DIR}/license-files

cp -r ${SRC_DIR}/output/bin/Release/net${framework_version}/* ${PREFIX}/libexec/${PKG_NAME}/
cp -r ${SRC_DIR}/scripts/* "${PREFIX}/share/${PKG_NAME}/scripts/"
cp -r ${SRC_DIR}/platforms/* "${PREFIX}/share/${PKG_NAME}/platforms/"

# Remove Mono dynamic library
find ${PREFIX}/libexec/${PKG_NAME} -name "libMonoPosixHelper.so" -exec rm -f {} +

# if [[ "${target_platform}" == "osx-*" ]]; then
# tools/packaging/common_copy_licenses.sh ${SRC_DIR}/license-files macos
# else
# tools/packaging/common_copy_licenses.sh ${SRC_DIR}/license-files linux
# fi
dotnet-project-licenses --input "$SRC_DIR/src/Renode/Renode_NET.csproj" -d "$SRC_DIR/license-files"

# Create renode script (using heredoc)
cat > "${PREFIX}/bin/renode" <<EOF
#!/bin/sh
exec "\${DOTNET_ROOT}"/dotnet exec "\${CONDA_PREFIX}"/libexec/renode-cli/Renode.dll "\$@"
EOF
chmod +x "${PREFIX}/bin/renode"

# Install tests for post-install testing
TEST_PREFIX="${SRC_DIR}/test-bundle"

mkdir -p "${TEST_PREFIX}/bin"
mkdir -p "${TEST_PREFIX}/share/${PKG_NAME}/tests"
cp -r tests/* "${TEST_PREFIX}/share/${PKG_NAME}/tests/"
cp lib/resources/styles/robot.css "${TEST_PREFIX}/share/${PKG_NAME}/tests"

sed -i "s#os\.path\.join(this_path, '\.\./lib/resources/styles/robot\.css')#os.path.join(this_path,'robot.css')#g" "${TEST_PREFIX}/share/${PKG_NAME}/tests/robot_tests_provider.py"

cat > "${TEST_PREFIX}/bin/renode-test" <<EOF
#!/usr/bin/env bash
stty_config=\$(stty -g 2>/dev/null)
python3 "\${LOCAL_TEST_PREFIX:-\${CONDA_PREFIX}}"/share/"${PKG_NAME}"/tests/run_tests.py --robot-framework-remote-server-full-directory "${CONDA_PREFIX}"/libexec/renode-cli "\$@"
result_code=\$?
if [[ -n "\${stty_config+_}" ]]; then stty "\$stty_config"; fi
exit \$result_code
EOF
chmod +x "${TEST_PREFIX}/bin/renode-test"

exit 0
104 changes: 104 additions & 0 deletions recipes/renode-cli/helpers/renode_build_with_dotnet.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
$ErrorActionPreference = "Stop"

# Get logical processors count
$cpuCount = (Get-CimInstance Win32_Processor).NumberOfLogicalProcessors

# Set environment variables (using robust expansion)
$SRC_DIR = & cmd.exe /c echo %SRC_DIR%
$PREFIX = & cmd.exe /c echo %PREFIX%
$PKG_NAME = & cmd.exe /c echo %PKG_NAME%

# Check for empty environment variables
if ([string]::IsNullOrEmpty($SRC_DIR)) { throw "SRC_DIR is empty" }
if ([string]::IsNullOrEmpty($PREFIX)) { throw "PREFIX is empty" }
if ([string]::IsNullOrEmpty($PKG_NAME)) { throw "PKG_NAME is empty" }

# Set environment variables
$env:PATH = "${env:BUILD_PREFIX}/Library/mingw-w64/bin;${env:BUILD_PREFIX}/Library/bin;${env:PREFIX}/Library/bin;${env:PREFIX}/bin;${env:PATH}"

$dotnet_version = dotnet --version

$framework_version = $dotnet_version -replace "^(\d+\.\d+).*", '$1'
@"
<Project>
<PropertyGroup>
<TargetFrameworks>net$framework_version-windows</TargetFrameworks>
</PropertyGroup>
</Project>
"@ | Set-Content "$SRC_DIR\Directory.Build.targets"

Get-ChildItem -Path . -Directory -Filter "obj" -Recurse | Remove-Item -Force -Recurse
Get-ChildItem -Path . -Directory -Filter "bin" -Recurse | Remove-Item -Force -Recurse
Remove-Item -Path "$SRC_DIR/src/Infrastructure/src/Emulator/Cores/translate*.cproj" -Force

(Get-Content $SRC_DIR/src/Infrastructure/src/UI/UI_NET.csproj) -replace "(<\/PropertyGroup>)", " <UseWPF>true</UseWPF>`n`$1" | Set-Content $SRC_DIR/src/Infrastructure/src/UI/UI_NET.csproj
if ($env:PKG_VERSION -eq "1.15.3") {
(Get-Content $SRC_DIR/Renode_NET.sln) | ForEach-Object {
$_ -replace '(ReleaseHeadless\|Any CPU\.(ActiveCfg|Build\.0) = )Debug', '$1Release'
} | Set-Content "$SRC_DIR/Renode_NET.sln"
(Get-Content $SRC_DIR/src/Infrastructure/src/Emulator/Peripherals/Peripherals/Sensors/PAC1934.cs) -replace "GetBytes\(registers.Read\(offset\)\);", "GetBytes((ushort)registers.Read(offset));" | Set-Content src/Infrastructure/src/Emulator/Peripherals/Peripherals/Sensors/PAC1934.cs
(Get-Content $SRC_DIR/lib/termsharp/TermSharp_NET.csproj) -replace '"System.Drawing.Common" Version="5.0.2"', '"System.Drawing.Common" Version="5.0.3"' | Set-Content lib/termsharp/TermSharp_NET.csproj
(Get-Content $SRC_DIR/lib/termsharp/xwt/Xwt.Gtk/Xwt.Gtk3_NET.csproj) -replace '"System.Drawing.Common" Version="5.0.2"', '"System.Drawing.Common" Version="5.0.3"' | Set-Content lib/termsharp/xwt/Xwt.Gtk/Xwt.Gtk3_NET.csproj
} else {
Write-Host "Remove these patches from the script after 1.15.3"
exit 1
}

# Prepare, build, and install
New-Item -ItemType Directory -Path "$SRC_DIR/src/Infrastructure/src/Emulator/Cores/bin/Release/lib", "$SRC_DIR/output/bin/Release/net$framework_version", "$PREFIX/bin", "$PREFIX/libexec/$PKG_NAME", "$PREFIX/share/$PKG_NAME/{scripts,platforms,tests}", "$SRC_DIR/license-files" -Force | Out-Null
Copy-Item -Path "$PREFIX/Library/lib/renode-cores/*" -Destination "$SRC_DIR/src/Infrastructure/src/Emulator/Cores/bin/Release/lib" -Force
Copy-Item -Path "$SRC_DIR/src/Infrastructure/src/Emulator/Cores/windows-properties_NET.csproj" -Destination "$SRC_DIR/output/properties.csproj" -Force

$OUT_BIN_DIR = "$SRC_DIR\output\bin\Release"
"dotnet" | Out-File -FilePath "$SRC_DIR/output/bin/Release/build_type" -Encoding ascii
dotnet build -p:GUI_DISABLED=true -p:Configuration=ReleaseHeadless -p:GenerateFullPaths=true -p:Platform="Any CPU" "$SRC_DIR/Renode_NET.sln"

Copy-Item "$SRC_DIR/lib/resources/llvm/libllvm-disas.dll" "$SRC_DIR/output/bin/Release/" -Force

Copy-Item -Path "$SRC_DIR/output/bin/Release/net$framework_version-windows" -Destination "$PREFIX/libexec/$PKG_NAME/" -Recurse -Force
Copy-Item -Path "$SRC_DIR/scripts" -Destination "$PREFIX/share/$PKG_NAME/scripts" -Recurse -Force
Copy-Item -Path "$SRC_DIR/platforms" -Destination "$PREFIX/share/$PKG_NAME/platforms" -Recurse -Force

dotnet-project-licenses --input "$SRC_DIR/src/Renode/Renode_NET.csproj" -d "$SRC_DIR/license-files" -f "txt"

# Create renode.cmd
New-Item -ItemType File -Path "$PREFIX\bin\renode.cmd" -Force
@"
@echo off
call %DOTNET_ROOT%\dotnet exec %CONDA_PREFIX%\libexec\renode-cli\net$framework_version-windows\Renode.dll %*
"@ | Out-File -FilePath "$PREFIX\bin\renode.cmd" -Encoding ascii

# Install tests for post-install testing
$TEST_PREFIX = "$SRC_DIR/test-bundle"

mkdir -p "$TEST_PREFIX/bin"
mkdir -p "$TEST_PREFIX/share/$PKG_NAME/tests"
Copy-Item -Path "tests/*" -Destination "$TEST_PREFIX/share/$PKG_NAME/tests" -Recurse -Force
Copy-Item -Path "lib/resources/styles/robot.css" -Destination "$TEST_PREFIX/share/$PKG_NAME/tests" -Force

# Use PowerShell's -replace operator
(Get-Content "$TEST_PREFIX/share/$PKG_NAME/tests/robot_tests_provider.py") | ForEach-Object { $_ -replace "os\.path\.join\(this_path, '\.\./lib/resources/styles/robot\.css'\)", "os.path.join(this_path,'robot.css')" } | Set-Content "$TEST_PREFIX/share/$PKG_NAME/tests/robot_tests_provider.py"

# Create renode-test script (using PowerShell heredoc)
@"
@echo off
setlocal enabledelayedexpansion
set "STTY_CONFIG=%stty -g 2^>nul%"
IF NOT DEFINED LOCAL_TEST_PREFIX (
set "LOCAL_TEST_PREFIX=%CONDA_PREFIX%"
)
python "%LOCAL_TEST_PREFIX%\share\renode-cli\tests\run_tests.py" --robot-framework-remote-server-full-directory "%CONDA_PREFIX%\libexec\renode-cli" %*
set "RESULT_CODE=%ERRORLEVEL%"
if not "%STTY_CONFIG%"=="" stty "%STTY_CONFIG%"
exit /b %RESULT_CODE%
"@ | Out-File -FilePath "$TEST_PREFIX\bin\renode-test.cmd" -Encoding ascii

# Terminate the dotnet processes that may hang around and prevent the build environment from being removed
try {
Get-Process -Name *dotnet* | Stop-Process
}
catch {
Write-Warning "Error removing the build environment: $_"
}

exit 0
46 changes: 46 additions & 0 deletions recipes/renode-cli/patches/update-cores.template_NET.csproj.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
--- a/src/Infrastructure/src/Emulator/Cores/cores.template_NET.csproj 2024-09-17 05:29:16.000000000 -0500
+++ b/src/Infrastructure/src/Emulator/Cores/cores.template_NET.csproj 2025-01-27 21:35:32.396468884 -0600
@@ -1,4 +1,2 @@
<Project DefaultTargets="Build">
- <UsingTask AssemblyFile="$(MSBuildProjectDirectory)/../../../../../lib/cctask/CCTask/bin/Release/net6.0/CCTask.dll" TaskName="EnvironmentTask" />
-
<PropertyGroup>
@@ -17,18 +15,9 @@

- <Target Name="CompileTranslationLib" DependsOnTargets="VerifyProperties">
- <!-- Due to a bug in some versions of xbuild we set default value of $(TargetWordSize) and $(TargetInsnStartExtraWords)
- before passing it to 'translate.cproj' as it is impossible to overwrite them later. -->
- <PropertyGroup>
- <TargetWordSize Condition=" $(TargetWordSize) == '' ">32</TargetWordSize>
- <TargetInsnStartExtraWords Condition=" $(TargetInsnStartExtraWords) == '' ">0</TargetInsnStartExtraWords>
- </PropertyGroup>
- <MSBuild Projects="./translate_NET.cproj" Properties="AdditionalCompilationFlags=$(AdditionalCompilationFlags);HostArchitecture=i386;HostEndianess=le;TargetEndianess=%(Endianess.Identity);TargetArchitecture=$(Architecture);EmulatedTarget=$(EmulatedTarget);Configuration=$(Configuration);TargetWordSize=$(TargetWordSize);TargetInsnStartExtraWords=$(TargetInsnStartExtraWords);CompilerPath=$(CompilerPath);LinkerPath=$(LinkerPath);ArPath=$(ArPath);CurrentPlatform=$(CurrentPlatform)">
- <Output TaskParameter="TargetOutputs" ItemName="TranslationLibraries" />
- </MSBuild>
- </Target>
-
- <Target Name="PrepareEmbeddedResources" BeforeTargets="ResolveReferences" DependsOnTargets="CompileTranslationLib">
+ <Target Name="PrepareEmbeddedResources" BeforeTargets="ResolveReferences" >
<ItemGroup>
- <EmbeddedResource Include="@(TranslationLibraries)">
- <LogicalName>Antmicro.Renode.%(Filename)%(Extension)</LogicalName>
+ <EmbeddedResource Include="..\Cores\bin\$(Configuration)\lib\translate-$(Architecture)-le.so" Condition=" '%(Endianess.Identity)' == 'le' ">
+ <LogicalName>Antmicro.Renode.translate-$(Architecture)-le.so</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\Cores\bin\$(Configuration)\lib\translate-$(Architecture)-be.so" Condition=" '%(Endianess.Identity)' == 'be' ">
+ <LogicalName>Antmicro.Renode.translate-$(Architecture)-be.so</LogicalName>
</EmbeddedResource>
@@ -36,11 +25,2 @@
</Target>
-
- <Target Name="ActualClean" DependsOnTargets="_PrepareProperties">
- <MSBuild Projects="translate_NET.cproj" Targets="Clean" />
- </Target>
-
- <!-- It is intended to have 'Clean' and 'ActualClean' targets separated.
- Thanks to this multiple calling of 'Clean' from MSBuild task will not cause
- 'ActualClean' to run more than once. -->
- <Target Name="Clean" DependsOnTargets="ActualClean" />
-</Project>
+</Project>
\ No newline at end of file
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--- a/tools/building/createAssemblyInfo.sh
+++ b/tools/building/createAssemblyInfo.sh
@@ -7 +7 @@
-CURRENT_INFORMATIONAL_VERSION="`git rev-parse --short=8 HEAD`"
+CURRENT_INFORMATIONAL_VERSION="03756cb5"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--- a/tools/building/createAssemblyInfo.ps1
+++ b/tools/building/createAssemblyInfo.ps1
@@ -4 +4 @@
-$CURRENT_INFORMATIONAL_VERSION = git rev-parse --short=8 HEAD
+$CURRENT_INFORMATIONAL_VERSION = "03756cb5"
79 changes: 79 additions & 0 deletions recipes/renode-cli/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
context:
name: renode-cli
version: "1.15.3"

package:
name: ${{ name|lower }}
version: ${{ version }}

source:
- url: https://github.com/renode/renode/releases/download/v${{ version }}/renode_${{ version }}_source.tar.xz
sha256: 40c50afe8db86a9c63f4a86b93116a6babd43bf241cfaac47b2c0d2cbc2b15a8
patches:
- patches/update-cores.template_NET.csproj.patch
- if: unix
then:
- patches/update-unix-informational-version.patch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the script this is patching still used in the build process? Usually .csproj files don't call shell scripts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do, there is an <Exec ...> into one of the .csproj that calls this, it assumes that it is a git repo and uses git ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case as this needs to be a long-term fix, I think sed replacement would be better here (we can just use a dummy revision) so that we don't need to update so many patches.

else:
- patches/update-win-informational-version.patch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my previous commend about the other information-version patch - if this Powershell script isn't being called by the build process, we don't need to patch it.


build:
number: 0

requirements:
build:
- dotnet
- nuget-license
- if: unix
then:
- sed
- bash
else:
- m2-bash
- m2-coreutils
- m2-findutils
- m2-sed
host:
- dotnet
- renode-cores ==${{ version }}
run:
- dotnet

tests:
- package_contents:
bin:
- renode
- script:
- renode --help
- LOCAL_TEST_PREFIX=./test-bundle test-bundle/bin/renode-test test-bundle/share/renode-cli/tests/unit-tests
requirements:
run:
- robotframework 6.1
- psutil 5.9.3
- python
- pyyaml 6.0
files:
source:
- test-bundle/

about:
homepage: https://github.com/renode/renode
summary: "Antmicro's open source simulation and virtual development framework for complex embedded systems"
description: |
Renode was created by Antmicro as a virtual development tool for multi-node
embedded networks (both wired and wireless) and is intended to enable a scalable
workflow for creating effective, tested and secure IoT systems.

With Renode, developing, testing, debugging and simulating unmodified software
for IoT devices is fast, cost-effective and reliable.
license: MIT
license_file:
- LICENSE
- license-files/
documentation: https://renode.io/
repository: https://github.com/renode/renode

extra:
recipe-maintainers:
- MementoRC
- danielnachun
4 changes: 4 additions & 0 deletions recipes/renode-cores/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo on
:: powershell -NoLogo -NonInteractive -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\renode_build_with_cmake.ps1"
powershell -NoLogo -NonInteractive -ExecutionPolicy Bypass -Command "& { try { . '%RECIPE_DIR%\helpers\renode_build_with_cmake.ps1'; exit $LASTEXITCODE } catch { Write-Error $_; exit 1 } }"
if %errorlevel% neq 0 exit /b %errorlevel%
Loading