Browse Source

Remove QuickJS example, we have proper tests now.

pull/1557/head
Joao Matos 4 years ago committed by João Matos
parent
commit
e447a54f11
  1. 8
      examples/QuickJS/build.sh
  2. 15
      examples/QuickJS/premake5.lua
  3. 6
      examples/QuickJS/test-native.cpp
  4. 1
      examples/QuickJS/test-native.h
  5. 2
      examples/QuickJS/test.js

8
examples/QuickJS/build.sh

@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
set -ex
mono ../../build/vs2015/lib/Debug_x64/CppSharp.CLI.exe -gen=qjs -module=test -prefix=js_ test-native.h
../../build/premake5-osx --file=premake5.lua gmake
make clean
make
cp gen/bin/release/libtest.dylib .
../../deps/QuickJS/qjs test.js

15
examples/QuickJS/premake5.lua

@ -1,15 +0,0 @@ @@ -1,15 +0,0 @@
qjs_inc_dir = path.getabsolute("../../deps/QuickJS")
qjs_lib_dir = path.getabsolute("../../deps/QuickJS")
workspace "qjs"
configurations { "release" }
project "test-native"
kind "StaticLib"
files { "*-native.cpp" }
include "gen/js_premake5.lua"
project "test"
includedirs { "." }
links { "test-native" }

6
examples/QuickJS/test-native.cpp

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
#include "test-native.h"
extern "C" int plus(int a, int b)
{
return a + b;
}

1
examples/QuickJS/test-native.h

@ -1 +0,0 @@ @@ -1 +0,0 @@
extern "C" int plus(int a, int b);

2
examples/QuickJS/test.js

@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
import { plus } from './libtest.dylib'
console.log(plus(1, 2))
Loading…
Cancel
Save