Permalink
Browse files

Merge pull request #4108 from javydreamercsw/CODE-3263

@javydreamercsw That worked! Code-3263
  • Loading branch information...
karianna committed Sep 19, 2018
2 parents bcb16fc + 42cc222 commit c6975539cbc300b47d60ffaa08b970d321249bda
Showing with 53 additions and 35 deletions.
  1. +1 −0 build.gradle
  2. +44 −29 code/gradle/release.gradle
  3. +1 −1 code/pcgen.sh
  4. +7 −5 installers/win-installer/pcgen.nsi
View
@@ -27,6 +27,7 @@ plugins {
id "de.undercouch.download" version '3.4.3'
id 'edu.sc.seis.launch4j' version '2.4.4'
id 'com.github.ben-manes.versions' version '0.20.0'
id 'nebula.lint' version '10.1.0'
id "com.dorongold.task-tree" version '1.3'
}
View
@@ -178,63 +178,78 @@ launch4j {
//Can't be longer than 150 characters
copyright = "PCGen's source-code is distributed under the GNU Lesser General Public License (LGPL)"
version = "${shortVerNum}"
jvmOptions = ["-Dsun.java2d.dpiaware=false"]
}
task downloadJRE doLast {
def major = 1
def micro = 8
def update = 121
def major = 10
def micro = 0
def update = 2
def extension = 'zip'
def jre64Dir = new File("${projectDir}/jre/jre_64")
def jre32Dir = new File("${projectDir}/jre/jre_32")
if(!jre64Dir.exists()){
//Only download Windows libraries. Need to add more OS if we go multi OS at any time.
def filename = "jre-${major}.${micro}.${update}-windows-x64"
def jre64URL = "http://maven.nuiton.org/nexus/content/repositories/jvm/com/oracle/jre/${major}.${micro}.${update}/${filename}.zip"
def fileName = "zulu${major}.3+5-jdk${major}.${micro}.${update}-win_x64"
def jre64URL = "https://cdn.azul.com/zulu/bin/${fileName}.zip"
println("Downloading JRE ${major}.${micro}.${update} from ${jre64URL}")
if(!jre64Dir.exists()){
download {
src jre64URL
dest new File("${projectDir}/jre/", "jre_64.${extension}")
overwrite false
}
}
//Now untar them
fileTree(dir: "${projectDir}/jre/").include("*.${extension}").each { simLib ->
copy {
println "Unzip $simLib.name"
def name = simLib.name - '.$extension'
def zipFile = file("${projectDir}/jre/${simLib.name}")
def outputDir = "${projectDir}/jre/jre_64/"
from zipTree(zipFile)
into outputDir
//Now untar them
fileTree(dir: "${projectDir}/jre/").include("*.${extension}").each { simLib ->
copy {
println "Unzip $simLib.name"
def name = simLib.name - '.$extension'
def zipFile = file("${projectDir}/jre/${simLib.name}")
def outputDir = "${projectDir}/jre/jre_64/"
from zipTree(zipFile)
into outputDir
}
if(major > 8) {
copy {
from "${projectDir}/jre/jre_64/${fileName}"
into "${projectDir}/jre/jre_64/jre"
}
project.delete(files("${projectDir}/jre/jre_64/${fileName}"))
}
new File("${projectDir}/jre/${simLib.name}").delete()
}
new File("${projectDir}/jre/${simLib.name}").delete()
}
}
if(!jre32Dir.exists()){
//Only download Windows libraries. Need to add more OS if we go multi OS at any time.
def filename = "jre-${major}.${micro}.${update}-windows-i586"
def jre32URL = "http://maven.nuiton.org/nexus/content/repositories/jvm/com/oracle/jre/${major}.${micro}.${update}/${filename}.zip"
def fileName = "zulu${major}.3+5-jdk${major}.${micro}.${update}-win_i686"
def jre32URL = "https://cdn.azul.com/zulu/bin/${fileName}.zip"
println("Downloading JRE ${major}.${micro}.${update} from ${jre32URL}")
if(!jre32Dir.exists()){
download {
src jre32URL
dest new File("${projectDir}/jre/", "jre_32.${extension}")
overwrite false
}
}
//Now untar them
fileTree(dir: "${projectDir}/jre/").include("*.${extension}").each { simLib ->
copy {
println "Unzip $simLib.name"
def name = simLib.name - '.$extension'
def zipFile = file("${projectDir}/jre/${simLib.name}")
def outputDir = "${projectDir}/jre/jre_32/"
from zipTree(zipFile)
into outputDir
//Now untar them
fileTree(dir: "${projectDir}/jre/").include("*.${extension}").each { simLib ->
copy {
println "Unzip $simLib.name"
def name = simLib.name - '.$extension'
def zipFile = file("${projectDir}/jre/${simLib.name}")
def outputDir = "${projectDir}/jre/jre_32/"
from zipTree(zipFile)
into outputDir
}
if(major > 8) {
copy {
from "${projectDir}/jre/jre_32/${fileName}"
into "${projectDir}/jre/jre_32/jre"
}
project.delete(files("${projectDir}/jre/jre_32/${fileName}"))
}
new File("${projectDir}/jre/${simLib.name}").delete()
}
new File("${projectDir}/jre/${simLib.name}").delete()
}
}
}
View
@@ -47,7 +47,7 @@ if [ $available_memory -eq $available_memory ]; then
fi
# To load all sources takes more than the default 64MB.
javaargs="-Xms${default_min_memory}m -Xmx${default_max_memory}m"
javaargs="-Xms${default_min_memory}m -Xmx${default_max_memory}m -Dsun.java2d.dpiaware=false"
while [ "x$1" != x ]
do
@@ -139,6 +139,8 @@ Section "-Local" Section4
# We no longer provide the .bat file.
# CreateShortCut "$SMPROGRAMS\PCGEN\${APPDIR}\${APPDIR}-Low.lnk" "$INSTDIR\${APPDIR}\pcgen_low_mem.bat" "" \
# "$INSTDIR\${APPDIR}\Local\PCGen.ico" 0 SW_SHOWMINIMIZED
CreateShortCut "$SMPROGRAMS\PCGEN\${APPDIR}\${APPDIR}-Bat.lnk" "$INSTDIR\${APPDIR}\pcgen.bat" "" \
"$INSTDIR\${APPDIR}\Local\PCGen.ico" 0 SW_SHOWMINIMIZED
CreateShortCut "$SMPROGRAMS\PCGEN\${APPDIR}\${APPDIR}.lnk" "$INSTDIR\${APPDIR}\pcgen.exe" "" \
"$INSTDIR\${APPDIR}\Local\pcgen2.ico" 0 SW_SHOWMINIMIZED
CreateShortCut "$SMPROGRAMS\PCGen\${APPDIR}\Convert Data.lnk" "$INSTDIR\${APPDIR}\jre\bin\javaw.exe" \
@@ -224,12 +226,12 @@ Section Uninstall
CreateDirectory "$INSTDIR\${APPDIR}_Save\customsources"
CreateDirectory "$INSTDIR\${APPDIR}_Save\settings"
CreateDirectory "$INSTDIR\${APPDIR}_Save\GMGen"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\characters\*.*" "$INSTDIR\${APPDIR}_Save\characters\"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\data\customsources\*.*" "$INSTDIR\${APPDIR}_Save\customsources\"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\*.ini" "$INSTDIR\${APPDIR}_Save\"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\settings\*.*" "$INSTDIR\${APPDIR}_Save\settings\"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\characters\*.*" "$INSTDIR\${APPDIR}_Save\characters\"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\data\customsources\*.*" "$INSTDIR\${APPDIR}_Save\customsources\"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\*.ini" "$INSTDIR\${APPDIR}_Save\"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\settings\*.*" "$INSTDIR\${APPDIR}_Save\settings\"
;Ed- This has not been tested, Please test.
CopyFiles /SILENT "$INSTDIR\${APPDIR}\plugins\Notes\*.*" "$INSTDIR\${APPDIR}_Save\GMGen\"
CopyFiles /SILENT "$INSTDIR\${APPDIR}\plugins\Notes\*.*" "$INSTDIR\${APPDIR}_Save\GMGen\"
MessageBox MB_ICONINFORMATION|MB_OK "A shortcut will be created on your desktop to the saved files."
CreateShortCut "$DESKTOP\${APPDIR}_Save.lnk" "$INSTDIR\${APPDIR}_Save"

0 comments on commit c697553

Please sign in to comment.