forked from ProbablyManuel/requiem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ogerboss
committed
Oct 17, 2021
1 parent
2678c92
commit c295792
Showing
9 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,5 @@ components/**/bin | |
components/**/obj | ||
*.sln.DotSettings.user | ||
**/.vs/* | ||
Requiem.bsa | ||
BsaFiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
buildSrc/src/main/kotlin/skyrim/requiem/build/BsaPackingTask.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package skyrim.requiem.build | ||
|
||
import org.gradle.api.DefaultTask | ||
import org.gradle.api.GradleException | ||
import org.gradle.api.tasks.* | ||
import java.io.File | ||
|
||
open class BsaPackingTask : DefaultTask() { | ||
@OutputFile | ||
lateinit var logFile: File | ||
@OutputFile | ||
lateinit var archiveFile: File | ||
@InputDirectory | ||
lateinit var folder: File | ||
@InputFile | ||
lateinit var archiveTool: File | ||
|
||
@TaskAction | ||
fun buildBsaArchive() { | ||
val myArgs = listOf(archiveTool.absolutePath, "pack", folder.absolutePath, archiveFile.absolutePath, "-sse") | ||
val archiveTask = ProcessBuilder(myArgs) | ||
.redirectOutput(ProcessBuilder.Redirect.to(logFile)) | ||
.redirectErrorStream(true) | ||
if (archiveTask.start().waitFor() != 0) throw GradleException("BSA archive creation failed!") | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
org.gradle.warning.mode=all | ||
org.gradle.warning.mode=all | ||
org.gradle.jvmargs=-Xmx2048m |