Merge pull request #341 from cmmartti/windows_build_script

Fix v2 database build script to work on Windows
This commit is contained in:
Alessandro Pezzè 2018-06-04 13:33:49 +02:00 committed by GitHub
commit 6cac759270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

3
.gitignore vendored
View file

@ -5,4 +5,5 @@
*.DS_STORE
db.*
venv*
node_modules
node_modules
.vscode

View file

@ -39,7 +39,9 @@ imageDir = os.getcwd() + '/data/v2/sprites/'
resourceImages = []
for root, dirs, files in os.walk(imageDir):
for file in files:
resourceImages.append(os.path.join(root.replace(imageDir, ""), file))
image_path = os.path.join(root.replace(imageDir, ""), file)
image_path = image_path.replace("\\", "/") # convert Windows-style path to Unix
resourceImages.append(image_path)
mediaDir = '/media/sprites/{0}'