diff options
author | Yves Fischer <yves.fischer@cern.ch> | 2016-01-15 20:33:52 +0100 |
---|---|---|
committer | Yves Fischer <yves.fischer@cern.ch> | 2016-01-15 20:33:52 +0100 |
commit | 37c3b476429355c346944e5caffac53f60a9e147 (patch) | |
tree | 94208cf9bcbed1faf0ef66e215fcd341312da57b /packages/gwt-chromium/build.gradle | |
parent | 516457ab00963e56fea49893a07972604a247855 (diff) | |
download | debian-packages-37c3b476429355c346944e5caffac53f60a9e147.tar.gz debian-packages-37c3b476429355c346944e5caffac53f60a9e147.zip |
gwt-chromium: make it working with some hacks
Diffstat (limited to 'packages/gwt-chromium/build.gradle')
-rw-r--r-- | packages/gwt-chromium/build.gradle | 59 |
1 files changed, 52 insertions, 7 deletions
diff --git a/packages/gwt-chromium/build.gradle b/packages/gwt-chromium/build.gradle index 86db2db..cf8c5f3 100644 --- a/packages/gwt-chromium/build.gradle +++ b/packages/gwt-chromium/build.gradle @@ -11,7 +11,7 @@ task downloadChrome(type: DownloadTask) { task unpackChrome(type: Copy) { from zipTree(downloadChrome.destFile) - into file("${buildDir}/unpacked/dist") + into file("${buildDir}/chromeLinuxUnpacked") eachFile { FileCopyDetails fcd -> // makes out of 06__ (_=don't care) 0655 // means rwx______ => rwxr-xr-x @@ -29,6 +29,26 @@ task downloadGwtPlugin(type: DownloadTask) { sha256sum '5716f39ca4dadb47f571f65f631a00854487971f42ad24aa3a36a99e78d33134' } +task unpackGwtPlugin() { + inputs.file(downloadGwtPlugin.destFile) + ext.zip = file("${buildDir}/gwtPlugin.zip") + ext.unpacked = file("${buildDir}/gwtPlugin") + outputs.file(zip) + outputs.dir(unpacked) +} +unpackGwtPlugin {}.dependsOn(downloadGwtPlugin) + +unpackGwtPlugin << { + def fs = new FileOutputStream(zip) + final bytes = inputs.files.first().readBytes() + fs.write(bytes, 306, bytes.length - 306) + fs.close() + project.copy { + from zipTree(zip) + into unpacked + } +} + task downloadPdfPlugin(type: DownloadTask) { source 'https://clients2.googleusercontent.com/crx/blobs/QgAAAC6zw0qH2DJtnXe8Z7rUJP2i3UKpz0eTiopC2Qlk_FXWm-wYwG' + 'N2MPtjDt7LaoCfAScKzPva1bZi2q-9pYXZOibTl1nwFns1ZGCCvKGnyPQ0AMZSmuVlD6-IvZI2Yaw8Sj800M072EC85w/'+ @@ -36,17 +56,42 @@ task downloadPdfPlugin(type: DownloadTask) { sha256sum '' } +task unpackPdfPlugin() { + inputs.file(downloadPdfPlugin.destFile) + ext.zip = file("${buildDir}/pdfPlugin.zip") + ext.unpacked = file("${buildDir}/pdfPlugin") + outputs.file(zip) + outputs.dir(unpacked) +} +unpackPdfPlugin.dependsOn(downloadPdfPlugin) + +unpackPdfPlugin << { + def fs = new FileOutputStream(zip) + final bytes = inputs.files.first().readBytes() + fs.write(bytes, 306, bytes.length - 306) + fs.close() + project.copy { + from zipTree(zip) + into unpacked + } +} + ospackage { into("/opt/${project.name}") - from(unpackChrome.outputs.files) + from(unpackChrome.outputs.files) { + exclude '**/en-US.pak' + } from(fileTree(dir: 'resources/chrome-profile')) from('resources/rewrite-locale/output.pak') { - into '/chrome-linux/locales/en-US.pak' + into 'chrome-linux/locales' + eachFile { FileCopyDetails fcd -> + fcd.name = 'en-US.pak' + } } - from(downloadGwtPlugin.outputs.files) { - into "/opt/${project.name}/chrome-profile/Default/Extensions/jpjpnpmbddbjkfaccnmhnkdgjideieim" + from(unpackGwtPlugin.outputs.files) { + into 'chrome-profile/Default/Extensions/jpjpnpmbddbjkfaccnmhnkdgjideieim' } - from(downloadPdfPlugin.outputs.files) { - into "/opt/${project.name}/chrome-profile/Default/Extensions/oemmndcbldboiebfnladdacbdfmadadm" + from(unpackPdfPlugin.outputs.files) { + into 'chrome-profile/Default/Extensions/oemmndcbldboiebfnladdacbdfmadadm' } }
\ No newline at end of file |