Sound like a good idea. The source code to the native library is
built using: https://github.com/fusesource/jansi-native
Regards,
Hiram
FuseSource
Web: http://fusesource.com/
Regards,
Hiram
FuseSource
Web: http://fusesource.com/
https://github.com/fusesource/jansi-native
I've taken your changes and applied them to the latest copy of that
project. I'm going to attach a patch with the modifications. You can
apply the patch using "git apply" to a clone of the project. I did a
quick build on a win64 system and it seemed to work fine. You just
have to run "mvn install" on the project from the a Windows SDK CMD
prompt. That will generate the native build project and build it.
The patch still needs a little more work though. All the new text
files need a License header so folks know that your contribution is
also ASL 2.0 licensed.
Also could you add a readme.txt to the windows directory or update the
root readme with info of how .lib files were created.
Also I'd rather receive your contribution via a github fork [1] and
then a pull request [2]. That way the commit history clearly tracks
that you were the originator of the change.
Regards,
Hiram
FuseSource
Web: http://fusesource.com/
[1]: http://help.github.com/fork-a-repo/
[1]: http://help.github.com/send-pull-requests/
No so easy :-)
I only have VS2010 installed, and mvn install fails, because there is
no vcbuild anymore.
And I don't know where to change it.
(one example of why I don't like maven: hidden stuff that magically
works, until it doesn't :-)
Mihai
So in maven by convention, everything in src are source files, and the builds
generate files under target. In this project we are using a
hawtjni-maven plugin
to code generate the native source project. This build will create the c source
distro for the shared lib:
target/jansi-native-${version}-native-src.zip
Then it extracts it (to target/native-build) and builds the shared lib and
package it into:
target/jansi-native-${version}-${platform}.jar
Now lets backup and explain how the source generation happens.
HawtJNI examines the annotations on the java class files to control how
the c or c++ JNI glue code is implement to call the native functions.
The java files under src/main/java is what gets scanned for
code generation purposes. And the c/c++ code is initially generated to
target/generated-sources/hawtjni/native-src
The following generated files change depending on how you
define your java classes and annotations:
jansi.c
jansi_stats.c
jansi_stats.h
jansi_structs.c
jansi_structs.h
And these files are always the same no matter what.
hawtjni.c
hawtjni.h
windows/stdint.h
The next step then creates a native source distribution packaging
all the files in src/main/native-package, adding in the generated
c/c++ files under the package src dir and then adding/generating
standard distribution files if they are missing. The GNU auto tools
based build files get generated if missing, the VS project files
also get generated if missing. The results of this package generation
step are stored at target/generated-sources/hawtjni/native-package
And that's about it. That's why I added your files/changes under the
src/main/native-package directory, that way the would just get included
in the file native source distro.
> In general (no jansi related, but as a programmer) I find that I don't
> really like maven.
> There is to much "magic" happening under the hood
> (for instance I used maven on 2-3 other project, and discovered I
> ended up with 1.4 GB and 7000 files downloaded by maven)
> So I don't think it helps with dependencies management mess, but in a
> way makes it worse
> (by hiding it, people don't learn about it, and are not compelled to
> clean it)
I totally understand. Most of all those dependencies are being used
by the build tools
plugins. They all tend to use slightly different versions of common
dependencies
so you end up downloading the internet. The bright side is that you
can run any
build plugin in maven without worrying if another plugin in the build
has a conflicting
dependency. Each runs plugin runs against the dependency versions which it was
developed/tested against so you end up with very reliable builds even
when you start
mixing large numbers of plugins.
And I'm the kinda guy who like build tools that keep working even if you add in
more features plugins over time. I'm willing to pay the bandwidth/disk costs as
long as things just work.
> Ok, enough with the rant :-)
> Back to jansi :-)
>
yeah me too!
> I will also have to take a look at git. I did play a bit with it a
> while ago, but not much.
> So I don't even have a github account (and I did not intend to create
> one :-)
> I'll see how fast I can get up to speed.
>
It's not too hard. I highly recommend you give it another shot. I's a
lovely SCM.
> My intention was not to become a full time contributor, but more like
> "bug report/feature request" with a proposed fix attached :-)
> You are the project owner, take only what you like, throw away the
> rest :-)
>
> So I don't care about credits or anything.
> Everything I do for jansi is yours, put it under whatever license you
> want.
Thanks. But you've made some great contributions and once you get
setup I would not mind
letting you do direct commits to the project. I like to give talented
folks like
you easy access to encourage future contributions!