diff --git a/README.md b/README.md index c8eb049..cc664e3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -#CursesSharp +# CursesSharp ![](http://sushihangover.github.io/images/FireworksDemo.gif) -##INTRODUCTION +## INTRODUCTION CursesSharp is a C# wrapper for curses library. The latest version of this 'fork'' can be found at [Github](https://github.com/sushihangover/CursesSharp). @@ -10,14 +10,13 @@ The original version can be found at the [SourceForge.net project page](http://s ![RainDemo](http://sushihangover.github.io/images/RainDemo.gif ) -##DOCUMENTATION +## DOCUMENTATION -CursesSharp consists of a .NET assembly (CursesSharp.dll) and a native wrapper shared library (DLL) which is linked with PDCurses (in Windows) or ncurses (in Unix-like systems). This wrapper library is called CursesWrapper.dll in Windows or libCursesWrapper.so in Unix or libCursesWrapper.dylib in OS-X. CursesSharp provides a bit cleaner -API to curses than the original one, although function names remain unchanged for the most part. +CursesSharp consists of a .NET assembly (CursesSharp.dll) and a native wrapper shared library (DLL) which is linked with PDCurses (in Windows) or ncurses (in Unix-like systems). This wrapper library is called CursesWrapper.dll in Windows or libCursesWrapper.so in Unix or libCursesWrapper.dylib in OS-X. CursesSharp provides a bit cleaner API to curses than the original one, although function names remain unchanged for the most part. ![](http://sushihangover.github.io/images/UnicodeDemo.gif) -###CursesSharp namespace contains several important classes: +### CursesSharp namespace contains several important classes: * Defs - contains constants from curses: attribute, color and key definitions as well as some macros (COLOR_PAIR, PAIR_NUMBER) @@ -32,7 +31,7 @@ API to curses than the original one, although function names remain unchanged fo *Documentation is (always) under construction. Help would be much appreciated.* -##Installing CursesSharp on OS-X +## Installing CursesSharp on OS-X These are the instructions for building CursesSharp on OS-X. @@ -42,15 +41,16 @@ The build process has been tested on: * Apple LLVM version 7.0.0 (clang-700.1.76) * Mono JIT compiler version 4.2.1 64-bit build. -##0. Prerequisites +### 0. Prerequisites The native library is now built as a 'fat' library so either a Mono 32-bit or 64-bit build can be used. -**$> file libCursesWrapper.so** - - libCursesWrapper.so: Mach-O universal binary with 2 architectures - libCursesWrapper.so (for architecture i386): Mach-O dynamically linked shared library i386 - libCursesWrapper.so (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 +```console +user@localhost:~$ file libCursesWrapper.so +libCursesWrapper.so: Mach-O universal binary with 2 architectures +libCursesWrapper.so (for architecture i386): Mach-O dynamically linked shared library i386 +libCursesWrapper.so (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 +``` -##1. Getting CursesSharp +### 1. Getting CursesSharp You can clone it from the following repository: https://github.com/sushihangover/CursesSharp.git -##2. Make the Native Library +### 2. Make the Native Library mdtool build CursesSharp.Native.sln --target:Build --configuration:Release mdtool build CursesSharp.Native.sln --target:Build --configuration:Debug -##3. Make the C# Libraries and Demos +### 3. Make the C# Libraries and Demos xbuild CursesSharp.sln /target:Clean xbuild CursesSharp.sln /target:Build -Note: To run the demos from the CLI, make sure that set the [`DYLD_FALLBACK_LIBRARY_PATH`](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dyld.1.html). While still in the repo's root directory: +> **Note** To run the demos from the CLI, make sure that set the [`DYLD_FALLBACK_LIBRARY_PATH`](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dyld.1.html). + +While still in the repo's root directory: export DYLD_FALLBACK_LIBRARY_PATH=$(PWD)/CursesSharp.Native/bin/Debug:/usr/lib:$DYLD_FALLBACK_LIBRARY_PATH @@ -86,7 +88,7 @@ To learn more about `dyld` check out the `man` page: man dyld -##Demos: +## Demos: There are various demos available to review: @@ -100,7 +102,7 @@ There are various demos available to review: * Demo.Gui.Timeout * Demo.Native.ResizeTerm -##Rain Demo: +### Rain Demo: pushd CursesSharp.Demo/Demo.CursesSharp.Rain/bin/x64/Debug/ mono RainDemo.exe @@ -108,7 +110,7 @@ There are various demos available to review: ![RainDemo](http://sushihangover.github.io/images/RainDemo.gif ) -##FireWorks Demo: +### FireWorks Demo: pushd CursesSharp.Demo/Demo.CursesSharp.Rain/bin/x64/Debug/ mono FireworkDemo.exe @@ -116,7 +118,7 @@ There are various demos available to review: ![](http://sushihangover.github.io/images/FireworksDemo.gif) -##MidnightCommander Demo: +### MidnightCommander Demo: pushd CursesSharp.Demo/Demo.Gui.MidnightCommander/bin/x64/Debug/ mono Demo.Gui.MidnightCommander.exe @@ -125,11 +127,11 @@ There are various demos available to review: ![](http://sushihangover.github.io/images/CursesSharp-Midnight.png) -##Installing CursesSharp on Linux +## Installing CursesSharp on Linux -###0. Prerequisites +### 0. Prerequisites -Note: It is assumed you are running 64-bit Linux (ARCH x86_64) +> **Note** It is assumed you are running 64-bit Linux (ARCH x86_64) Install some dependencies: @@ -137,25 +139,27 @@ Install some dependencies: sudo apt-get install lib32ncurses5-dev sudo apt-get install ncurses-doc -##1. Getting CursesSharp +### 1. Getting CursesSharp You will have to obtain CursesSharp sources. You clone it from the following repository: https://github.com/sushihangover/CursesSharp.git -###2. Make the Native Library +### 2. Make the Native Library mdtool build CursesSharp.Native.Linux.sln --target:Build --configuration:Release mdtool build CursesSharp.Native.Linux.sln --target:Build --configuration:Debug -###3. Make the C# Libraries and Demos +### 3. Make the C# Libraries and Demos xbuild CursesSharp.sln /target:Clean /property:configuration=Debug xbuild CursesSharp.sln /target:Build /property:configuration=Debug -#Demos: +## Demos: + +> **Note** To run the demos from the CLI, make sure that set the [`LD_LIBRARY_PATH`](http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html). -Note: To run the demos from the CLI, make sure that set the [`LD_LIBRARY_PATH`](http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html). While still in the repo's root directory: +While still in the repo's root directory: export LD_LIBRARY_PATH=$(PWD)/CursesSharp.Native/bin/Debug:/usr/lib:$LD_LIBRARY_PATH @@ -167,25 +171,25 @@ To learn more about `ld` check out the `man` page: man ld -##MessageBox Demo: +### MessageBox Demo: cd CursesSharp.Demo/Demo.Gui.MidnightCommander/bin/x64/Debug/ mono Demo.Gui.Messagebox.exe cd - -#####(Ubuntu / Konsole) +#### (Ubuntu / Konsole) ![](http://sushihangover.github.io/images/CursesSharp-MsgBox-Konsole.png) -##MidnightCommander Demo: +### MidnightCommander Demo: cd CursesSharp.Demo/Demo.Gui.MidnightCommander/bin/x64/Debug/ mono Demo.Gui.MidnightCommander.exe cd - -####(Ubuntu / Konsole) +#### (Ubuntu / Konsole) ![](http://sushihangover.github.io/images/CursesSharp-Midnight-Konsole.png) -##Installing CursesSharp on Windows +## Installing CursesSharp on Windows Refer the original Windows project, source code and instructions are [here](http://curses-sharp.sourceforge.net/index.php?page=windows) @@ -200,7 +204,7 @@ Linux: {TODO} -##TODO & Contributors: +## TODO & Contributors: * Nuget support * MS Window support (via PDCurses)