Giter Site home page Giter Site logo

nconsole's Introduction

nconsole

JNI console library, to provide native console access. This isn't meant to be an implementation of ncurses. It's just to give some common console control, like colors and cursor control. Under macOS and Linux, this does end up using ncurses.

.idea - idea project directory for C++ part of the project.

nconsole.iml is the IntelliJ Java project file.

Windows

No build for Windows yet. Planning to add that soon. Would like to use the native Windows console API.

Build a DLL in Windows:

cl -I\java\jdk1.8.0_45\include -I\java\jdk1.8.0_45\include\win32 -LD nconsole.cpp -Fenconsole.dll

Console programming on Windows

Building

Build the shared library first, then the Java library you will use for other projects.

Shared library

When building on Linux if you don't have cmake:

g++ -shared -o libnconsole.so -fPIC -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/include -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/include/linux -lncurses ncurses.cpp

When building on Linux with cmake:

cmake CMakeLists.txt
make

Running test app

Quick test app to see things work, and test reading input and what the keystroke is mapped to.

java -cp out/production/nconsole -Djava.library.path=./cmake-build-debug com.axorion.NConsole $@

Java library

Then build the java lib, which results in nconsole.jar put in the current directory:

mkdir -p classes
javac -d classes src/java/com/axorion/NConsole.java
jar cvf nconsole.jar -C classes .

nconsole's People

Contributors

abathur8bit avatar

Watchers

James Cloos avatar  avatar

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.