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

erbb setup: install Max package #579

Merged
merged 1 commit into from
Jun 24, 2023
Merged

Conversation

eliottparis
Copy link
Collaborator

@eliottparis eliottparis commented Jun 19, 2023

This PR adds a --with-max-support option to erbb setup that installs the Eurorack-block Max package on macOS and Windows.

The package will only be installed if the path to the Max 8/packages exists, and thus Max is installed, on the target machine.
The installed package will be a symlink on macOS or a junction on Windows, linking to the cloned repository's max/Eurorack-blocks folder.

@eliottparis eliottparis added the enhancement New feature or request label Jun 19, 2023
@eliottparis eliottparis self-assigned this Jun 19, 2023
Copy link
Owner

@ohmtech-rdi ohmtech-rdi left a comment

Choose a reason for hiding this comment

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

Great work 👍

In general, we keep silent to avoid noise during installation.
Also, there is this new concept of making external install explicit as a flag for erbb setup (maybe --with-max-support), but we'll do this later.

@eliottparis eliottparis force-pushed the setup-install-max-package branch from 25f7c70 to 2aac596 Compare June 19, 2023 14:39
@eliottparis eliottparis requested a review from ohmtech-rdi June 19, 2023 14:40
@ohmtech-rdi
Copy link
Owner

@OmsInSerial could you please give a try to this branch?

@OmsInSerial
Copy link

xxxxx@xxxxx MINGW64 ~/eurorack-blocks (setup-install-max-package)
$ git status
On branch setup-install-max-package
Your branch is up to date with 'origin/setup-install-max-package'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        samples/VCV/
        samples/test/

nothing added to commit but untracked files present (use "git add" to track)

xxxxx@xxxxx MINGW64 ~/eurorack-blocks (setup-install-max-package)
$ erbb setup
Extracting msys2_mingw64.zip...
Extracting kicad_minimal_windows_6.0.11-0.tar.gz...
Extracting gcc-arm-none-eabi-10.3-2021.10-win32.zip...
Installing python packages...
Optimizing erbb...
Checking toolchain...
OK.

xxxxx@xxxxx MINGW64 ~/eurorack-blocks (setup-install-max-package)
$ git submodule update --init --recursive

Link to the eurorack-blocks is not created in Max packages, I have to do it manually :

xxxxx@xxxxx MINGW64 ~/OneDrive/Documents/Max 8/Packages
$ ln -s ~/eurorack-blocks/max/Eurorack-blocks/

Then saving in Max :

node.script: artifacts already exists, skipping.
gen~: exported: C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/module_max.cpp
node.script: Build starting
node.script: module: /Users/xxxxx/eurorack-blocks/samples/test/
node.script: Configuring...
node.script: child process exited with code 0
node.script: Building...
node.script: mingw32-make: Entering directory 'C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/simulator'
node.script: ACTION Max
node.script: ACTION UI
node.script: ACTION VCV Rack
node.script: COPY include/erb/vcvrack/resource/rogan.6ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.5ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.3ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.2ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.2s.black.svg
node.script: COPY include/erb/vcvrack/resource/rogan.1ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.1s.black.svg
node.script: COPY include/erb/vcvrack/resource/rogan.1s.svg
node.script: COPY include/erb/vcvrack/resource/sifam.dbn151.white.svg
node.script: COPY include/erb/vcvrack/resource/sifam.drn111.white.svg
node.script: COPY include/erb/vcvrack/resource/songhuei.9mm.svg
node.script: COPY include/erb/vcvrack/resource/thonk.pj398sm.knurled.svg
node.script: COPY include/erb/vcvrack/resource/thonk.pj398sm.hex.svg
node.script: COPY include/erb/vcvrack/resource/dailywell.2ms.1.svg
node.script: COPY include/erb/vcvrack/resource/dailywell.2ms.2.svg
node.script: COPY include/erb/vcvrack/resource/dailywell.2ms.3.svg
node.script: CXX src/Button.cpp
node.script: CXX src/GateOut.cpp
node.script: CXX src/detail/Animation.cpp
node.script: CXX src/detail/Debounce.cpp
node.script: CXX src/detail/Sdram.cpp
node.script: CXX src/detail/Sram.cpp
node.script: CXX src/vcvrack/BoardGeneric.cpp
node.script: CXX src/vcvrack/ModuleBoard.cpp
node.script: CXX include/gen_dsp/genlib.cpp
node.script: CXX plugin_vcvrack.cpp
node.script: CXX test_erbb.cpp
node.script: CXX test_erbui.cpp
node.script: CXX module_max_alt.cpp
node.script: LINK plugin.dll
node.script: PACKAGE Release test
node.script: INSTALL C:Usersxxxxx/Documents/Rack2/plugins/test/ 
node.script: mingw32-make: Leaving directory 'C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/simulator'
node.script: child process exited with code 0

Also note that the path is not well fomated in

node.script: INSTALL C:Usersxxxxx/Documents/Rack2/plugins/test/  **<-- here / is missing in Users/xxxxx/...** 

Thanks

@ohmtech-rdi
Copy link
Owner

ohmtech-rdi commented Jun 20, 2023

Ah ok, packages are on OneDrive, so maybe we should support that.

Apart from that, seems it's working @OmsInSerial ?
For C:Usersxxxxx/Documents/Rack2/plugins/test/ that's because make doesn't escape properly \ when echoing the install path.

Also, any idea on why this import gyp problem is solved now?

@OmsInSerial
Copy link

@ohmtech-rdi yes it's working now thanks to the added link.
Absolute no idea about the import gyp issue. If I remember correctly max/node.script worked in a weird directory in Issue when saving max patch under Windows #561 :

node.script: Error: python3: can't open file 'C:\\Users\\xxxxx\\OneDrive\\Documents\\Max 8\\build-system\\scripts\\erbb': [Errno 2] No such file or directory

Don't know why, but it seems that the path is now pointing to C:\Users\xxxxx\eurorack-blocks\build-system.

@ohmtech-rdi ohmtech-rdi force-pushed the setup-install-max-package branch 2 times, most recently from ee0fcd4 to 19c8dac Compare June 22, 2023 21:47
@eliottparis eliottparis force-pushed the setup-install-max-package branch 2 times, most recently from 1c29216 to 2eb4117 Compare June 23, 2023 13:16
@eliottparis
Copy link
Collaborator Author

@ohmtech-rdi The --with-max-support has been added.
@OmsInSerial Support for custom Documents paths such as OneDrive on Windows has been added.

@eliottparis eliottparis force-pushed the setup-install-max-package branch from 2eb4117 to 182c242 Compare June 23, 2023 14:42
@ohmtech-rdi
Copy link
Owner

ohmtech-rdi commented Jun 23, 2023

Problem on CI: most probably an outage of Launchpad. Weird that it is affecting only Ubuntu 22 though. Let's wait for now.

@eliottparis
Copy link
Collaborator Author

@OmsInSerial could you please give a last try to this branch?

@ohmtech-rdi ohmtech-rdi force-pushed the setup-install-max-package branch from 182c242 to 8bf3e31 Compare June 23, 2023 21:50
@OmsInSerial
Copy link

OmsInSerial commented Jun 24, 2023

@eliottparis as requested, I gave it a try on setup-install-max-package branch

Link to Eurorack-blocks deleted in C:\Users\xxxxx\OneDrive\Documents\Max 8\Packages

MaxPackages

xxxxx@xxxxx MINGW64 ~/eurorack-blocks  (main)
$ git switch setup-install-max-package
xxxxx@xxxxx MINGW64 ~/eurorack-blocks (setup-install-max-package)
$ git pull
Already up to date.
xxxxx@xxxxx MINGW64 ~/eurorack-blocks (setup-install-max-package)
$ erbb setup --with-max-support
Extracting msys2_mingw64.zip...
Extracting kicad_minimal_windows_6.0.11-0.tar.gz...
Extracting gcc-arm-none-eabi-10.3-2021.10-win32.zip...
Adding Max support...
Installing python packages...
Adding Max support...
Optimizing erbb...
Checking toolchain...
OK.

Link to Eurorack-blocks created in C:\Users\xxxxx\OneDrive\Documents\Max 8\Packages

MaxPackages2

Saving a test patch in Max :

node.script: artifacts already exists, skipping.
gen~: exported: C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/module_max.cpp
node.script: Build starting
node.script: module: /Users/xxxxx/eurorack-blocks/samples/test/
node.script: Configuring...
node.script: child process exited with code 0
node.script: Building...
node.script: mingw32-make: Entering directory 'C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/simulator'
node.script: ACTION Max
node.script: ACTION UI
node.script: ACTION VCV Rack
node.script: COPY include/erb/vcvrack/resource/rogan.6ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.5ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.3ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.2ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.2s.black.svg
node.script: COPY include/erb/vcvrack/resource/rogan.1ps.svg
node.script: COPY include/erb/vcvrack/resource/rogan.1s.black.svg
node.script: COPY include/erb/vcvrack/resource/rogan.1s.svg
node.script: COPY include/erb/vcvrack/resource/sifam.dbn151.white.svg
node.script: COPY include/erb/vcvrack/resource/sifam.drn111.white.svg
node.script: COPY include/erb/vcvrack/resource/songhuei.9mm.svg
node.script: COPY include/erb/vcvrack/resource/thonk.pj398sm.knurled.svg
node.script: COPY include/erb/vcvrack/resource/thonk.pj398sm.hex.svg
node.script: COPY include/erb/vcvrack/resource/dailywell.2ms.1.svg
node.script: COPY include/erb/vcvrack/resource/dailywell.2ms.2.svg
node.script: COPY include/erb/vcvrack/resource/dailywell.2ms.3.svg
node.script: CXX src/Button.cpp
node.script: CXX src/GateOut.cpp
node.script: CXX src/detail/Animation.cpp
node.script: CXX src/detail/Debounce.cpp
node.script: CXX src/detail/Sdram.cpp
node.script: CXX src/detail/Sram.cpp
node.script: CXX src/vcvrack/BoardGeneric.cpp
node.script: CXX src/vcvrack/ModuleBoard.cpp
node.script: CXX include/gen_dsp/genlib.cpp
node.script: CXX plugin_vcvrack.cpp
node.script: CXX test_erbb.cpp
node.script: CXX test_erbui.cpp
node.script: CXX module_max_alt.cpp
node.script: LINK plugin.dll
node.script: PACKAGE Release test
node.script: INSTALL C:Usersxxxxx/Documents/Rack2/plugins/test/
node.script: mingw32-make: Leaving directory 'C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/simulator'
node.script: child process exited with code 0

👍

@ohmtech-rdi
Copy link
Owner

Funny that the line Adding Max support... appeared twice, but I guess that was some sort of console glitch somehow. Checked the code, and I don't possibly see how this can happen.
Anyway that wouldn't even be a big problem so I'm merging this now.

@ohmtech-rdi ohmtech-rdi merged commit 7bcdb71 into main Jun 24, 2023
@ohmtech-rdi ohmtech-rdi deleted the setup-install-max-package branch June 24, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants