Skip to content

Commit

Permalink
Patch-A
Browse files Browse the repository at this point in the history
  • Loading branch information
dim-s committed Feb 27, 2016
1 parent 20262a6 commit c4b3d3b
Show file tree
Hide file tree
Showing 35 changed files with 2,431 additions and 1,781 deletions.
354 changes: 202 additions & 152 deletions develnext/build.gradle
Original file line number Diff line number Diff line change
@@ -1,152 +1,202 @@
apply plugin: 'application'

project.version = '1.0'

repositories {
mavenLocal()
jcenter()
mavenCentral()
}

sourceSets {
main.resources.srcDirs = ['src']
}

mainClassName = 'php.runtime.launcher.Launcher'
jar.archiveName = 'DevelNext.jar'

manifest {
attributes 'Main-Class': 'php.runtime.launcher.Launcher'
}

task distPatchZip(type: Zip, dependsOn: ['clean', 'distPatch']) {
from "$project.buildDir/install/$project.name"
archiveName "DevelNext.Patch.zip"

doLast {
def uploadPath = System.getProperty("uploadPath", "E:/Upload")

if (new File(uploadPath).isDirectory()) {
copy {
from distPatchZip.archivePath
into "$uploadPath/YandexDisk"
}
}
}
}


task distPatch(dependsOn: ['clean', 'installDist']) {
doLast {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
exec {
commandLine "$project.rootDir/develnext-tools/Launch4j/launch4jc.exe"
args "$project.rootDir/develnext/launcher/winLauncher.xml"
}
}

copy {
from "$project.rootDir/develnext/launcher/DevelNext.exe"
into "$project.buildDir/install/$project.name"
}

copy {
from "$project.rootDir/develnext/misc"
into "$project.buildDir/install/$project.name"
}
}
}


task distIdeWindows(dependsOn: ['distIde']) {
doLast {
delete "$project.buildDir/install/$project.name/tools/jreLinux"
}
}

task distIdeLinux(dependsOn: ['distIde']) {
doLast {
delete "$project.buildDir/install/$project.name/tools/jre"
file("$project.buildDir/install/$project.name/tools/jreLinux").renameTo(file("$project.buildDir/install/$project.name/tools/jre"))
}
}

task distIde(dependsOn: ['installDist']) {
doLast {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
exec {
commandLine "$project.rootDir/develnext-tools/Launch4j/launch4jc.exe"
args "$project.rootDir/develnext/launcher/winLauncher.xml"
}
}

copy {
from "$project.rootDir/develnext-tools"
into "$project.buildDir/install/$project.name/tools"
}

copy {
from "$project.rootDir/develnext/launcher/DevelNext.exe"
into "$project.buildDir/install/$project.name"
}

copy {
from "$project.rootDir/develnext/misc"
into "$project.buildDir/install/$project.name"
}
}
}

task distIdeWindowsSetup(dependsOn: ['distIdeWindows']) {
doLast {
def issFile = "$project.rootDir/develnext/windowsSetup/innosetup.iss".replace("\\", "/")
def innoSetupBin = "$project.rootDir/develnext-tools/innoSetup/ISCC.exe".replace("\\", "/")

exec {
commandLine innoSetupBin, '/Qp', issFile
}

def uploadPath = System.getProperty("uploadPath", "E:/Upload")

if (new File(uploadPath).isDirectory()) {
copy {
from "$project.buildDir/distributions/DevelNextSetup.exe"
into "$uploadPath/YandexDisk"
}
}
}
}

task distIdeLinuxSetup(type: Tar, dependsOn: ['distIdeLinux']) {
def installDir = "$project.buildDir/install/$project.name"

compression = Compression.GZIP
archiveName "DevelNextLinux.tar.gz"

from(installDir) {
exclude('*.sh')
exclude('bin/develnext')
exclude('tools/gradle/bin/gradle')
exclude('tools/jre/bin/java')
}

from(installDir) {
include('*.sh')
include('bin/develnext')
include('tools/gradle/bin/gradle')
include('tools/jre/bin/java')

fileMode = 0755
}

doLast {
def uploadPath = System.getProperty("uploadPath", "E:/Upload")

if (new File(uploadPath).isDirectory()) {
copy {
from distIdeLinuxSetup.archivePath
into "$uploadPath/YandexDisk"
}
}
}
}
apply plugin: 'application'

project.version = '1.0'

repositories {
mavenLocal()
jcenter()
mavenCentral()
}

sourceSets {
main.resources.srcDirs = ['src']
}

run {
mainClassName = 'php.runtime.launcher.Launcher'
jvmArgs += ["-Dfile.encoding=UTF-8", "-Xms256m", "-Xms1280m"]
}

jar.archiveName = 'DevelNext.jar'

manifest {
attributes 'Main-Class': 'php.runtime.launcher.Launcher'
}

task distWindowsPatch(type: Zip, dependsOn: ['clean', 'distPatch']) {
from "$project.buildDir/install/$project.name"
archiveName "DevelNext.WindowsPatch.zip"

doLast {
def issFile = "$project.rootDir/develnext/windowsSetup/innopatchsetup.iss".replace("\\", "/")
def innoSetupBin = "$project.rootDir/develnext-tools/innoSetup/ISCC.exe".replace("\\", "/")

exec {
commandLine innoSetupBin, '/Qp', issFile
}

def uploadPath = System.getProperty("uploadPath", "E:/Upload")

if (new File(uploadPath).isDirectory()) {
copy {
from "$project.buildDir/distributions/DevelNext.WindowsPatch.exe"
into "$uploadPath/YandexDisk"
}

copy {
from distWindowsPatch.archivePath
into "$uploadPath/YandexDisk"
}
}
}
}

task distLinuxPatch(type: Tar, dependsOn: ['clean', 'distPatch']) {
def installDir = "$project.buildDir/install/$project.name"

compression = Compression.GZIP
archiveName "DevelNext.LinuxPatch.tar.gz"

from(installDir) {
exclude('*.sh')
exclude('bin/develnext')
exclude('tools/gradle/bin/gradle')
exclude('tools/jre/bin/java')
}

from(installDir) {
include('*.sh')
include('bin/develnext')
include('tools/gradle/bin/gradle')
include('tools/jre/bin/java')

fileMode = 0755
}

doLast {
def uploadPath = System.getProperty("uploadPath", "E:/Upload")

if (new File(uploadPath).isDirectory()) {
copy {
from distLinuxPatch.archivePath
into "$uploadPath/YandexDisk"
}
}
}
}


task distPatch(dependsOn: ['clean', 'installDist']) {
doLast {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
exec {
commandLine "$project.rootDir/develnext-tools/Launch4j/launch4jc.exe"
args "$project.rootDir/develnext/launcher/winLauncher.xml"
}
}

copy {
from "$project.rootDir/develnext/launcher/DevelNext.exe"
into "$project.buildDir/install/$project.name"
}

copy {
from "$project.rootDir/develnext/misc"
into "$project.buildDir/install/$project.name"
}
}
}


task distIdeWindows(dependsOn: ['distIde']) {
doLast {
delete "$project.buildDir/install/$project.name/tools/jreLinux"
}
}

task distIdeLinux(dependsOn: ['distIde']) {
doLast {
delete "$project.buildDir/install/$project.name/tools/jre"
file("$project.buildDir/install/$project.name/tools/jreLinux").renameTo(file("$project.buildDir/install/$project.name/tools/jre"))
}
}

task distIde(dependsOn: ['installDist']) {
doLast {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
exec {
commandLine "$project.rootDir/develnext-tools/Launch4j/launch4jc.exe"
args "$project.rootDir/develnext/launcher/winLauncher.xml"
}
}

copy {
from "$project.rootDir/develnext-tools"
into "$project.buildDir/install/$project.name/tools"
}

copy {
from "$project.rootDir/develnext/launcher/DevelNext.exe"
into "$project.buildDir/install/$project.name"
}

copy {
from "$project.rootDir/develnext/misc"
into "$project.buildDir/install/$project.name"
}
}
}

task distIdeWindowsSetup(dependsOn: ['distIdeWindows']) {
doLast {
def issFile = "$project.rootDir/develnext/windowsSetup/innosetup.iss".replace("\\", "/")
def innoSetupBin = "$project.rootDir/develnext-tools/innoSetup/ISCC.exe".replace("\\", "/")

exec {
commandLine innoSetupBin, '/Qp', issFile
}

def uploadPath = System.getProperty("uploadPath", "E:/Upload")

if (new File(uploadPath).isDirectory()) {
copy {
from "$project.buildDir/distributions/DevelNextSetup.exe"
into "$uploadPath/YandexDisk"
}
}
}
}

task distIdeLinuxSetup(type: Tar, dependsOn: ['distIdeLinux']) {
def installDir = "$project.buildDir/install/$project.name"

compression = Compression.GZIP
archiveName "DevelNextLinux.tar.gz"

from(installDir) {
exclude('*.sh')
exclude('bin/develnext')
exclude('tools/gradle/bin/gradle')
exclude('tools/jre/bin/java')
}

from(installDir) {
include('*.sh')
include('bin/develnext')
include('tools/gradle/bin/gradle')
include('tools/jre/bin/java')

fileMode = 0755
}

doLast {
def uploadPath = System.getProperty("uploadPath", "E:/Upload")

if (new File(uploadPath).isDirectory()) {
copy {
from distIdeLinuxSetup.archivePath
into "$uploadPath/YandexDisk"
}
}
}
}
Binary file modified develnext/launcher/DevelNext.exe
Binary file not shown.
Loading

0 comments on commit c4b3d3b

Please sign in to comment.