-
Notifications
You must be signed in to change notification settings - Fork 348
/
GeoGebraConstants.java
250 lines (200 loc) · 8.01 KB
/
GeoGebraConstants.java
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
package org.geogebra.common;
/**
* Application-wide constants (version strings, URLs)
*/
public interface GeoGebraConstants {
// GeoGebra version
// DO NOT CHANGE the format of VERSION_STRING (or add commented out version)
// as it is read by the build system
// and updated automatically by the "Version Bump" task
/** last build date */
public static final String BUILD_DATE = "25 May 2021";
/** complete version string */
public static final String VERSION_STRING = "5.0.643.0";
/** proper noun, should NOT be translated / transliterated */
public static final String APPLICATION_NAME = "GeoGebra";
/** Download update **/
public static final String DOWNLOAD_PACKAGE_WIN =
"https://download.geogebra.org/package/win";
/** App versions */
enum Version {
CAS,
GRAPHING,
GRAPHING_3D,
GEOMETRY,
SCIENTIFIC,
SUITE,
MIXED_REALITY,
NOTES
}
public enum Platform {
DESKTOP("d"),
/** GeoGebra Graphing Calculator */
ANDROID("a"),
WEB("w"),
IOS("i"),
IOS_WEBVIEW("iw"),
WEB_FOR_BROWSER_2D("w2d"),
OFFLINE("offline"),
SMART("smart"),
POWERPOINT("p");
private String name;
Platform(String name) {
this.name = name;
}
public String getName() {
return name;
}
/**
* @param prerelease
* whether we run prerelease
* @return eg X.Y.Zd-prerelease
*/
public String getVersionString(boolean prerelease, String appCode) {
StringBuilder suffix = new StringBuilder(10);
suffix.append(name);
if (!"classic".equals(appCode)) {
suffix.append(appCode);
}
if (prerelease) {
suffix.append("-prerelease");
}
// everything except old Java desktop version should be version
// 6.0.x.x
switch (this) {
default:
// change 5.0.274.0 to 6.0.274.0
return VERSION_STRING.replace("5.0.", "6.0.") + "-" + suffix;
case DESKTOP:
return VERSION_STRING + "-" + suffix;
}
}
/**
*
* @return true if this is a phone version.
*/
public boolean isPhone() {
return "i".equals(name);
}
}
enum MenuType {
DEFAULT, EXAM
}
String GRAPHING_APPCODE = "graphing";
String GEOMETRY_APPCODE = "geometry";
String G3D_APPCODE = "3d";
String SCIENTIFIC_APPCODE = "scientific";
String CAS_APPCODE = "cas";
String SUITE_APPCODE = "suite";
String CLASSIC_APPCODE = "classic";
String EVALUATOR_APPCODE = "evaluator";
String NOTES_APPCODE = "notes";
String SUITE_SHORT_NAME = "CalculatorSuite.short";
String SUITE_URL_NAME = "calculator";
/**
* used by version checker, so that sys admins can disable version checking
* for *all* ggb versions with
* HKEY_LOCAL_MACHINE/Software/JavaSoft/Prefs/geogebra/version_check_allow =
* false
*/
public static final String PREFERENCES_ROOT_GLOBAL = "/geogebra";
/** eg HKEY_CURRENT_USER/Software/JavaSoft/Prefs/geogebra42/ */
/** root preferences node */
public static final String PREFERENCES_ROOT = "/geogebra50";
/** File format version */
public static final String XML_FILE_FORMAT = "5.0";
// This is used for checking if a minor update exists (on each run):
// DON'T change to https (causes problems)
public static final String VERSION_URL_MINOR =
"https://download.geogebra.org/installers/5.0/version.txt";
// This is used for checking whether a major update exists (monthly):
// DON'T change to https (causes problems)
public static final String VERSION_URL = "https://download.geogebra.org/installers/version.txt";
public static final String INSTALLERS_URL = "https://www.geogebra.org/download";
/** Splash filename -- used for online */
public static final String SPLASH_STRING = "splash.png";
// archive
/** short version, for online archive */
public static final String SHORT_VERSION_STRING = "5.0";
// File format versions
/** XSD for ggb files */
public static final String GGB_XSD_FILENAME = "ggb.xsd";
/** XSD for ggt (macro) files */
public static final String GGT_XSD_FILENAME = "ggt.xsd";
// URLs
/** URL of GeoGebraWeb main js file (offline version) */
// public static final String GEOGEBRA_HTML5_BASE_OFFLINE =
// "web/web.nocache.js";
/** URL of GeoGebra jars */
public final static String GEOGEBRA_ONLINE_ARCHIVE_BASE = "https://jars.geogebra.org/webstart/"
+ SHORT_VERSION_STRING + "/";
/** URL of GeoGebra jars, zipped */
public static final String GEOGEBRA_ONLINE_JARS_ZIP = GEOGEBRA_ONLINE_ARCHIVE_BASE
+ "geogebra-jars.zip";
/** update directory, typically on Windows */
public static final String GEOGEBRA_JARS_UPDATE_DIR = "\\GeoGebra 5.0\\jars\\update";
/** update directory, typically on Windows */
public static final String GEOGEBRA_THIRD_PARTY_UPDATE_DIR = "\\GeoGebra 5.0"
+ "\\thirdparty\\update";
/** http prefix */
public static final String HTTP = "http://";
/** https prefix */
public static final String HTTPS = "https://";
/** GeoGebra URL */
public final static String GEOGEBRA_WEBSITE = "https://www.geogebra.org/";
/** GeoGebraTube beta URL, used when Feature.TUBE_BETA == true */
public final static String GEOGEBRA_WEBSITE_BETA = "https://beta.geogebra.org/";
public final static String TUBE_URL_SHORT = "https://ggbm.at/";
public final static String GEOGEBRA_HELP_WEBSITE = "https://help.geogebra.org/";
/** max possible heap space for applets in MB */
public final static int MAX_HEAP_SPACE = 1024;
/**
* minimal precision in LocusEquation: by default rounding is at least 4
* decimals (this changes dynamically when zooming in)
*/
public static final long PROVER_MIN_PRECISION = 10000;
/** CSS class name for GeoGebraWeb &article> tag */
public static final String GGM_CLASS_NAME = "geogebraweb";
/** mimetype of GGB files */
public static final String GGW_MIME_TYPE = "application/vnd.geogebra.file";
/** Splash timeout in miliseconds */
public static final int SPLASH_DIALOG_DELAY = 1000;
/** license URL */
public static final String GGW_ABOUT_LICENSE_URL = "https://www.geogebra"
+ ".org/license/?action=AboutLicense";
/**
* URL of the webpage to call if a file should be uploaded. If you want to
* test GeoGebra Materials uploads on a test server, use a test IP URL
* instead, e.g.: "http://140.78.116.131:8082/upload"
*/
public static final String uploadURL = "https://www.geogebra.org/upload";
public static final String uploadURLBeta = "https://beta.geogebra.org/upload";
public static final String GEOGEBRA_LOADING_PNG = "https://www.geogebra.org/images/GeoGebra_loading.png";
public static final String APPLET_PLAY_PNG = "https://www.geogebra.org/images/applet_play.png";
// //////////////////////////////////////////////////////////////////////////
// AUTHENTICATING WITH GOOGLE
// ///////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////////
/**
* This app's personal client ID assigned by the Google APIs Console
* (http://code.google.com/apis/console).
*/
public static final String GOOGLE_CLIENT_ID = "656990710877-g0tjpnhriv39e59f5s5ubs81sv2686m6"
+ ".apps.googleusercontent.com";
/**
* The Graphing Chrome app's client ID from the Google APIs Console
* (http://code.google.com/apis/console).
*/
public static final String CHROME_APP_CLIENT_ID =
"656990710877-3uu4empvnqi7co987usqk0talj3hnt2r.apps.googleusercontent.com";
// The auth scope being requested. This scope will allow the application to
// identify who the authenticated user is.
public static final String PLUS_ME_SCOPE = "https://www.googleapis.com/auth/plus.me";
public static final String DRIVE_SCOPE = "https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.readonly";
public static final String USERINFO_EMAIL_SCOPE = "https://www.googleapis.com/auth/userinfo.email";
public static final String USERINFO_PROFILE_SCOPE = "https://www.googleapis.com/auth/userinfo.profile";
public static final String API_USERINFO = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=";
public static final String FORUM_URL = "https://www.reddit.com/r/geogebra/";
public static final String EDIT_URL_BASE = "https://www.geogebra.org/material/edit/id/";
public static final String CDN_APPS = "https://cdn.geogebra.org/apps/";
}