Subversion Repositories wimsdev

Rev

Rev 14710 | Go to most recent revision | 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
 
11
* [H1/geometry/OEFtriang5.fr](http://localhost/wims/wims.cgi?module=H1/geometry/OEFtriang5.fr&cmd=new&exo=constr1)
12
* [H3/geometry/oefprogpythag.fr](http://localhost/wims/wims.cgi?module=H3/geometry/oefprogpythag.fr&cmd=new&exo=experim)
13
* [U1/geometry/docisometriesplan.fr](http://localhost/wims/wims.cgi?module=U1%2Fgeometry%2Fdocisometriesplan.fr&+cmd=new&+job=read&+doc=1&+block=mainS2S1S1)
14
* [H5/geometry/vecteurs.fr](http://localhost/wims/wims.cgi?module=H5%2Fgeometry%2Fvecteurs.fr&cmd=new&job=read&doc=1&block=mainS1S1)
15
 
12542 obado 16
---
11759 obado 17
# [WIMS DEV] Upgrading GeogebraWeb Library :
16660 obado 18
[](https://wiki.geogebra.org/en/Reference:GeoGebra_Apps_Embedding#Offline_and_Self-Hosted_Solution)
11759 obado 19
 
11340 obado 20
## Download new version
21
 
16660 obado 22
* Download the latest GGB bundle at [dev.geogebra.org/download/web](http://dev.geogebra.org/download/web/)
23
    * 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 24
 
12542 obado 25
* unzip it and use its content to replace the geogebraweb folder
11340 obado 26
 
27
## Modify "deployggb.js"
16660 obado 28
replace your deployggb.js by the one included in the zip you just downloaded
11340 obado 29
 
30
## Adapt GGB code for WIMS
31
 
32
### Hack WIMS 1 :
11759 obado 33
GGB use it's own hosted library. To use WIMS included GGB version, replace the original *getTubeURL()* geogebra function in *deployggb.js* by this:
11340 obado 34
 
35
    var getTubeURL = function() {
36
        return "scripts/js/geogebra/geogebraweb/";
37
     };
11759 obado 38
nb : the original `getTubeURL` function finish by `return tubeurl};`
11340 obado 39
 
40
### Hack WIMS 2 :
12542 obado 41
Then, replace in "deployggb.js" `codebase="https://cdn.geogebra.org/apps/"+latestVersion+"/"`
11340 obado 42
 by `codebase = getTubeURL();`
43
 
44
### Hack WIMS 3 :
16660 obado 45
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 46
 
47
	d.charset='utf-8';
48
 
12542 obado 49
just before something like this:
11340 obado 50
 
12542 obado 51
	d.src=e+'js/properties_keys_'
14710 obado 52
 
12542 obado 53
Don't forget to clean your browser cache, and then
11340 obado 54
 
16660 obado 55
## Test the new version on existing modules
56
samples of exercices to be tested :
57
* [H2/geometry/oefevalwimssym.fr](//localhost/wims/?cmd=new&module=H2/geometry/oefevalwimssym.fr&exo=conservation2)
58
* [H4/geometry/anglesCercleTrigo.fr](//localhost/wims/?cmd=new&module=H4%2Fgeometry%2FanglesCercleTrigo.fr)
59
 
11340 obado 60
## Publish new GGBWeb version into WIMS
61
* duplicate your geogebraweb folder
12542 obado 62
* rename it "GeoGebraWeb-WIMS-5.X.YYY.0", so it contains the new version number
11340 obado 63
* zip it
14710 obado 64
* If you'r on MacOS X :
12542 obado 65
	* `for file in *.zip; do zip "$file" -qd "__MACOSX/*"; done`
14710 obado 66
* send it to wims.univ-cotedazur.fr/download server (ask his administrator [bado@unice.fr](mailto:bado@unice.fr))
11340 obado 67
* Update the variable vGeogebra in the ./compile file at WIMS root, so it contains the new Geogebra number version
68
* remove the duplicated folder and the zip archive
69
 
70
## See More...
71
Nb : if you're curious to see non-obfuscated geogebra code, you have to follow these explanations :
14710 obado 72
[dev.geogebra.org/trac/wiki/SetUp](https://dev.geogebra.org/trac/wiki/SetUp)