1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-11 08:15:35 +03:00

Removed atlas outputs

This commit is contained in:
Anuken 2020-12-15 15:24:09 -05:00
parent 6ab96e2787
commit 47e321f57d
21 changed files with 27 additions and 48830 deletions

6
.gitignore vendored
View File

@ -47,6 +47,12 @@ config/
/core/assets/basepartnames
version.properties
#sprites
#core/assets/sprites/sprites*
#core/assets/sprites/fallback/
#core/assets/sprites/block_colors.png
.attach_*
## Java

View File

@ -152,3 +152,10 @@ task run(type: Exec){
def adb = path + "/platform-tools/adb"
commandLine "$adb", 'shell', 'am', 'start', '-n', 'io.anuke.mindustry/mindustry.android.AndroidLauncher'
}
if(!project.ext.hasSprites()){
println "Re-packing sprites."
run.dependsOn ":tools:pack"
assembleRelease.dependsOn ":tools:pack"
assembleDebug.dependsOn ":tools:pack"
}

View File

@ -83,6 +83,10 @@ allprojects{
return "v$buildVersion"
}
hasSprites = {
return new File(rootDir, "core/assets/sprites/sprites.atlas").exists()
}
getModifierString = {
if(versionModifier != "release"){
return "[${versionModifier.toUpperCase()}]"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 831 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 901 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -1,7 +1,5 @@
import com.badlogicgames.packr.*
import java.nio.*
import java.security.*
import com.badlogicgames.packr.Packr
import com.badlogicgames.packr.PackrConfig
sourceSets.main.java.srcDirs = [ "src/" ]
@ -11,27 +9,6 @@ project.ext.assetsDir = new File("../core/assets")
def enableTemplates = true
def JDK_DIR = "$System.env.JDK_DIR"
def ICON_DIR = new File("$rootDir/core/assets/icons/icon.icns")
def spriteHashFile = new File(project.rootDir, "build/spritehash")
def hashDirectory = {
def root = new File(project.rootDir, "core/assets-raw/sprites/")
MessageDigest digest = MessageDigest.getInstance("MD5")
ByteBuffer buffer = ByteBuffer.allocate(16)
def files = []
root.eachFileRecurse{ file ->
if(!file.name.startsWith(".")) files += file
}
files.sort()
for(File file : files){
buffer.position(0)
buffer.putLong(file.lastModified())
digest.update(buffer.array())
}
return digest.digest().encodeHex()
}
task run(dependsOn: classes, type: JavaExec){
main = project.mainClassName
@ -46,13 +23,6 @@ task run(dependsOn: classes, type: JavaExec){
jvmArgs += "-XX:+ShowCodeDetailsInExceptionMessages"
/*spriteHashFile.parentFile.mkdirs()
String spriteHash = hashDirectory()
if(spriteHashFile.exists() && spriteHashFile.text != spriteHash){
dependsOn ":tools:pack"
}
spriteHashFile.text = spriteHash*/
if(project.hasProperty("args")){
args Eval.me(project.getProperties()["args"])
}
@ -80,6 +50,12 @@ task dist(type: Jar, dependsOn: configurations.runtimeClasspath){
}
}
if(!project.ext.hasSprites()){
println "Re-packing sprites."
run.dependsOn ":tools:pack"
dist.dependsOn ":tools:pack"
}
task steamtest(dependsOn: dist){
doLast{
copy{

View File

@ -22,6 +22,8 @@ task deploy{
dependsOn createIPA
}
//must pack before deployment, as iOS does never has the latest sprites.
copyAssets.dependsOn ":tools:pack"
launchIPhoneSimulator.dependsOn build
launchIPadSimulator.dependsOn build
launchIOSDevice.dependsOn build