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

Cleanups and Tweaks for CMAKE #1206

Closed
4 of 12 tasks
baconpaul opened this issue Sep 22, 2019 · 11 comments · Fixed by #2142
Closed
4 of 12 tasks

Cleanups and Tweaks for CMAKE #1206

baconpaul opened this issue Sep 22, 2019 · 11 comments · Fixed by #2142
Labels
Code Refactoring General code refactoring and cleanup issues like names, unused variables, warnings, fixme Infrastructure Issues related to repository, CI/CD, installers, etc.
Milestone

Comments

@baconpaul
Copy link
Collaborator

baconpaul commented Sep 22, 2019

We have basically moved to CMAKE and this issue is just my cleanup list.

Things I want to fix

  • why don't i need the png or svg for windows in the makefile?
  • Comment the CMakeLists.txt more and properly
  • linux install steps to cmake like on mac; and strip back build-linux
  • add a build-win.something which does the whatzit rather than my crapulent powershell script. Or maybe just hack my crapulent powershell script
  • cleanup surge.exp and surge.def in home dir which isn't needed
  • move the source and lib definitions to src/CMakeLists.txt and lib/CMakeLists.txt
  • https://cmake.org/cmake/help/latest/command/configure_file.html lets me make a buildinfo.h which I can use all over the place
  • Tell the KX team and stuff
  • surgev3-dll vs Surge.vst3 on windows target
  • products in build dir and cleanup installers
  • build-linux should use cmake --build blah
  • strip -s on linux and mac

We've discussed a move to CMAKE several times. Among them, #137, #720, #761, #1143 and somewhat infamously, #1200. I figured it was best to consolidate the desire to move to CMAKE into a single ticket.

Right now we use premake5 and a collection of OS dependent scripts except for the non-installed headless asset which was our first foray into CMAKE. The subordinate surge-rack and surge-fx projects use platform-appropriate local build assets (Makefile and jucer/makefile respectively).

A move to CMAKE that was successfully executed for core surge would

  1. Build all flavors (VST2, 3, AU, LV2) on our 4 platforms (mac, win32, win64, linux) as appropriate (so no AU on win, right now LV2 is linux only (but that might change - see LV2 Build Windows and Mac #1207) etc)
  2. Support the optional VST2 for licensees and default off
  3. Support the behaviors of the build-linux and build-osx scripts such as
    1. install local or global, including assets
    2. run au validation on macOS
  4. Continue to build the headless asset all 3 platforms
  5. Generate the platform-specific files for visual studio and Xcode users
  6. integrate in both the CI and Release azure pipelines appropriately and construct the release assets we do today
  7. update the developer documentation
  8. notify the appropriate communities who maintain distro which build based on premake (we know there is one in arch, think there might be one in falktx / kx land) probably through chatting with folks in the lad IRC

I think in CMAKE some of these are easy, and some are work, but I don't know! This is not currently on my radar, but I'm happy to work with a developer who wants to do this.

@baconpaul baconpaul added Code Refactoring General code refactoring and cleanup issues like names, unused variables, warnings, fixme Infrastructure Issues related to repository, CI/CD, installers, etc. labels Sep 22, 2019
@baconpaul baconpaul added this to the Currently Unscheduled milestone Oct 4, 2019
@dvzrv
Copy link

dvzrv commented Mar 10, 2020

This would be very much appreciated, as premake 5 is an alpha release (they have been stuck in alpha since 2015) and alpha releases will not be added to Arch Linux' official repositories (which is why surge will also not be added).

In general it is of course much easier to deal with only one build system for this project :)

@baconpaul
Copy link
Collaborator Author

Yeah I think the world would be a better place if it happened indeed! It’s not anywhere near the top of my stack right now personally - there are things in the synth ui and dsp code which are priorities and I don’t really know cmake (just like I don’t really know premake that well). But I would be thrilled to work with a developer and cmake expert who wanted to take a swing at it which is why I tried to write up the complete spec above.

@dvzrv
Copy link

dvzrv commented Apr 10, 2020

@baconpaul I think a great intermediate solution would be to provide the Makefile(s) created by premake 5 in the source tarballs.
This would allow distributions to build surge with less effort (otherwise every downstream will have to track this manually, which is a lot of effort).

@baconpaul
Copy link
Collaborator Author

oh that's a good idea.

@baconpaul
Copy link
Collaborator Author

Just note to self: To do this you want to specify the tarball VM in the release pipeline so as to pin an OS, grab the premise for that OS, and then run it for all 3 operating systems so all the assets are there.

@dvzrv
Copy link

dvzrv commented Apr 10, 2020

Meanwhile I've also pinged premake to maybe cut a release soonish (premake/premake-core#1423).

@baconpaul
Copy link
Collaborator Author

Great thanks. I thumbs-upped it. And I agree that, obviously, that's the easiest solution!

@baconpaul
Copy link
Collaborator Author

After a bout of frustration with premake I started tackling this. I have the head of the code on mac building headless, vst3, and au with cmake. Will tackle the vst2 and then can turn off premake mac.

From there it is a hop skip and jump to linux

My current strategy is that I am keeping the ancillary script (build-osx) which does the install assets stuff for now, just because copying files in CMake vs a script seems roughly equivalent. So I'll move from a combination of script + premake + build to script + cmake + build

Any help you may be able to offer this week or next testing would be appreciated.

@baconpaul
Copy link
Collaborator Author

OK so have mac working. Need to fix the 10.12 thing but I will push to nightly for now.

baconpaul added a commit to baconpaul/surge that referenced this issue Apr 13, 2020
As of this commit, macOS does not use premake but instead uses CMAKE
for the builds. Will do linux and windows soon thereafter.

Addresses surge-synthesizer#1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 13, 2020
As of this commit, macOS does not use premake but instead uses CMAKE
for the builds. Will do linux and windows soon thereafter.

Addresses surge-synthesizer#1206
baconpaul added a commit that referenced this issue Apr 13, 2020
As of this commit, macOS does not use premake but instead uses CMAKE
for the builds. Will do linux and windows soon thereafter.

Addresses #1206
@baconpaul
Copy link
Collaborator Author

OK I have a branch where I can build the linux vst2 and vst3 with CMake and 0 premake. Will get the LV2 this week and will also merge it.

The only trick is going to be whether to port this to a stable release or just wait for 1.7. Depending on whether this is useful to you we can definitely discuss that once I have it working all three os.

baconpaul added a commit to baconpaul/surge that referenced this issue Apr 13, 2020
Remove the need to have premake on Linux. Some functions still
happen in build-linux.sh but the code build is all cmake.

Addresses surge-synthesizer#1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 13, 2020
Remove the need to have premake on Linux. Some functions still
happen in build-linux.sh but the code build is all cmake.

Addresses surge-synthesizer#1206
baconpaul added a commit that referenced this issue Apr 13, 2020
Remove the need to have premake on Linux. Some functions still
happen in build-linux.sh but the code build is all cmake.

Addresses #1206
@baconpaul
Copy link
Collaborator Author

Alright just merged the linux changes so now linux no longer requires premake

baconpaul added a commit to baconpaul/surge that referenced this issue Apr 14, 2020
Move windows to CMake. Confirmed this builds a VST2 and 3 which loads
in reaper (if you have VSt2 set up obviously)

Addresse surge-synthesizer#1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 14, 2020
Move windows to CMake. Confirmed this builds a VST2 and 3 which loads
in reaper (if you have VSt2 set up obviously)

Addresse surge-synthesizer#1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 14, 2020
Move windows to CMake. Confirmed this builds a VST2 and 3 which loads
in reaper (if you have VSt2 set up obviously)

Addresse surge-synthesizer#1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 14, 2020
Move windows to CMake. Confirmed this builds a VST2 and 3 which loads
in reaper (if you have VSt2 set up obviously)

Addresse surge-synthesizer#1206
baconpaul added a commit that referenced this issue Apr 14, 2020
Move windows to CMake. Confirmed this builds a VST2 and 3 which loads
in reaper (if you have VSt2 set up obviously)

Addresse #1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 14, 2020
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 14, 2020
- Fix headless
- Make "Release" the default

Addresses surge-synthesizer#1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 14, 2020
- Fix headless
- Make "Release" the default
- Kill the pointless ScalablePiggy complexity which we really don't
  need now we have skins coming

Addresses surge-synthesizer#1206
baconpaul added a commit that referenced this issue Apr 14, 2020
- Fix headless
- Make "Release" the default
- Kill the pointless ScalablePiggy complexity which we really don't
  need now we have skins coming

Addresses #1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 15, 2020
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 15, 2020
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 15, 2020
The Mac VST3 was missing an export set which stopped it loading
in the validator and cubase; but not in reaper.

Addresses surge-synthesizer#1206
baconpaul added a commit that referenced this issue Apr 15, 2020
The Mac VST3 was missing an export set which stopped it loading
in the validator and cubase; but not in reaper.

Addresses #1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 15, 2020
The re-package for VST2 isn't how VST2 quite works; and broke the
build-linux install scripts. Also the make_deb was wrong since
cmake.

Closes surge-synthesizer#1724
Addresses surge-synthesizer#1206
baconpaul added a commit that referenced this issue Apr 15, 2020
The re-package for VST2 isn't how VST2 quite works; and broke the
build-linux install scripts. Also the make_deb was wrong since
cmake.

Closes #1724
Addresses #1206
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 15, 2020
- Install and Resource for apple done via cmake. Addresses surge-synthesizer#1206
- Apple works fine with out of source build
- Make linux VST3 packaging work with out-of-tree builds. Closes surge-synthesizer#1729
- Include missing header in UserInteractionsLinux. Closes surge-synthesizer#1729
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 15, 2020
- Install and Resource for apple done via cmake. Addresses surge-synthesizer#1206
- Apple works fine with out of source build
- Make linux VST3 packaging work with out-of-tree builds. Closes surge-synthesizer#1729
- Include missing header in UserInteractionsLinux. Closes surge-synthesizer#1729
baconpaul added a commit that referenced this issue Apr 15, 2020
- Install and Resource for apple done via cmake. Addresses #1206
- Apple works fine with out of source build
- Make linux VST3 packaging work with out-of-tree builds. Closes #1729
- Include missing header in UserInteractionsLinux. Closes #1729
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 16, 2020
1. Update developer doc
2. Remove premake5.lua

Addresses surge-synthesizer#1206
@baconpaul baconpaul mentioned this issue Apr 16, 2020
baconpaul added a commit that referenced this issue Apr 16, 2020
1. Update developer doc
2. Remove premake5.lua

Addresses #1206
@baconpaul baconpaul changed the title Move to CMAKE Cleanups and Tweaks for CMAKE Apr 16, 2020
baconpaul added a commit to baconpaul/surge that referenced this issue Jun 18, 2020
1. Remove unused def/exp files
2. Make cmake version understand "release/1.7.foo" branch names

Closes surge-synthesizer#1206
baconpaul added a commit to baconpaul/surge that referenced this issue Jun 18, 2020
1. Remove unused def/exp files
2. Make cmake version understand "release/1.7.foo" branch names

Closes surge-synthesizer#1206
baconpaul added a commit that referenced this issue Jun 18, 2020
1. Remove unused def/exp files
2. Make cmake version understand "release/1.7.foo" branch names

Closes #1206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Refactoring General code refactoring and cleanup issues like names, unused variables, warnings, fixme Infrastructure Issues related to repository, CI/CD, installers, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants