Skip to content

Import open.mp x64 SampSharp code from openmp-sampsharp-x64-poc#457

Merged
ikkentim merged 8 commits into
masterfrom
copilot/import-openmp-sampsharp-code
Apr 30, 2026
Merged

Import open.mp x64 SampSharp code from openmp-sampsharp-x64-poc#457
ikkentim merged 8 commits into
masterfrom
copilot/import-openmp-sampsharp-code

Conversation

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor
  • Merge .gitignore from both repos
  • Remove root CMakeLists.txt
  • Rename Directory.Build.props (uppercase B) and update SampSharp.sln reference
  • Update src/sampsharp-component/build.cmd and build.sh to follow legacy script patterns
  • Fix ROOTDIR path calculation in all four component scripts (build.cmd, build.sh, publish.cmd, publish.sh) — 2 levels up, not 3
  • Add src/sampsharp-component/publish.cmd and publish.sh
  • Update root build.cmd and build.sh to implement component and component-libraries targets
  • Rename "component x64 plugin" → "open.mp component" in all build script log lines (including usage sections)
  • Rename "component C# libraries" → "C# libraries" in root build script log lines (including usage sections)
  • Update CI workflows: component-linux.yml, component-win64.yml (renamed from component-win.yml), dotnet-component.yml (renamed from dotnet.yml)
  • Update dotnet-component.yml to use .NET 10
  • Implement release.yml modeled after release-legacy.yml
  • Update release.yml to use .NET 10

Copilot AI linked an issue Apr 30, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Import open.mp x64 SampSharp code Import open.mp x64 SampSharp code from openmp-sampsharp-x64-poc Apr 30, 2026
Copilot AI requested a review from ikkentim April 30, 2026 14:07
@ikkentim

Copy link
Copy Markdown
Owner

@copilot instead of copying over the .gitignore, lets instead merge the two.

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

@copilot instead of copying over the .gitignore, lets instead merge the two.

Done in d781313. The merged .gitignore keeps the case-insensitive globs ([Bb]in/, [Oo]bj/) and new entries (build_*/, publish/, launchSettings.json) from the open.mp repo, while preserving entries from the original (.idea/, *.suo, *.sln.DotSettings.user, PublishProfiles/, OS files, temp files).

@ikkentim ikkentim left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

some points from the GH issue have not been addressed.

Comment thread CMakeLists.txt Outdated
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.19)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

dont have this file in the repo root; we build directly the src/sampsharp-component subdir.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in 033597a. The root CMakeLists.txt is gone; the component is built directly via src/sampsharp-component/build.cmd / build.sh.

Comment thread Directory.Build.props
@@ -0,0 +1,91 @@
<Project>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Rename to Directory.Build.props to match MSBuild docs. (upper case B)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed to Directory.Build.props in 033597a, and updated the SampSharp.sln reference to match.

Comment thread src/sampsharp-component/build.cmd Outdated
@@ -0,0 +1,2 @@
cmake -S . -B build -A x64 -T ClangCL -DCMAKE_POLICY_VERSION_MINIMUM=3.5

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

update both build scripts (win/linux) to more closely match the patterns of src/legacy/sampsharp build scripts; it should build like that one to /build; and have publish option to produce artifacts.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

also, update the build scripts in to repo root for both the component build and the dotnet build. the scripts in repo root have stubs that need to be implemented (search 'build not yet implemented')

also, update the build and publish workflows, as mentioned in the issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 033597a:

  • src/sampsharp-component/build.cmd and build.sh now follow the legacy patterns (SRCDIR/ROOTDIR/BUILDDIR structure, builds to build/cmake/component/artifacts)
  • Added src/sampsharp-component/publish.cmd and publish.sh (mirrors legacy publish scripts, copies artifacts to build/artifacts/sampsharp-component/)
  • Root build.cmd/build.sh: component and component-libraries stubs are fully implemented (delegating to the component scripts)
  • Workflows component-linux.yml, component-win.yml, and dotnet.yml are updated with real build steps, taking inspiration from the legacy workflows

@ikkentim

Copy link
Copy Markdown
Owner

@copilot ptal

…ory.Build.props, update build scripts and workflows

Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/8b4fc46e-cbf2-47bf-a25f-d5daa919edf9

Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

some points from the GH issue have not been addressed.

Addressed in 033597a: hooked up the component build scripts (root build.cmd/build.sh component and component-libraries targets now delegate to src/sampsharp-component/), and updated all three placeholder workflows (component-linux.yml, component-win.yml, dotnet.yml) with real build/publish steps.

Copilot AI requested a review from ikkentim April 30, 2026 14:23
Comment thread build.cmd Outdated
echo Component x64 plugin build not yet implemented.
goto end
if "%ACTION%"=="" (
echo Building component x64 plugin...

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

in the build scripts log lines (both win/linux) call this the 'open.mp component' instead of 'component x64 plugin'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 30d96bf — all "component x64 plugin" log lines in the root and component build scripts now say "open.mp component".

Comment thread build.cmd Outdated
echo Component C# libraries not yet implemented.
goto end
if "%ACTION%"=="" (
echo Building component C# libraries...

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

in the build scripts log lines (both win/linux) call this the 'C# libraries' instead of 'component C# libraries

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 30d96bf — "component C# libraries" is now just "C# libraries" in both root build scripts.


# TODO: Update this workflow when new SampSharp code is in src/sampsharp/
# For now, this is a placeholder.
name: CI - Component Libraries

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

release.yml workflow also needs to be written. can also be much like the release-legacy.yml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 30d96bfrelease.yml is now fully implemented following the same pattern as release-legacy.yml: parallel Windows/Linux component builds, a release job that downloads both artifacts and packages them into a zip, creates a GitHub release, then packs and publishes NuGet packages.

Copilot AI requested a review from ikkentim April 30, 2026 14:37
Comment thread .github/workflows/release.yml Outdated
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

dotnet 10 is used

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to 10.0.x in 4305294.

Comment thread build.cmd Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

You forgot to also update the naming in the usage section of the scripts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 4305294 — the usage sections in both build.cmd and build.sh now use "open.mp component" and "C# libraries".

Comment thread .github/workflows/dotnet.yml Outdated
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

need .net 10

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to 10.0.x in 4305294.

Copilot AI requested a review from ikkentim April 30, 2026 14:48

@ikkentim ikkentim left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

open.mp component build fails on windows

Run .\build.cmd component publish
Building and publishing open.mp component...
Building open.mp component...
Root: D:\a\SampSharp
Build: D:\a\SampSharp\build\cmake\component

CMake Error: The source directory "D:/a/SampSharp/src/sampsharp-component" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

also, rename the new workflows to match the legacy workflows and the names used in build.cmd

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

open.mp component build fails on windows

Run .\build.cmd component publish...

Fixed in 7a448cd:

  • Build failure: src/sampsharp-component/build.cmd and build.sh were going 3 levels up (../../..) to find the repo root, but src/sampsharp-component/ is only 2 levels deep — changed to ../...
  • Workflow renaming: dotnet.ymldotnet-component.yml (matching dotnet-legacy.yml), component-win.ymlcomponent-win64.yml (matching plugin-legacy-win32.yml architecture convention).

@copilot ptal

All open items are addressed. Latest commit is 7a448cd.

Copilot AI requested a review from ikkentim April 30, 2026 15:07

@ikkentim ikkentim left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Linux workflow fails for component

Error: SampSharp.so or SampSharp.dll not found at /home/runner/work/SampSharp/build/cmake/component/artifacts

the build result is probably called sampsharp-component.(dll/so) or something? take a look at cmake files and find out fix

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

Linux workflow fails for component

Error: SampSharp.so or SampSharp.dll not found at /home/runner/work/SampSharp/build/cmake/component/artifacts...

The CMake target produces SampSharp.so / SampSharp.dll (correct names), but publish.sh and publish.cmd had the same 3-levels-up bug as build.sh — causing ROOTDIR to point one level above the repo, so the build artifacts were never found. Fixed in 99ef8ab (changed ../../..../.. in both scripts).

Copilot AI requested a review from ikkentim April 30, 2026 15:21
@ikkentim ikkentim marked this pull request as ready for review April 30, 2026 15:35
@ikkentim ikkentim merged commit d654e55 into master Apr 30, 2026
6 checks passed
@ikkentim ikkentim deleted the copilot/import-openmp-sampsharp-code branch April 30, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import open.mp x64 SampSharp code

2 participants