@@ -31,6 +31,38 @@ manifest {
3131 attributes ' Main-Class' : ' php.runtime.launcher.Launcher'
3232}
3333
34+ def buildISS = { issFile ->
35+ def innoSetupBin = " $project . rootDir /develnext-tools/innoSetup/ISCC.exe" . replace(" \\ " , " /" )
36+
37+ if (System . properties[' os.name' ]. toLowerCase(). contains(' linux' )) {
38+ exec {
39+ commandLine ' wine' , innoSetupBin, ' /Qp' , issFile
40+ }
41+ } else {
42+ exec {
43+ commandLine innoSetupBin, ' /Qp' , issFile
44+ }
45+ }
46+ }
47+
48+ def makeExe = { file ->
49+ if (System . properties[' os.name' ]. toLowerCase(). contains(' windows' )) {
50+ exec {
51+ commandLine " $project . rootDir /develnext-tools/Launch4j/launch4jc.exe"
52+ args file
53+ }
54+ } else if (System . properties[' os.name' ]. toLowerCase(). contains(' linux' )) {
55+ file(" $project . rootDir /develnext-tools/Launch4jLinux/launch4j" ). setExecutable(true , true );
56+ file(" $project . rootDir /develnext-tools/Launch4jLinux/bin/windres" ). setExecutable(true , true );
57+ file(" $project . rootDir /develnext-tools/Launch4jLinux/bin/ld" ). setExecutable(true , true );
58+
59+ exec {
60+ commandLine " $project . rootDir /develnext-tools/Launch4jLinux/launch4j"
61+ args file
62+ }
63+ }
64+ }
65+
3466installDist. doLast {
3567 fileTree(" $project . buildDir /install/$project . name /lib" ). visit { FileVisitDetails el ->
3668 def name = el. getName()
@@ -158,21 +190,7 @@ task distIdeLinux(dependsOn: ['distIde']) {
158190
159191task distIde (dependsOn : [' installDist' ]) {
160192 doLast {
161- if (System . properties[' os.name' ]. toLowerCase(). contains(' windows' )) {
162- exec {
163- commandLine " $project . rootDir /develnext-tools/Launch4j/launch4jc.exe"
164- args " $project . rootDir /develnext/launcher/winLauncher.xml"
165- }
166- } else if (System . properties[' os.name' ]. toLowerCase(). contains(' linux' )) {
167- file(" $project . rootDir /develnext-tools/Launch4jLinux/launch4j" ). setExecutable(true , true );
168- file(" $project . rootDir /develnext-tools/Launch4jLinux/bin/windres" ). setExecutable(true , true );
169- file(" $project . rootDir /develnext-tools/Launch4jLinux/bin/ld" ). setExecutable(true , true );
170-
171- exec {
172- commandLine " $project . rootDir /develnext-tools/Launch4jLinux/launch4j"
173- args " $project . rootDir /develnext/launcher/winLauncher.xml"
174- }
175- }
193+ makeExe(" $project . rootDir /develnext/launcher/winLauncher.xml" )
176194
177195 copy {
178196 from " $project . rootDir /develnext-tools"
@@ -194,12 +212,13 @@ task distIde(dependsOn: ['installDist']) {
194212task distIdeWindowsSetup (dependsOn : [' distIdeWindows' ]) {
195213 doLast {
196214 def issFile = " $project . rootDir /develnext/windowsSetup/innosetup.iss" . replace(" \\ " , " /" )
197- def innoSetupBin = " $project . rootDir /develnext-tools/innoSetup/ISCC.exe" . replace(" \\ " , " /" )
198215
199- exec {
200- commandLine innoSetupBin, ' /Qp ' , issFile
216+ if ( System . properties[ ' os.name ' ] . toLowerCase() . contains( ' linux ' )) {
217+ issFile = ' windowsSetup/innosetup.iss '
201218 }
202219
220+ buildISS(issFile);
221+
203222 def uploadPath = System . getProperty(" uploadPath" , " E:/Upload/YandexDisk" )
204223
205224 if (new File (uploadPath). isDirectory()) {
0 commit comments