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

Allow installation via package managers #39

Merged
merged 17 commits into from
Sep 4, 2021
Merged
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
31 changes: 25 additions & 6 deletions el/sclang-help.el
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,29 @@
(require 'sclang-interp)
(require 'sclang-language)
(require 'sclang-mode)
(require 'sclang-vars)
(require 'sclang-vars nil 'ignore-missing-file)
dyfer marked this conversation as resolved.
Show resolved Hide resolved
(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."
(cond
((boundp 'sclang-system-data-dir)
sclang-system-data-dir)

((eql 'darwin system-type)
(expand-file-name "~/Library/Application Support/SuperCollider"))

((and (eql 'gnu/linux system-type)
(file-exists-p "/usr/local/share/SuperCollider"))
"/usr/local/share/SuperCollider")

((eql 'gnu/linux system-type)
"/usr/share/SuperCollider")))
dyfer marked this conversation as resolved.
Show resolved Hide resolved

(defcustom sclang-system-help-dir (expand-file-name "Help" (sclang-system-root))
"Installation dependent help directory."
:group 'sclang-interface
:version "21.3"
:type 'directory
:options '(:must-match))
:type 'directory)

(defcustom sclang-help-path (list sclang-system-help-dir
"~/.local/share/SuperCollider/Help")
dyfer marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -41,6 +55,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
20 changes: 12 additions & 8 deletions el/sclang-vars.el.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,23 @@

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Commentary:
;;
;; This file is included in the distribution in order to convey system
;; installation variables which are known at compile time, but only when
;; the library is installed with cmake along with SuperCollider source.
;;
;; When using the stand-alone package, this file can be ignored and
;; the constants it defines will have no effect.

;;; Code:

(defconst sclang-system-data-dir "@PKG_DATA_DIR@"
"Installation dependent data directory.")

(defconst sclang-system-help-dir "@PKG_DATA_DIR@/Help"
"Installation dependent help directory.")

(defconst sclang-system-extension-dir "@PKG_DATA_DIR@/Extensions"
"Installation dependent extension directory.")
"Installation dependent data directory.
Bound only when library is installed with SuperCollider.")

(provide 'sclang-vars)
;;; sclang-vars.el ends here
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.0.0",
)