rnowley / csharp-ncurses Goto Github PK
View Code? Open in Web Editor NEWProvides a C# wrapper for the NCurses library
License: MIT License
Provides a C# wrapper for the NCurses library
License: MIT License
With a few simple changes, I think the project can easily address the problem of different ncurses library names on different target platforms. I've seen a few comments on SO and your blog where Windows devs can't quite figure out how to get this project going. This way it's literally a load-and-launch project from VS2017 (as long as you also drop the DLL into a %path%
folder, as described in the wiki).
The changes are in this branch on my fork:
https://github.com/MV10/csharp-ncurses/tree/library-from-build-target
win-x64
, linux-x64
, and osx-64
const cursesLib
based on the RID targetI've used RIDs to create cross-platform ASP.NET Core SCDs (self-contained deployments) -- I build and test on Windows, then deploy a release build to a headless Linux farm.
This is why I posted here instead of opening a PR: I develop on Windows. I'm not sure of the impact of this change for non-Windows developers. As-written, the #if
block defaults to the Windows DLL. Will VSCode on OSX launch in debug with the correct RID so that debug works? Can someone try this and let me know?
Hi Raymond,
Thanks for providing this library. I'm beginning to dabble in an ncurses project and it should prove helpful.
I had some small issues getting the Hello World sample running on Windows 10 using Git Bash inside ConEmu, and thought it may benefit someone else if it were documented. I'm not sure if this is assumed knowledge for the target audience of your library (or even a legitimate issue), so I have not submitted a PR to amend README.md
, nor created a Wiki page.
Learnings:
libncursesw6.dll
. Version 6.1 available here as of 04-2018.
%PATH%
...\csharp-ncurses\csharp-ncurses\NativeMethods.cs
"C:\Program Files\Git\git-cmd.exe" --no-cd --command=usr/bin/bash.exe -l -i
:
pwd
-> [..]/sample/helloWorld
echo $TERM
-> cygwin
dotnet build
dotnet run
-> Error opening terminal: cygwin.
export TERMINFO="C:\Program Files\Git\usr\lib\terminfo"
dotnet run
-> Goodbye cruel #C programming
as expectedPointing ncurses to the Cygwin terminfo file ("C:\Program Files\Git\usr\lib\terminfo\63\cygwin"
) via $TERMINFO
seems to be the key. Mintty (what git-bash.exe
wraps) launches Bash with $TERM=xterm, $TERMINFO=
, and can run the Hello World sample OK, but it seems git-cmd.exe
, running Bash, requires setting $TERMINFO
.
Hope that helps someone.
Cheers,
Tom
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.