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
Showing
4 changed files
with
139 additions
and
96 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
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,10 +1,10 @@ | ||
{ | ||
"name" : "RampantIndustry", | ||
"factorio_version" : "1.1", | ||
"version" : "1.0.1", | ||
"version" : "1.0.2", | ||
"title" : "Rampant Industry", | ||
"author" : "Veden", | ||
"homepage" : "", | ||
"description" : "Adds advanced versions of Oil Refinery, Lab, Storage Tank, Assembler, Chemical Plant, Solar Panel, and Accumulator that are larger and more powerful than there original versions. All are configurable with settings", | ||
"description" : "Adds advanced versions of Oil Refinery, Oil Generator, Lab, Storage Tank, Assembler, Chemical Plant, Solar Panel, and Accumulator that are larger and more powerful than there original versions. All are configurable with settings", | ||
"dependencies" : ["base >= 1.1.0"] | ||
} |
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,103 +1,105 @@ | ||
(require file/zip) | ||
(require json) | ||
(require json) | ||
|
||
(define modFolder "/mnt/gallery/gameFiles/factorio/mods/") | ||
(define zipModFolder "/data/games/factorio/mods/") | ||
(define configuration (call-with-input-file "info.json" | ||
(lambda (port) | ||
(string->jsexpr (port->string port))))) | ||
(define packageName (string-append (string-replace (hash-ref configuration 'name) " " "_") | ||
"_" | ||
(hash-ref configuration 'version))) | ||
(define modFolder "/mnt/gallery/gameFiles/factorio/mods/") | ||
(define zipModFolder "/data/games/factorio/mods/") | ||
(define configuration (call-with-input-file "info.json" | ||
(lambda (port) | ||
(string->jsexpr (port->string port))))) | ||
(define packageName (string-append (string-replace (hash-ref configuration 'name) " " "_") | ||
"_" | ||
(hash-ref configuration 'version))) | ||
|
||
(define (makeZip folder) | ||
(let ((packagePath (string->path (string-append folder | ||
packageName | ||
".zip")))) | ||
(when (file-exists? packagePath) | ||
(delete-file packagePath))) | ||
(zip (string-append folder | ||
packageName | ||
".zip") | ||
#:path-prefix packageName | ||
(string->path "info.json") | ||
(string->path "control.lua") | ||
(string->path "data.lua") | ||
(string->path "thumbnail.png") | ||
(string->path "data-updates.lua") | ||
(string->path "changelog.txt") | ||
(string->path "LICENSE.md") | ||
(string->path "settings.lua") | ||
(string->path "README.md") | ||
(string->path "NOTICE") | ||
(string->path "libs") | ||
(string->path "migrations") | ||
(string->path "locale") | ||
(string->path "graphics") | ||
(string->path "prototypes"))) | ||
(define (makeZip folder) | ||
(let ((packagePath (string->path (string-append folder | ||
packageName | ||
".zip")))) | ||
(delete-directory/files (string->path (string-append folder | ||
packageName))) | ||
(when (file-exists? packagePath) | ||
(delete-file packagePath))) | ||
(zip (string-append folder | ||
packageName | ||
".zip") | ||
#:path-prefix packageName | ||
(string->path "info.json") | ||
(string->path "control.lua") | ||
(string->path "data.lua") | ||
(string->path "thumbnail.png") | ||
(string->path "data-updates.lua") | ||
(string->path "changelog.txt") | ||
(string->path "LICENSE.md") | ||
(string->path "settings.lua") | ||
(string->path "README.md") | ||
(string->path "NOTICE") | ||
(string->path "libs") | ||
(string->path "migrations") | ||
(string->path "locale") | ||
(string->path "graphics") | ||
(string->path "prototypes"))) | ||
|
||
(define (copyFile fileName modFolder) | ||
(copy-file (string->path fileName) | ||
(string->path (string-append modFolder | ||
packageName | ||
"/" | ||
fileName)))) | ||
(define (copyFile fileName modFolder) | ||
(copy-file (string->path fileName) | ||
(string->path (string-append modFolder | ||
packageName | ||
"/" | ||
fileName)))) | ||
|
||
(define (copyDirectory directoryName modFolder) | ||
(copy-directory/files (string->path directoryName) | ||
(string->path (string-append modFolder | ||
packageName | ||
"/" | ||
directoryName)))) | ||
(define (copyDirectory directoryName modFolder) | ||
(copy-directory/files (string->path directoryName) | ||
(string->path (string-append modFolder | ||
packageName | ||
"/" | ||
directoryName)))) | ||
|
||
(define (copyFiles modFolder) | ||
(let ((packagePath (string->path (string-append modFolder | ||
packageName)))) | ||
(when (directory-exists? packagePath) | ||
(delete-directory/files packagePath)) | ||
(sleep 0.1) | ||
(make-directory packagePath) | ||
(copyFile "control.lua" modFolder) | ||
(copyFile "info.json" modFolder) | ||
(copyFile "data.lua" modFolder) | ||
(copyFile "data-updates.lua" modFolder) | ||
(copyFile "LICENSE.md" modFolder) | ||
(copyFile "thumbnail.png" modFolder) | ||
(copyFile "changelog.txt" modFolder) | ||
(copyFile "settings.lua" modFolder) | ||
(copyFile "NOTICE" modFolder) | ||
(copyDirectory "libs" modFolder) | ||
(copyDirectory "migrations" modFolder) | ||
(copyDirectory "locale" modFolder) | ||
(copyDirectory "graphics" modFolder) | ||
(copyDirectory "prototypes" modFolder))) | ||
(define (copyFiles modFolder) | ||
(let ((packagePath (string->path (string-append modFolder | ||
packageName)))) | ||
(when (directory-exists? packagePath) | ||
(delete-directory/files packagePath)) | ||
(sleep 0.1) | ||
(make-directory packagePath) | ||
(copyFile "control.lua" modFolder) | ||
(copyFile "info.json" modFolder) | ||
(copyFile "data.lua" modFolder) | ||
(copyFile "data-updates.lua" modFolder) | ||
(copyFile "LICENSE.md" modFolder) | ||
(copyFile "thumbnail.png" modFolder) | ||
(copyFile "changelog.txt" modFolder) | ||
(copyFile "settings.lua" modFolder) | ||
(copyFile "NOTICE" modFolder) | ||
(copyDirectory "libs" modFolder) | ||
(copyDirectory "migrations" modFolder) | ||
(copyDirectory "locale" modFolder) | ||
(copyDirectory "graphics" modFolder) | ||
(copyDirectory "prototypes" modFolder))) | ||
|
||
|
||
(define (copy) | ||
(set! configuration (call-with-input-file "info.json" | ||
(lambda (port) | ||
(string->jsexpr (port->string port))))) | ||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_") | ||
"_" | ||
(hash-ref configuration 'version))) | ||
(define (copy) | ||
(set! configuration (call-with-input-file "info.json" | ||
(lambda (port) | ||
(string->jsexpr (port->string port))))) | ||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_") | ||
"_" | ||
(hash-ref configuration 'version))) | ||
|
||
(print (string-append "copying " (hash-ref configuration 'name) (hash-ref configuration 'version))) | ||
(copyFiles modFolder)) | ||
(print (string-append "copying " (hash-ref configuration 'name) (hash-ref configuration 'version))) | ||
(copyFiles modFolder)) | ||
|
||
(define (zipIt) | ||
(set! configuration (call-with-input-file "info.json" | ||
(lambda (port) | ||
(string->jsexpr (port->string port))))) | ||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_") | ||
"_" | ||
(hash-ref configuration 'version))) | ||
(define (zipIt) | ||
(set! configuration (call-with-input-file "info.json" | ||
(lambda (port) | ||
(string->jsexpr (port->string port))))) | ||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_") | ||
"_" | ||
(hash-ref configuration 'version))) | ||
|
||
(print (string-append "zipping " (hash-ref configuration 'name) (hash-ref configuration 'version))) | ||
(makeZip modFolder)) | ||
|
||
(print (string-append "zipping " (hash-ref configuration 'name) (hash-ref configuration 'version))) | ||
(makeZip modFolder)) | ||
|
||
(define (runStart) | ||
;; (copyFiles modFolder) | ||
;;(copyFiles zipModFolder) | ||
(makeZip modFolder) | ||
(system*/exit-code "factorio")) | ||
(define (runStart) | ||
;; (copyFiles modFolder) | ||
;;(copyFiles zipModFolder) | ||
(makeZip modFolder) | ||
(system*/exit-code "factorio")) | ||
|
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