Skip to content

Commit

Permalink
Update thirdparty_build.gradle scripts: support thirdparty repos reusage
Browse files Browse the repository at this point in the history
  • Loading branch information
nick863 authored and max-kammerer committed Oct 24, 2023
1 parent fcdf269 commit 8746d14
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ To build `Orion Viewer` you will need:
```

Pre 0.80 versions are compatible with Android 2.1+ devices

###Troubleshooting

In case of getting error about absent libtinfo.so.5, please install ncurses-compat-libs.
36 changes: 32 additions & 4 deletions thirdparty_build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,22 @@ buildscript {
/*DJVU CHAIN*/
task downloadDjvu {
doLast {
exec {
commandLine = ['git', 'clone', 'git://git.code.sf.net/p/djvu/djvulibre-git', djvu]
def djvuFolder = new File(djvu)
if (djvuFolder.exists()) {
// Switch to master so we can properly pull if it was
// detached.
exec {
commandLine = ['git', '-C', djvu, 'checkout', '-f', 'master']
}
// Fetch
exec {
commandLine = ['git', '-C', djvu, 'fetch', 'origin']
}
}
else {
exec {
commandLine = ['git', 'clone', 'git://git.code.sf.net/p/djvu/djvulibre-git', djvu]
}
}

exec {
Expand Down Expand Up @@ -52,8 +66,22 @@ task downloadMupdf {
def version = "1.23.3"

doLast {
exec {
commandLine = ['git', 'clone', 'git://git.ghostscript.com/mupdf.git', mupdf]
def mupdfFolder = new File(mupdf)
if (mupdfFolder.exists()) {
// Switch to master so we can properly pull if it was
// detached.
exec {
commandLine = ['git', '-C', mupdf, 'checkout', '-f', 'master']
}
// Fetch
exec {
commandLine = ['git', '-C', mupdf, 'fetch', 'origin']
}
}
else {
exec {
commandLine = ['git', 'clone', 'git://git.ghostscript.com/mupdf.git', mupdf]
}
}

exec {
Expand Down

0 comments on commit 8746d14

Please sign in to comment.