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

Discussion: How to improve install process and documentation #38

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
60 changes: 27 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ Scel
SuperCollider/Emacs interface


Installation requirements
Linux Installation requirements
-------------------------

For the HTML help system, you will need emacs-w3m support.


Installation (default)
----------------------

By default emacs-lisp files are installed in

`$prefix/share/emacs/site-lisp`
Expand All @@ -33,48 +29,46 @@ For the HTML help system to fully function also add
(require 'w3m)
```


Installation (detailed)
Installation (any platform)
-----------------------

Put all `*.el` files in emacs' load-path. e.g. if you put them in
`~/emacs/`, add the following lines to `~/.emacs` (or whatever your init
file is called):
There are 2 components to install:
1. The emacs package
1. The supercollider language extensions (as a quark)

```
(add-to-list 'load-path "~/emacs")
(require 'sclang)
```
## Installing emacs package

Install as you normally would install something from melpa.

for the HTML help system to fully function also add
``` emacs-lisp
(package-install "scel")
```
(require 'w3m)

Or using straight.el
``` emacs-lisp
(package! scel :recipe (:host github :repo "supercollider/scel" :files ("el/*.el")))
```

now put all `*.sc` files in sclang's library path, e.g. if you put them
in a non-standard location, such as `~/SuperCollider/Emacs`, add the
following to `~/.config/SuperCollider/sclang_conf.yaml` (Linux) or `~/Library/Application Support/SuperCollider/sclang_conf.yaml` (macOS):
## Installing the quark

``` supercollider
Quarks.install("https://github.com/supercollider/scel");
```
includePaths:
[~/SuperCollider/Emacs]
```

(note normally this is not needed as they are put into sclang's library
path during installation with scons).
## Installing help system

For the HTML help system to fully function also add
``` emacs-lisp
(require 'w3m)
```

Usage
-----
Configuration
-----------------------

In order to automatically start sclang when invoking emacs, use the following command line:
You may need to add the path to supercollider to your exec-path so that it can find the sclang executable.

``` emacs-lisp
(setq exec-path (append exec-path '("/Applications/SuperCollider.app/Contents/MacOS/")))
```
$> emacs -sclang
```

you're now ready to edit, inspect and execute sclang code!


Getting help
------------
Expand Down
9 changes: 2 additions & 7 deletions el/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,19 @@ file(GLOB scel_sources

set(PKG_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/SuperCollider)

configure_file(sclang-vars.el.in
${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.el)

foreach (el ${scel_sources})
configure_file(${el} ${CMAKE_CURRENT_BINARY_DIR}/${el})
endforeach()

set(all_scel_sources ${scel_sources} sclang-vars.el)

install (FILES ${scel_sources} ${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.el
install (FILES ${scel_sources}
DESTINATION share/emacs/site-lisp/SuperCollider)
if (SC_EL_BYTECOMPILE)
find_program(EMACS_EXECUTABLE emacs)
if(NOT EMACS_EXECUTABLE)
message(SEND_ERROR "Emacs could not be found.\n (If emacs interface is not required, then set SC_EL=no)")
endif()

foreach (el ${all_scel_sources})
foreach (el ${scel_sources})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${el}c
COMMAND ${EMACS_EXECUTABLE} -batch
-L ${CMAKE_CURRENT_BINARY_DIR}
Expand Down
19 changes: 15 additions & 4 deletions el/sclang-help.el
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@
(require 'sclang-interp)
(require 'sclang-language)
(require 'sclang-mode)
(require 'sclang-vars)
(require 'sclang-minor-mode)

(defcustom sclang-help-directory "~/SuperCollider/Help"
"*Directory where the SuperCollider help files are kept. OBSOLETE."
(defun sclang-system-root ()
"Find the common install location for the platform."
(pcase system-type
('darwin (expand-file-name "~/Library/Application Support/SuperCollider"))
('gnu/linux (if (file-exists-p "/usr/local/share/SuperCollider")
"/usr/local/share/SuperCollider"
"/usr/share/SuperCollider"))))

(defcustom sclang-system-help-dir (expand-file-name "Help" (sclang-system-root))
"Directory where the SuperCollider system help files are kept."
:group 'sclang-interface
:version "21.3"
:type 'directory
:options '(:must-match))

Expand All @@ -41,6 +47,11 @@
:version "21.4"
:type '(repeat directory))

(defcustom sclang-system-extension-dir (expand-file-name "Extensions" (sclang-system-root))
"Installation dependent extension directory."
:group 'sclang-interface
:type 'directory)

(defconst sclang-extension-path (list sclang-system-extension-dir
"~/.local/share/SuperCollider/Extensions")
"List of SuperCollider extension directories.")
Expand Down
34 changes: 0 additions & 34 deletions el/sclang-vars.el.in

This file was deleted.

5 changes: 5 additions & 0 deletions scel.quark
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(
name: "scel",
summary: "SuperCollider/Emacs interface",
version: "1.9.9",
)