Creates a self-extracting install script.
This commit is contained in:
@@ -15,9 +15,6 @@
|
||||
"Fingerprinting": true
|
||||
},
|
||||
"DontCheckDefaultBrowser": true,
|
||||
"ExtensionSettings": {
|
||||
${preinstalled}
|
||||
},
|
||||
"Permissions": {
|
||||
"Camera": {
|
||||
"BlockNewRequests": true
|
||||
|
||||
@@ -16,6 +16,10 @@ configurations {
|
||||
canBeConsumed = false
|
||||
canBeResolved = true
|
||||
}
|
||||
install {
|
||||
canBeConsumed = true
|
||||
canBeResolved = false
|
||||
}
|
||||
}
|
||||
|
||||
// In this section you declare where to find the dependencies of your project
|
||||
@@ -45,9 +49,6 @@ repositories {
|
||||
}
|
||||
}
|
||||
|
||||
def firefox_module = "devedition"
|
||||
def firefox_revision = "92.0b7"
|
||||
|
||||
abstract class InstallBrowserTask extends DefaultTask {
|
||||
@OutputFile
|
||||
final abstract DirectoryProperty installation = project.objects.directoryProperty()
|
||||
@@ -248,6 +249,31 @@ task installAddons(type: Copy) {
|
||||
}
|
||||
}
|
||||
|
||||
task zipPolicies(type: Tar) {
|
||||
archiveFileName = "conf.tar"
|
||||
destinationDirectory = file("$buildDir")
|
||||
from(configurations.addon.files) {
|
||||
into "distribution/extensions"
|
||||
}
|
||||
from files("browserConf")
|
||||
filesMatching('**/policies.json'){
|
||||
def pre = ""
|
||||
for (File addon: configurations.addon.resolve())
|
||||
{
|
||||
if (pre.length() > 0)
|
||||
{
|
||||
pre += ",\n"
|
||||
}
|
||||
pre += "\"" + addon.name.substring(0, addon.name.lastIndexOf('.')) + "\": {\n"
|
||||
pre += "\"installation_mode\": \"forced_install\","
|
||||
pre += "\"install_url\": \"" + addon.toURI().toString() + "\""
|
||||
pre += "}"
|
||||
}
|
||||
println "Expanding ${pre}"
|
||||
expand(preinstalled: pre)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('clean') {
|
||||
dependsOn uninstallFirefoxWindows
|
||||
}
|
||||
@@ -255,3 +281,7 @@ println configurations.getNames()
|
||||
|
||||
compileJava.dependsOn installAddons
|
||||
compileJava.dependsOn movePolicies
|
||||
|
||||
artifacts {
|
||||
install(zipPolicies)
|
||||
}
|
||||
2
browser/gradle.properties
Normal file
2
browser/gradle.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
firefox_module = devedition
|
||||
firefox_revision = 92.0b7
|
||||
Reference in New Issue
Block a user