Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0f196859
Commit
0f196859
authored
Dec 03, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Generate assets checksum from the gradle build file.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ae4199e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
16 deletions
+31
-16
Makefile.in
dlls/wineandroid.drv/Makefile.in
+2
-6
build.gradle.in
dlls/wineandroid.drv/build.gradle.in
+29
-10
No files found.
dlls/wineandroid.drv/Makefile.in
View file @
0f196859
...
...
@@ -20,9 +20,5 @@ EXTRA_TARGETS = wine-debug.apk
all
:
wine-debug.apk
wine-debug.apk
:
build.gradle $(srcdir)/AndroidManifest.xml $(srcdir)/WineActivity.java $(srcdir)/wine.svg
(
test
-d
assets
&&
\
rm
-f
assets/files.sum assets/sums.sum
&&
\
sha256sum
`
find assets
-type
f
-print
`
|
sed
's/ assets\// /'
>
files.sum
&&
\
sha256sum
files.sum
>
sums.sum
&&
\
mv
files.sum sums.sum assets
)
||
rm
-rf
assets
gradle
-q
assembleDebug
&&
mv
build/outputs/apk/wine-debug.apk .
gradle
-q
assembleDebug
mv
build/outputs/apk/wine-debug.apk
$@
dlls/wineandroid.drv/build.gradle.in
View file @
0f196859
...
...
@@ -32,7 +32,8 @@ buildscript
}
}
def add_icon_task( dir, scale ) {
def add_icon_task( dir, scale )
{
return tasks.create( "createIcon-" + dir, Exec ) {
def outdir = new File( "res", "drawable-" + dir )
outputs.dir( outdir )
...
...
@@ -45,15 +46,33 @@ def add_icon_task( dir, scale ) {
}
}
tasks.whenTaskAdded { t ->
if (t.name.equals( "generateDebugResources" )) {
t.dependsOn add_icon_task( "ldpi", 0.75 )
t.dependsOn add_icon_task( "mdpi", 1 )
t.dependsOn add_icon_task( "hdpi", 1.5 )
t.dependsOn add_icon_task( "xhdpi", 2 )
t.dependsOn add_icon_task( "xxhdpi", 3 )
t.dependsOn add_icon_task( "xxxhdpi", 4 )
}
def checksum_task()
{
return tasks.create( "checksumAssets", Exec ) {
commandLine "sh", "-c",
"(test -d assets && " +
"rm -f assets/files.sum assets/sums.sum && " +
"sha256sum \$(find assets -type f -print) | sed 's/ assets\\// /' >files.sum && " +
"sha256sum files.sum >sums.sum && " +
"mv files.sum sums.sum assets) || rm -rf assets";
}
}
tasks.whenTaskAdded
{
if (name.equals( "generateDebugResources" ))
{
dependsOn add_icon_task( "ldpi", 0.75 )
dependsOn add_icon_task( "mdpi", 1 )
dependsOn add_icon_task( "hdpi", 1.5 )
dependsOn add_icon_task( "xhdpi", 2 )
dependsOn add_icon_task( "xxhdpi", 3 )
dependsOn add_icon_task( "xxxhdpi", 4 )
}
if (name.equals( "generateDebugAssets" ))
{
dependsOn checksum_task()
}
}
tasks.withType(JavaCompile)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment