greynewell / musegpt

Local LLMs in your DAW!
https://musegpt.org/
GNU Affero General Public License v3.0
28 stars 1 forks source link

Add fixes for Windows build, closes #9 #20

Closed greynewell closed 3 days ago

greynewell commented 3 days ago

Summary by Sourcery

Fix cross-platform compatibility by introducing EXE_SUFFIX to manage executable suffixes, particularly addressing issues on Windows platforms.

Bug Fixes:

sourcery-ai[bot] commented 3 days ago

Reviewer's Guide by Sourcery

This pull request introduces cross-platform compatibility for the llama-server executable by adding an EXE_SUFFIX variable and modifying the CMake configuration to handle Windows and non-Windows platforms differently. The changes ensure that the correct file extension is used for the llama-server executable on different operating systems and that it's copied to the appropriate locations in the build process.

File-Level Changes

Change Details Files
Introduce EXE_SUFFIX variable for cross-platform compatibility
  • Define EXE_SUFFIX as an empty string by default
  • Set EXE_SUFFIX to '.exe' for Windows platforms
  • Update all references to llama-server to include EXE_SUFFIX
CMakeLists.txt
Modify custom commands and targets to use EXE_SUFFIX
  • Update add_custom_command for copying llama-server to use EXE_SUFFIX
  • Update add_custom_target for copy_llama_server to use EXE_SUFFIX
  • Update set_source_files_properties and target_sources to use EXE_SUFFIX
CMakeLists.txt
Implement platform-specific resource copying
  • Add conditional block for Windows-specific copying of llama-server
  • Modify existing copy commands for macOS and Linux to use EXE_SUFFIX
  • Remove redundant copy commands for VST and Standalone formats on non-Windows platforms
CMakeLists.txt

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.