forked from Squalr/Squally
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCopyResources.py
More file actions
39 lines (30 loc) · 1.35 KB
/
CopyResources.py
File metadata and controls
39 lines (30 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3
###################################################################################
# This script will generate the target files inside CMakeLists.txt #
# Run this script every time files are added to the Squally/Source/ directory. #
###################################################################################
from dirsync import sync
from os import listdir
from os import path
from os.path import isfile, join, splitext, abspath, relpath, realpath, basename, relpath
import os
from sys import platform as _platform
def main():
if _platform == "win32" or _platform == "win64":
copyResources()
else:
print("This script is currently Windows only.");
def copyResources():
projectRoot = abspath(join(realpath(__file__), ".."))
sourcePathPublic = join(projectRoot, "Resources/Public/")
sourcePathPrivate = join(projectRoot, "Resources/Private/")
binRoot = abspath(join(realpath(__file__), "../build/bin/"))
destPathPublic = join(binRoot, "Resources/Public/")
destPathPrivate = join(binRoot, "Resources/Private/")
doSync(sourcePathPublic, destPathPublic);
doSync(sourcePathPrivate, destPathPrivate);
def doSync(source, dest):
print("SYNCING: " + source + " => " + dest)
sync(source, dest, 'sync', create=True, content=True)
if __name__ == '__main__':
main()