Subversion Repositories wimsdev

Rev

Rev 16660 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11759 obado 1
# [WIMS USER] Updating GeogebraWeb Library :
11340 obado 2
 
11759 obado 3
If you want tu use the latest ggb library adaptated to your WIMS version, just update your Geogebraweb-WIMS:
11340 obado 4
 
11759 obado 5
	./compile --geogebra
6
 
7
# Test your GeogebraWeb Installation
12542 obado 8
There are several WIMS modules using GegebraWeb.
11759 obado 9
You can test for example one of these:
10
 
18584 obado 11
## mode "web3d":
11759 obado 12
* [H1/geometry/OEFtriang5.fr](http://localhost/wims/wims.cgi?module=H1/geometry/OEFtriang5.fr&cmd=new&exo=constr1)
18584 obado 13
* [H2/geometry/oefevalwimssym.fr](http://localhost/wims/?cmd=new&module=H2/geometry/oefevalwimssym.fr&exo=conservation2)
11759 obado 14
* [H3/geometry/oefprogpythag.fr](http://localhost/wims/wims.cgi?module=H3/geometry/oefprogpythag.fr&cmd=new&exo=experim)
15
* [U1/geometry/docisometriesplan.fr](http://localhost/wims/wims.cgi?module=U1%2Fgeometry%2Fdocisometriesplan.fr&+cmd=new&+job=read&+doc=1&+block=mainS2S1S1)
16
 
18584 obado 17
 
18
## mode "webSimple":
19
* [H5/geometry/vecteurs.fr](http://localhost/wims/wims.cgi?module=H5%2Fgeometry%2Fvecteurs.fr&cmd=new&job=read&doc=1&block=mainS1S1) 
20
 
21
 
12542 obado 22
---
11759 obado 23
# [WIMS DEV] Upgrading GeogebraWeb Library :
18584 obado 24
[Self-Hosted solution](https://wiki.geogebra.org/en/Reference:GeoGebra_Apps_Embedding#Offline_and_Self-Hosted_Solution)
11759 obado 25
 
11340 obado 26
## Download new version
27
 
16660 obado 28
* Download the latest GGB bundle at [dev.geogebra.org/download/web](http://dev.geogebra.org/download/web/)
18584 obado 29
ou lien direct (latest) ==> https://download.geogebra.org/package/geogebra-math-apps-bundle
16660 obado 30
    * Usually, it is the [geogebra-math-apps-bundle-5-xxx.zip](https://dev.geogebra.org/download/web/geogebra-math-apps-bundle-5-0-700-0.zip)
11340 obado 31
 
18584 obado 32
* unzip it and use the content of HTML5/5.0 to replace the geogebraweb folder
11340 obado 33
 
34
## Modify "deployggb.js"
16660 obado 35
replace your deployggb.js by the one included in the zip you just downloaded
11340 obado 36
 
37
## Adapt GGB code for WIMS
38
 
39
### Hack WIMS 1 :
18584 obado 40
GGB use it's own hosted library. To use WIMS included GGB version, replace the original *codebase* URL in *deployggb.js* by this:
11340 obado 41
 
18584 obado 42
    codebase="https://www.geogebra.org
11759 obado 43
nb : the original `getTubeURL` function finish by `return tubeurl};`
11340 obado 44
 
45
### Hack WIMS 2 :
18584 obado 46
Then, replace in "deployggb.js" `webModule.__moduleBase="https://www.geogebra.org..."+name+"/";`
47
 by `webModule.__moduleBase="scripts/js/geogebra/geogebraweb/"+name+"/";`
11340 obado 48
 
49
### Hack WIMS 3 :
16660 obado 50
Since WIMS 4.x still use ISO-xxx charsets (not UTF-8), you must add this to each geogebra "####.cache.js" files (web/ & web3d/):
11340 obado 51
 
18584 obado 52
1. first search for string "js/properties_keys"
53
2. when found, find the function associated "D2l(d+'js/pr..." => D2l
54
3. search this function, like "function D2l("
55
4. add a "c.charset='utf-8';" after the creatElement(...)
11340 obado 56
 
57
 
12542 obado 58
Don't forget to clean your browser cache, and then
11340 obado 59
 
16660 obado 60
## Test the new version on existing modules
18584 obado 61
See the [WIMS USER] section for samples of exercices to be tested.
16660 obado 62
 
11340 obado 63
## Publish new GGBWeb version into WIMS
64
* duplicate your geogebraweb folder
12542 obado 65
* rename it "GeoGebraWeb-WIMS-5.X.YYY.0", so it contains the new version number
11340 obado 66
* zip it
14710 obado 67
* If you'r on MacOS X :
18584 obado 68
	* `for file in *.zip; do zip "$file" -d "__MACOSX/*"; done`
69
    * `for file in *.zip; do zip "$file" -d "\*/.DS_Store"; done`
14710 obado 70
* send it to wims.univ-cotedazur.fr/download server (ask his administrator [bado@unice.fr](mailto:bado@unice.fr))
11340 obado 71
* Update the variable vGeogebra in the ./compile file at WIMS root, so it contains the new Geogebra number version
72
* remove the duplicated folder and the zip archive
73
 
74
## See More...
75
Nb : if you're curious to see non-obfuscated geogebra code, you have to follow these explanations :
14710 obado 76
[dev.geogebra.org/trac/wiki/SetUp](https://dev.geogebra.org/trac/wiki/SetUp)