saikyun / freja

Self-modifiable editor for coding graphical things
68 stars 3 forks source link

Install freja via jpm install #7

Closed saikyun closed 3 years ago

saikyun commented 3 years ago

In order to make it easier to install and use freja, it would be neat to jpm install freja and have it end up on path.

saikyun commented 3 years ago

Gettinng an error. :/

$ JANET_PATH=../janet_lib jpm build
generating executable c source...

@{:name "hello"}
@{:name "bert"}
@[(0 1 :open-paren) (5 2 :open-paren) (11 2 :close-paren) (12 1 :close-paren) (22 1 :open-paren) (35 1 :close-paren)]

found native /home/jona/programmering/freja/build/text-rendering.so...
found native ../janet_lib/jaylib.so...
error: try to marshal unregistered abstract type, cannot marshal <core/channel 0x55A3799FA3F0>
  in marshal
  in <anonymous> [/usr/local/bin/jpm] on line 738, column 20
  in do-rule [/usr/local/bin/jpm] on line 263, column 26
  in do-rule [/usr/local/bin/jpm] (tailcall) on line 259, column 44
  in _thunk [/usr/local/bin/jpm] on line -1, column -1
  in cli-main [boot.janet] on line 3422, column 39
saikyun commented 3 years ago

"Hotfix" to run freja from command-line: Put a file called "freja" somewhere on path, e.g. ~/bin/freja

#!/bin/bash
JANET_PATH=~/programmering/janet_lib FREJA_PATH=~/programmering/freja janet ~/programmering/freja/src/main.janet $1

FREJA_PATH=~/programmering/freja and ~/programmering/freja/src/main.janet should point to corresponding paths in your system, i.e. where you cloned freja.

Then run chmod u+x freja.

Now you should be able to start freja from terminal anywhere by running freja filename where filename is the file you want to open.

saikyun commented 3 years ago

Now jpm install works.