-
Notifications
You must be signed in to change notification settings - Fork 74
Compile instructions for bsdiff_jni.cc #123
Comments
Yes. I have been trying to get that to work. It is a bit tricky since it
transitively depended on a lot of other projects, some of which are not in
grade/maven.
…On Sun, 2 Jun 2019, 04:09 PokeMMO, ***@***.***> wrote:
Would it be possible to get some more information/instructions on how to
properly compile the native generator?
https://github.com/google/archive-patcher/blob/v2/generator/src/main/java/com/google/archivepatcher/generator/bsdiff/wrapper/bsdiff_jni.cc
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#123?email_source=notifications&email_token=AAYQENYZYPNQYAUYRPOSK2LPYM2XJA5CNFSM4HSBYBT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXD62RA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYQEN2JZNBSKVTWZBSBS5DPYM2XJANCNFSM4HSBYBTQ>
.
|
I managed to get it to compile https://github.com/PokeMMO/archive-patcher/tree/native-lib-build I've yet to verify it creates bit-for-bit equal results, but it runs. |
It doesn't create bit for bit equal results (but both are compatible).
If you wish to verify, you can try to enable the native integration test in
the grade conf under integration test directory.
…On Sun, 2 Jun 2019, 20:59 PokeMMO, ***@***.***> wrote:
I managed to get it to compile
https://github.com/PokeMMO/archive-patcher/tree/native-lib-build
I've yet to verify it creates bit-for-bit equal results, but it runs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#123?email_source=notifications&email_token=AAYQEN2FMV46XI4I5WYPX2DPYQRCJA5CNFSM4HSBYBT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWX43BY#issuecomment-498060679>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYQEN762XYLYFEMBHLHJELPYQRCJANCNFSM4HSBYBTQ>
.
|
Sorry, you also need to install a few packages via package manager. For debian based apt:
|
Hi, thanks. I figured it out. Btw, can you put a LICENSE file in the repo
you put above? You can copy from
https://github.com/google/archive-patcher/blob/master/LICENSE
…On Thu, 6 Jun 2019 at 05:53, PokeMMO ***@***.***> wrote:
Sorry, you also need to install a few packages via package manager.
For debian based apt:
libbz2-dev
libbrotli-dev
libdivsufsort-dev
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#123?email_source=notifications&email_token=AAYQEN4MGL2IB6BOQCTICCDPZCJ27A5CNFSM4HSBYBT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXBXBEA#issuecomment-499347600>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYQENYGOWK5J3643GI4NB3PZCJ27ANCNFSM4HSBYBTQ>
.
|
Was already in master, but added it to that branch too. |
Hi,
Thanks. I managed to have a script which builds the SO file. However, I am
struggling to integrate gradle with it. In particular:
1. Tests cannot automatically add the native library to load path (not sure
if this is feasible from gradle)
2. Uberjar (i.e., tools) cannot include the native lib.
3. Another concern I have is whether JNI will work when it is published to
maven.
I am not an expert in Gradle (so maybe it is capable). I am looking at
other options now like Maven.
…On Thu, 6 Jun 2019 at 11:19, PokeMMO ***@***.***> wrote:
Was already in master, but added it to that branch too.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#123?email_source=notifications&email_token=AAYQEN2DMAGJXF4MO5OEDG3PZDQDXA5CNFSM4HSBYBT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXCM6ZA#issuecomment-499437412>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYQEN7VUA7XE63S5OVBJUTPZDQDXANCNFSM4HSBYBTQ>
.
|
Maven will have the same issues as gradle. Several projects have done their own custom native loading implementations libgdx and LWJGL3 (Note the differences on archive mapping between libgdx and lwjgl3, libgdx uses a suffix while lwjgl3 now uses an android style arch folder) These implementations load the .so from the classpath as a resource, extract it to a temporary location on disk, and then invoke System.load For my custom testing fork, I simply created a subproject with the .so as a jar resource. And before I want to use it, I call libgdx's Then in your tests, you can just have a |
Would it be possible to get some more information/instructions on how to properly compile the native generator?
https://github.com/google/archive-patcher/blob/v2/generator/src/main/java/com/google/archivepatcher/generator/bsdiff/wrapper/bsdiff_jni.cc
The text was updated successfully, but these errors were encountered: