-
Notifications
You must be signed in to change notification settings - Fork 51
Refactored Bass, Bass.Enc and Bass.Midi projects to simplify cross-platform support #131
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
Conversation
…ed nuspec file for better support for ios.
1. Added support for .NET Framework 4.5 2. Bumped .NET Standard support from 1.4 to 2.0 3. Added support for .NET 8+
…ed download instructions. Added note on iOS static linking requirement.
…ss platform concerns into a single project. iOS-specific code has been moved into a PlatformSpecific/iOS folder within those projects. iOS-specific builds are now created by specifying the 'iOS' platform at build time. Also added new '__STATIC_LINKING__' constant to enable specific build for iOS < v8.0 where static linking is still required.
…migrated package metadata into respective `.csproj` files. Updated build pipeline to eliminate custom `.nuspec` packaging and streamline multi-target framework builds.
…sion fallback if not present in pipeline.
# Conflicts: # README.md # src/AddOns/BassAac/BassAac.csproj # src/AddOns/BassEnc/Desktop/Desktop.csproj # src/AddOns/BassEnc/ManagedBass.Enc.nuspec # src/AddOns/BassEnc/Portable/BassEnc.csproj # src/AddOns/BassEnc/iOS/iOS.csproj # src/AddOns/BassMidi/Desktop/Desktop.csproj # src/AddOns/BassMidi/ManagedBass.Midi.nuspec # src/AddOns/BassMidi/Portable/BassMidi.csproj # src/AddOns/BassMidi/iOS/iOS.csproj # src/Bass/Desktop/Desktop.csproj # src/Bass/ManagedBass.nuspec # src/Bass/Portable/Bass.csproj # src/Bass/Portable/BassMarshal.cs # src/Bass/Portable/ChannelReferences.cs # src/Bass/Portable/CrossPlatformHelper.cs # src/Bass/Shared/Shared.projitems # src/Bass/Shared/Shared.shproj # src/Bass/iOS/iOS.csproj
…sMarshal methods. Adjusted `PtrToStructure` and `SizeOf` implementations for framework-specific differences in `Marshal` APIs.
…ing a unified `object` parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the Bass, Bass.Enc and Bass.Midi projects to eliminate the need for dedicated iOS and Windows builds, consolidating from 12 separate projects to 3. The primary change replaces platform-specific static linking (__Internal) with conditional defines that allow runtime platform detection, simplifying the solution structure while maintaining iOS compatibility through dynamic linking available since iOS 8.0.
- Replaced platform-specific builds with conditional compilation using
__STATIC_LINKING__instead of__IOS__ - Consolidated multiple shared projects and iOS/Desktop variants into single portable projects
- Updated project configurations to support both AnyCPU and iOS platforms
Reviewed Changes
Copilot reviewed 65 out of 200 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ManagedBass.sln | Removed complex multi-project structure, added iOS platform configuration |
| Bass/Portable/Bass.csproj | Consolidated main Bass project with iOS platform support |
| AddOns/Bass*/Portable/*.csproj | Updated addon projects with unified configuration and iOS platform support |
| Various PInvoke/*.cs | Changed DLL import conditionals from __IOS__ to __STATIC_LINKING__ |
| README.md | Updated documentation to reflect iOS support changes and added comprehensive addon platform matrix |
Comments suppressed due to low confidence (2)
.github/workflows/package-and-release.yml:1
- The workflow is configured to run on the
multitarget-fixesbranch, which appears to be a development/feature branch rather than a production branch. This should likely be updated to trigger on main/master or removed for production deployment.
name: Build and Package for Release
.github/workflows/package-and-release.yml:1
- The condition
if: github.event_name == 'release'was removed from the job level but only added to the "Push to NuGet Feed" step. This means the build-and-deploy job will now run on every push to the multitarget-fixes branch, potentially creating unnecessary artifacts. The condition should be restored at the job level or the branch trigger should be removed.
name: Build and Package for Release
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
After review, it seems there is no longer a need for this library to compile dedicated iOS and Windows (Desktop) versions of this library.
The primary reason for compiling a dedicated iOS version was to swap out the [DllImport] attribute targets with
__Internalto support static linking of the native bass libraries. Since dynamic linking has been supported now since iOS 8.0 (2014), it seems unnecessary to continue supporting this requirement. Radio42 have followed suit with their Bass.NET wrapper, and now only target .NET Standard 2.0 and .NET 6, with no platform-specific builds.This PR simplified the Bass, Bass.Enc and Bass.Midi projects, which were each comprised of 4 projects (12 in total!), catering for various platform specific concerns.
All iOS and Windows-specific features are now simply compiled in a single package. It's up to you to determine which platform you're on, and which methods are appropriate - rather than us simply hiding them from you.
This simplifies and modernises the solution structure.