-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
86 lines (70 loc) · 2.25 KB
/
build.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
export PATH=${PATH}:~/apache-maven-3.6.3/bin:~/apache-ant-1.10.9/bin
export MAVEN_OPTS="-Xmx16g" # " -XX:MaxPermSize=128m"
export JAVA_HOME="C:/graalvm-jdk-22_windows-x64_bin/graalvm-jdk-22+36.1"
# export JAVA_HOME="C:/Users/john/Downloads/openjdk-21_windows-x64_bin/jdk-21"
# export PYTHONPATH=${PYTHONPATH}:/usr/lib/python3/dist-packages/pkg_resources/:/usr/lib/python3/dist-packages
# source venv/Scripts/activate
# bring in source from sourceforget
pushd /c/x3d-code/www.web3d.org
svn up .
popd
# copy code to X3DJSONLD locations
cp /c/x3d-code/www.web3d.org/specifications/X3dUnifiedObjectModel-* src/specifications
# build X3DJSAIL
pushd /c/x3d-code/www.web3d.org/x3d/stylesheets
ant create.X3DJSAIL
cp java/jars/*.jar /c/Users/john/pythonSAI
mvn install:install-file -Dfile=/c/Users/john/pythonSAI/X3DJSAIL.4.0.full.jar -DgroupId=org.web3d.x3d -DartifactId=X3DJSAIL -Dversion=4.0.full -Dpackaging=jar
mvn install:install-file -Dfile=/c/Users/john/X3DJSONLD/saxon-he-12.4.jar -DgroupId=net.sf.saxon -DartifactId=SAXON-HE -Dversion=12.4 -Dpackaging=jar
popd
# copy stylesheets
cp /c/x3d-code/www.web3d.org/x3d/stylesheets/*.xslt src/main/lib/stylesheets
# compile stylesheet
node_modules/.bin/xslt3 -t -xsl:src/main/lib/stylesheets/X3dToJson.xslt -export:src/main/lib/stylesheets/X3dToJson.sef.json -nogo
# install python3.11 packages
# sudo apt-get install python3-bs4
# sudo apt-get install python3-lxml
pip3 install bs4
pip3 install lxml
pip3 install pyjnius
pip3 install fastjsonschema
pip3 install jsonschema
pip3 install jschon
pip3 install xmlschema
pip3 install x3d
pip3 install xmlschema
# generate schemas
# pushd src/main/shell
# bash generateSchema.sh
# popd
pushd src/main/python
py generateSchemas.py
popd
# generate helpful JavaScript classes
pushd src/main/python
py autoclass.py
# py classes.py
py nodeclasses.py
py fieldTypesGenerator.py
py mapToMethodGenerator.py
popd
# copy to another location
pushd src/main/node
cp X3Dautoclass.js net/x3djsonld/data
popd
# install needed packages
npm install xml2js
npm un ajv-formats && npm i ajv-formats
# maven build
mvn clean install
# gradle clean
bash FixNeedClassName.sh
mvn install
# gradle build
echo Press Return to Continue
read
# build */net/coderextreme/data/*
pushd src/main/shell
bash local.sh
popd