GithubHelp home page GithubHelp logo

evilbinary / scheme-lib Goto Github PK

View Code? Open in Web Editor NEW
469.0 34.0 48.0 79.52 MB

鸭库 duck lib scheme for gui gles gl slib openal socket web mongodb box2d game glfw mysql libevent libuv uv json http client server android osx linux chezscheme scheme-lib

Home Page: https://evilbinary.github.io/scheme-lib/

License: MIT License

Makefile 0.58% C++ 10.39% C 24.22% Scheme 64.19% Shell 0.11% Lex 0.01% PostScript 0.16% Roff 0.01% NSIS 0.23% CSS 0.01% JavaScript 0.02% HTML 0.01% Python 0.04% Batchfile 0.01% M4 0.04%
scheme-lib android lisp scheme library gui chezscheme cl ui

scheme-lib's Introduction

scheme-lib

鸭库 scheme-lib 是一个scheme使用的库。目前支持android osx linux windows,其它平台在规划中。

官方主页:https://evilbinary.github.io/scheme-lib/ QQ群:Lisp兴趣小组239401374

安装编译

Linux

  1. 执行:
sudo apt-get install build-essential freeglut3-dev libgles2-mesa-dev libegl1-mesa-dev libalut-dev libopenal-dev libffi-dev uuid-dev liblz4-dev
libtinfo5 libtinfo-dev libalut-dev libgles2-mesa-dev
# 命令安装依赖库。如果需要视频支持请加上: libavcodec-dev libavformat-dev libswscale-dev
  1. 执行make命令就可以编译,对应平台的文件在bin目录下。
  2. 进入bin目录,执行source env.sh,然后运行./scheme --script ../apps/hello.ss就可以运行例子。

Mac OS X

  1. 安装XCode Command Line Tool或XCode
  2. brew或者port安装glfw ffmpeg开发库。
  3. 执行make命令就可以编译,对应平台的文件在bin目录下。
  4. 进入bin目录,执行source env.sh,然后运行./scheme --script ../apps/hello.ss就可以运行例子。

Windows

  1. 下载已经去除了,因为有人说抱怨运行报错,这下你只能自己编译。真需要的话,加群下载。

使用scheme lib的项目

scheme lib官方网站:http://scheme-lib.evilbinary.org/
letsgo 莱茨狗抢狗软件:https://github.com/scheme-lib/letsgo
duck-editor 鸭子编辑器:https://github.com/evilbinary/duck-editor

文档

开发文档https://evilbinary.github.io/scheme-lib/

截图

Android

新手入门

环境安装 手机版

  1. 先安装scheme-release-1.6.apk
  2. 点击下载app库和package库
  3. 下载成功后点击运行计算机demo或者直接打开apps里面的应用demo点击运行

运行效果如下:

测试配置

  1. 在手机上输入运行代码可能不方便,所以弄了个配置文件,把需要运行的代码放到配置中会自己加载代码运行。配置文件为config.xml内容如下:

    <?xml version='1.0' encoding='utf-8' standalone='yes' ?>
    <map>
    	<string name="debugCode">(import (test) (gles1) (glut) ) (load "/sdcard/org.evilbinary.chez/lib/apps/draw-point.ss") ;(imgui-test-hello-world) </string>
    </map>
  2. adb push config.xml /sdcard/org.evilbinary.chez/scm/conf/config.xml

  3. 打开scheme app就可以直接运行啦。

scheme-lib's People

Contributors

chclock avatar draugus avatar evilbinary avatar frankyu avatar wow-yorick avatar zaoqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scheme-lib's Issues

Not work

Hello. Not load apps scheme in android apk.
Thanks

Runtime issues (Ubuntu 18.04)

After compiling, and installing the specific ChezScheme Version 9.5.1 with t6ale machine option, your scheme executable failes with

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:bin/  bin/scheme 
Error in $install-library-entry: invalid index ~s
(524)

Also i have sawn the issue that I get a floatin point excetion coming from Chez on startup during your scheme executable. Chez itself runs fine.

缺少 lib/libscm lib/libglut

make 报错如下

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C lib
link... darwin
make[1]: *** No rule to make target `libscm/libscm.so', needed by `libscm.so'.  Stop.
make: *** [lib/libscm/libscm.so] Error 2

(scheme-lib Version 1.5) Application Crashed click on login

Project Information

Expected behavior

when i click on login . it's logged in my account

Actual behavior

when i click on login for logging my account application crashed

How to reproduce

1-download scheme
2-add user name and password
3-click on login
4- application crashed

  • Browser/App version: 1.5
  • Operating system: 6.0.1

Recording Of The Bug

20190720_153549

Logcat

07-20 15:51:50.033 26533 26533 D AndroidRuntime: Shutting down VM

07-20 15:51:50.033 26533 26533 E AndroidRuntime: FATAL EXCEPTION: main

07-20 15:51:50.033 26533 26533 E AndroidRuntime: Process: org.evilbinary.chez, PID: 26533

07-20 15:51:50.033 26533 26533 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.evilbinary.chez.modle.Result.isSuccess()' on a null object reference

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at org.evilbinary.chez.activity.f.a(LoginActivity.java:104)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at org.evilbinary.chez.activity.f.a(LoginActivity.java:101)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at org.evilbinary.a.a.a.b(BaseRequest.java:167)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at com.android.volley.h.run(ExecutorDelivery.java:101)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7406)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

07-20 15:51:50.033 26533 26533 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Cannot compile on Linux Mint 18.2(based on Ubuntu 16.04)

Install dependency prompt error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
freeglut3-dev is already the newest version (2.8.1-2).
freeglut3-dev set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgles1-mesa-dev : Depends: libgles1-mesa (= 12.0.6-0ubuntu0.16.04.1) but 17.2.8-0ubuntu0~16.04.1 is to be installed

make failed error message:

make[2]: Leaving directory '/home/zarzen/Dev/scheme-lib/lib/libnanovg'
make[1]: Circular libalut.so <- libalut.so dependency dropped.
make -C libalut
make[2]: Entering directory '/home/zarzen/Dev/scheme-lib/lib/libalut'
cc -Wall -Wformat -I../libscm -g -DLOG -fPIC  -c -o alut.o alut.c
alut.c:10:21: fatal error: AL/alut.h: No such file or directory
compilation terminated.
Makefile:45: recipe for target 'alut.o' failed
make[2]: *** [alut.o] Error 1
make[2]: Leaving directory '/home/zarzen/Dev/scheme-lib/lib/libalut'
Makefile:71: recipe for target 'libalut.so' failed
make[1]: *** [libalut.so] Error 2
make[1]: Leaving directory '/home/zarzen/Dev/scheme-lib/lib'
Makefile:49: recipe for target 'lib/libscm/libscm.so' failed
make: *** [lib/libscm/libscm.so] Error 2

Exception in foreign-procedure: no entry for "Sactivate_thread"

跑不少测试脚本的时候都会出现这个,为啥呢?Ubuntu 18.04

~/app/scheme-lib/bin$ ./scheme --script ../apps/http-download.ss 
Scheme Version 1.1
Copyright 2016-2020 evilbinary.

Exception in foreign-procedure: no entry for "Sactivate_thread"

依赖有错误

我是ubuntu18.04

$ uname -a
Linux linuxbox 4.18.0-18-generic #19~18.04.1-Ubuntu SMP Fri Apr 5 10:22:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

按照README的linux编译:

scheme-lib|master⚡ ⇒ sudo apt-get install freeglut3-dev libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libalut-dev libopenal-dev libffi-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libgles1-mesa-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libglvnd-dev:i386 libglvnd-dev

E: Package 'libgles1-mesa-dev' has no installation candidate

一些依赖出问题了。


然后执行 make 命令:

scheme-lib|master⚡ ⇒ make
make -C lib
make[1]: Entering directory '/usr/local/src/scheme-lib/lib'
link... linux
make -C libscm
make[2]: Entering directory '/usr/local/src/scheme-lib/lib/platform/linux/libscm'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/usr/local/src/scheme-lib/lib/platform/linux/libscm'
make -C libglut
make[2]: Entering directory '/usr/local/src/scheme-lib/lib/platform/linux/libglut'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/usr/local/src/scheme-lib/lib/platform/linux/libglut'
make -C libimgui
make[2]: Entering directory '/usr/local/src/scheme-lib/lib/libimgui'
g++ -g -std=c++11 -Wall -Wformat -Iimgui -I../libscm -I../libgl -Iaddons/ -Iaddons/imguistyleserializer  -D"__builtin_cpu_supports(x)=1" -DGLAD -I../3rdparty/include -I../libglfw  -I../libglut  -L../libglfw/  -L../libglut/  -fPIC  -c -o main.o main.cpp
In file included from ../libglfw/glfw.h:9:0,
                 from imgui_impl_gl.h:8,
                 from main.cpp:2:
../3rdparty/include/GLFW/glfw3.h:171:12: fatal error: GL/gl.h: No such file or directory
   #include <GL/gl.h>
            ^~~~~~~~~
compilation terminated.
Makefile:56: recipe for target 'main.o' failed
make[2]: *** [main.o] Error 1
make[2]: Leaving directory '/usr/local/src/scheme-lib/lib/libimgui'
Makefile:61: recipe for target 'libimgui.so' failed
make[1]: *** [libimgui.so] Error 2
make[1]: Leaving directory '/usr/local/src/scheme-lib/lib'
Makefile:53: recipe for target 'lib/libimgui/libimgui.so' failed
make: *** [lib/libimgui/libimgui.so] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.