-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from simonvanderveldt/install-norns-in-system-…
…location Install norns in system location
- Loading branch information
Showing
8 changed files
with
137 additions
and
32 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
board/norns/rootfs-overlay/etc/profile.d/10-default-env-vars.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export JACK_NO_START_SERVER=1 | ||
export JACK_NO_AUDIO_RESERVATION=1 | ||
export NORNS_CONFIG="/usr/share/norns/lua/core/config.lua" |
2 changes: 1 addition & 1 deletion
2
board/norns/rootfs-overlay/etc/systemd/system.conf.d/10-default-env-vars.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[Manager] | ||
DefaultEnvironment="JACK_NO_START_SERVER=1" | ||
DefaultEnvironment=JACK_NO_START_SERVER=1 NORNS_CONFIG=/usr/share/norns/lua/core/config.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Locally computed: | ||
sha512 e73697bbf3f66302c3f33e72162de41e76aef24f41500f30949ff85621350cdc47868b414e7f359645cdb9244caa1dec129ba8c4798c6f7026f359b8b5ae150d dust-c10c62c24e88d1dc10c5eb3ed77f5b9b451fbe6c.tar.gz | ||
sha512 f23fc37b8c6a40be226d5a587851dc8217db4484b082fe352e5c794d4a30357ef4ec64b37147811d4fd19c96f7d5f0e38accbabe505e775722029f57c5af60a0 norns-2.0.1-dust.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
includePaths: | ||
- ~/dust | ||
excludePaths: | ||
[] | ||
postInlineWarnings: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
package/norns/sc-wscript-install-sc-files-to-system-wide-sc-extension-dir.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 7a7e116b84b2a6aaeeb28098f6f90f89e54f187a Mon Sep 17 00:00:00 2001 | ||
From: Simon van der Veldt <[email protected]> | ||
Date: Sun, 19 May 2019 22:21:52 +0200 | ||
Subject: [PATCH] sc/wscript: Install SC files to system-wide Supercollider | ||
extension directory | ||
|
||
--- | ||
sc/wscript | 10 +++++++++- | ||
1 file changed, 9 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/sc/wscript b/sc/wscript | ||
index fe18b0e..9534ba5 100644 | ||
--- a/sc/wscript | ||
+++ b/sc/wscript | ||
@@ -1,4 +1,8 @@ | ||
-top = '..' | ||
+def set_options(opt): | ||
+ pass | ||
+ | ||
+def configure(conf): | ||
+ pass | ||
|
||
def build_ugen(bld, target, source): | ||
ugen = bld.shlib(features='c cxx', | ||
@@ -34,3 +38,7 @@ def build(bld): | ||
for u in ugens: | ||
build_ugen(bld, u['target'], u['source']) | ||
build_ugen_supernova(bld, u['target'], u['source']) | ||
+ | ||
+ # Install SC files | ||
+ bld.install_files('${PREFIX}/share/SuperCollider/Extensions/norns', bld.path.ant_glob('core/**/*'), relative_trick=True) | ||
+ bld.install_files('${PREFIX}/share/SuperCollider/Extensions/norns', bld.path.ant_glob('engines/**/*'), relative_trick=True) | ||
-- | ||
2.21.0 |
89 changes: 89 additions & 0 deletions
89
package/norns/wscript-install-resources-in-system-location.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
From da328593c1aa599429f6de29f9b7f01143dbde5d Mon Sep 17 00:00:00 2001 | ||
From: Simon van der Veldt <[email protected]> | ||
Date: Fri, 31 May 2019 23:24:19 +0200 | ||
Subject: [PATCH] wscript: Install resources in system location | ||
|
||
--- | ||
lua/core/config.lua | 5 +++-- | ||
matron/src/hardware/screen.c | 9 ++++----- | ||
wscript | 6 +++++- | ||
3 files changed, 12 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/lua/core/config.lua b/lua/core/config.lua | ||
index fc6b9d3..86458ae 100644 | ||
--- a/lua/core/config.lua | ||
+++ b/lua/core/config.lua | ||
@@ -3,13 +3,14 @@ | ||
-- add some stuff to package.path | ||
-- this consists of search patterns lua will use for require('foo') | ||
|
||
-local home = os.getenv('HOME') | ||
-local norns = home..'/norns/lua' | ||
+local norns = '/usr/share/norns/lua' | ||
local sys = norns..'/?.lua;' | ||
local core = norns..'/core/?.lua;' | ||
local params = norns..'/core/params/?.lua;' | ||
local lib = norns..'/lib/?.lua;' | ||
local softcut = norns..'/softcut/?.lua;' | ||
+ | ||
+local home = os.getenv('HOME') | ||
local dust = home..'/dust/code/?.lua;' | ||
|
||
package.path = sys..core..params..lib..softcut..dust..package.path | ||
diff --git a/matron/src/hardware/screen.c b/matron/src/hardware/screen.c | ||
index 7bf3ac4..b9d796a 100644 | ||
--- a/matron/src/hardware/screen.c | ||
+++ b/matron/src/hardware/screen.c | ||
@@ -139,10 +139,10 @@ handle_allocate_error: | ||
void screen_display_png(const char *filename, double x, double y){ | ||
int img_w, img_h; | ||
//fprintf(stderr, "loading: %s\n", filename); | ||
- | ||
+ | ||
image = cairo_image_surface_create_from_png (filename); | ||
if(image == NULL) { return; } | ||
- | ||
+ | ||
img_w = cairo_image_surface_get_width (image); | ||
img_h = cairo_image_surface_get_height (image); | ||
|
||
@@ -246,13 +246,12 @@ void screen_init(void) { | ||
for (int i=0; i<NUM_FONTS; ++i) { | ||
fprintf(stderr, " %d: %s\n", i, font_path[i]); | ||
} | ||
- | ||
+ | ||
char filename[256]; | ||
|
||
for(int i = 0; i < NUM_FONTS; i++) { | ||
// FIXME should be path relative to norns/ | ||
- snprintf(filename, 256, "%s/norns/resources/%s", getenv( | ||
- "HOME"), font_path[i]); | ||
+ snprintf(filename, 256, "/usr/share/norns/resources/%s", font_path[i]); | ||
|
||
status = FT_New_Face(value, filename, 0, &face[i]); | ||
if(status != 0) { | ||
diff --git a/wscript b/wscript | ||
index 6b928f5..81e466b 100644 | ||
--- a/wscript | ||
+++ b/wscript | ||
@@ -36,7 +36,7 @@ def configure(conf): | ||
conf.check_cfg(package='lua53', args=['--cflags', '--libs']) | ||
conf.check_cfg(package='nanomsg', args=['--cflags', '--libs']) | ||
conf.check_cfg(package='avahi-compat-libdns_sd', args=['--cflags', '--libs']) | ||
- conf.check_cfg(package='sndfile', args=['--cflags', '--libs']) | ||
+ conf.check_cfg(package='sndfile', args=['--cflags', '--libs']) | ||
|
||
conf.check_cc(msg='Checking for libmonome', | ||
define_name='HAVE_LIBMONOME', | ||
@@ -66,3 +66,7 @@ def build(bld): | ||
bld.recurse('ws-wrapper') | ||
bld.recurse('sc') | ||
bld.recurse('crone') | ||
+ | ||
+ # Install resources | ||
+ bld.install_files('${PREFIX}/share/norns', bld.path.ant_glob('resources/**/*'), relative_trick=True) | ||
+ bld.install_files('${PREFIX}/share/norns', bld.path.ant_glob('lua/**/*'), relative_trick=True) | ||
-- | ||
2.21.0 | ||
|