forked from NASAWorldWind/WorldWindJava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
refresh-jogl.py
executable file
·29 lines (25 loc) · 1.02 KB
/
refresh-jogl.py
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
#!/usr/bin/python3
import sys
from pathlib import Path
import shutil
# Script to update WWJ JOGL libs from a new jogamp-all-platforms.7z unpacked distribution.
# Example: ./refresh-jogl.py ../../downloads/jogamp-all-platforms/jar
if len(sys.argv)<2:
print('Usage: refresh-jogl.py [path to jars]')
sys.exit(1)
srcPath=sys.argv[1]
jogl_jars=['gluegen-rt.jar','gluegen-rt-natives-linux-amd64.jar','gluegen-rt-natives-macosx-universal.jar','gluegen-rt-natives-windows-amd64.jar', \
'jogl-all.jar','jogl-all-natives-linux-amd64.jar','jogl-all-natives-macosx-universal.jar','jogl-all-natives-windows-amd64.jar']
for jar in jogl_jars:
srcJar=srcPath+'/'+jar
destJar='./'+jar
print(srcJar, ' => ', destJar)
shutil.copyfile(srcJar,destJar)
jogl_txts=['jogl.README.txt','jogl.LICENSE.txt','gluegen.LICENSE.txt']
folderIdx=srcPath.rfind('/')
txtPath=srcPath[:folderIdx]
for txt in jogl_txts:
srcTxt=txtPath+'/'+txt
destTxt='./'+txt
print(srcTxt, ' => ', destTxt)
shutil.copyfile(srcTxt,destTxt)