forked from window-maker/dockapps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
396 lines (281 loc) · 13.3 KB
/
README
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
WMGlobe 1.3 - The Whole Earth spinning on you desktop... as a dockable app
Copyright (C) 1998,99,2000,01 Jerome Dumonteil <[email protected]>
This program is licensed under the terms of the GNU GPL, see below.
Description
----------------------------------------
WMGlobe is a WindowMaker dock.app that displays the earth on an icon. It's
an adaptation of XGlobe to WMaker environnement. WMGlobe uses a map which is
rendered on a sphere by raytracing. Yes, for a 64x64 pixel result :-)
Installation
----------------------------------------
You need WindowMaker to build WMGlobe. WMGlobe needs libwraster to compile,
this lib is built by WindowMaker. No more need at run time if statically
linked, but then, you need WindowMaker to get the full magic :-)
Warning : this version won't work with WindowMaker < 0.62
Before compiling, you must have the required development libraries.
On Ubuntu/Debian/Devuan based distros, install via:
sudo apt-get install -y libwmaker-dev libdockapp-dev libwraster-dev
# libwmaker-dev also installs libwmaker1
1.
Poikilos (autotools input files author) says:
If you are using a git version run:
./autogen.sh # generate a new configure script
# then skip to step 2
Extract and compile a packaged version:
tar -xvzf wmglobe-1.3.tar.gz
cd wmglobe-1.3
2.
./configure && make
3.
then move wmglobe in /usr/local/bin and man page somewhere or do
(as root) :
make install
If it doesn't work, look for the graphic libraries.
The old Makefile (Makefile.old) is "quite crude" says the original author.
Sun the following to generate a new one:
./autogen.sh # or autoreconf --verbose --install --force # or autoreconf -vfi
# requires: autoreconf automake
WMGlobe is developped on Linux (WMaker 0.65.1 and linux 2.4.x/ix86).
If you are successful on other platforms, please tell me so.
Platforms with successful build reported (wmglobe 1.0 for older WMaker):
(Poikilos says: ./autogen.sh should automatically set -lungif or -lgif
in the resulting Makefile, so changing it manually as noted below
shouldn't be necessary.)
* NetBSD 1.3.2 / SPARC (wmaker 0.20.3) , with Makefile adaptations for libs
* Linux 2.0.36 / RedHat 5.1
* Linux 2.0.36 / SuSE 5.3 (wmaker 0.20.3) , -lungif -> -lgif
* Linux 2.0.36 / RedHat 5.2 (wmaker 0.53)
* Linux 2.2.0-pre4 / Debian :-)
* FreeBSD-3.0 with -ltiff -> -ltiff34 and -lungif -> -lgif
* Solaris 2.6 / Sun Sparc (wmaker 0.20.3) , with Makefile adaptations for libs
* AIX 4.2.1 / IBM RS/6000-250 (wmaker 0.50.2)
* Linux 2.3.14 / Mandrake (wmaker but also blackbox !)
* LinuxPPC 1999
* Linux 2.2.10 / Alpha (wmglobe 1.1+)
RPM & DEBIAN linux packages coming soon. Or you can directly use the binary.
compile time problems :
Xlib.h, Xpm.h ... :
If you compile wmglobe on a computer installed with packages (.rpm), you may
lack of these header files. Just install the "xxx-dev.rpm" packages for XFree86
and graphics libs, or install a rpm version of wmglobe.
libwraster :
WindowMaker 0.20.3 uses a libwraster.a , so if you use it, you can execute
the binary on a computer without WindowMaker on it, and displaying on a
remote computer (this one using WindowMaker). WM > 0.51.0 creates a dynamic
libwraster.so, so it's necessary to have it on the computer running wmglobe
if you buit WMGlobe with this one. Both versions of WMGlobe run on WM 0.20.3
and 0.51.0
For wmglobe 1.2+, you need WMaker 0.62 or more recent. And wmglobe 1.0 won't
run on these recent versions of WindowMaker. You need to have wraster.h
in the include path to compile wmglobe.
For wmglobe 1.3+, you probably need WMaker 0.64 or more recent.
graphic libs :
you can use libgif or libungif. If your version of WindowMaker is built
without support for some graphic type, you don't need it (just remove it
from the makefile).
This problem may happen with RedHat 5.2, if you get this kind of message,
just add a libtiff to your system :
/usr/local/lib/libwraster.so: undefined reference to `TIFFReadDirectory'
...
make: *** [wmglobe] Error 1
compile time options :
You can modify the file wmgoption.h where many options are set up in defines :
To disable the builtin default map, just comment out the line in wmgoptions.h
#define DEFMAPOK
to remove the shift+left/left method of rotate earth, uncomment the lines
#define MOUSE_LAT_FULL
you can also suppress some options screen in wmgoption.h (or even suppress
new features of wmglobe 1.2)
Maps
----------------------------------------
Like XGlobe, WMGlobe needs a longitude/latitude map to work. By default,
it uses a low quality built-in map of earth. But you will probably want
to use better ones.
You can get maps usable with WMGlobe on the net. See the LINKS chapter.
using custom maps :
- For the image to be mapped correctly, position 0°North 0°West must be in
the center of the image and the latitude must be linear from 90°N to 90°S.
- You can safely use a night map of different size than the day map.
By the way, you can use maps of Mars, Luna ... and text.
Configuration options
----------------------------------------
Configuration is done through command line options.
-v version
-h short help
-zoom zoom_value Value > 1 to magnify the view, value < 1 to lower.
Default : 1.0
-pos latitude long. Initial viewing fixed at this position, don't follow
the sun rotation. Accepted values in the form
45°12'36 or 45.21 or 45:12:36
Default : the initial position is "under" the sun, and
the point of view follows the sun.
-sun The point of view follows the Sun (default).
-moon The point of view follows the Moon (i.e. you see the
Earth as you were on the Moon).
-rand New random position at every refresh of screen
-map map_file Map used for the rendering. Can be JPEG, GIF, XPM
PNM, TIFF but none BMP
Default : use internal map of earth.
-nimap night_file Map used for the dark side of the earth. Must be of
the same width x height as the day side map.
Default : if the default internal day map is used, use
a default internal night file (see -nonimap option).
-defnimap Use the default night map (with a custom map).
-nonimap Don't use the default night map.
-delay seconds Time in seconds between each calculation of a new
position. Limited to 0.04 at compile time (25 frames
per second should be enough). The sun position move
only once per minute, so if you use wmglobe without
-dlong or -accel option, the CPU cost of WMGlobe is
*very* low. The use of very low value for -delay plus
-dlong and -accel can be CPU costly (but very nice...)
Default : 1.0 sec.
-dlat delta_latitude Move the point of view by delta_lat degrees per second,
with a value of 6 the earth make a full rotation in
one minute. The value can be formated as -pos option.
Default : 0°0'0
-dlong delta_long Move the point of view by delta_long degrees per
second. With a value of -0°0'15" the earth make a full
rotation in 24 hours toward the west. By default,
-dlong and -dlat are null. If they are used, the view
follow their values. Going back to "follow sun" mode
in parameters screen put -dlat and -dlong to zero.
-light light_value Level of light of the dark side when there is no
night map, from 0 to 1.
Default : 0.25
-dawn dawn_value Level of continuity for dawn limit, from 0 to 1. With
a value of 1, the border line between night and day is
at maximum contrast.
Default : 0.2
-bord border_num 0 1 or 2. There are 3 different borders for the icon.
Default : 0
-accel time_multi Time warp factor. With -accel 24, the sun make a full
rotation in one hour (or the earth, I'm not sure).
Default : 1.0
-time seconds Time to display in seconds since 01-01-1970 (see the
date command). Necessary if you need to be sure that
WMGlobe is Y2K compliant without changing system time.
Negative values for dates before 1970 accepted.
Default : not set, use current time.
-mk latitude long. Put a fixed marker at latitude/longitude.
-mk sun : put a marker under the Sun position.
-mk moon : put a marker under the Moon.
5 markers can be defined simultaneously, so you can
use wmglobe to predict when Moon will meet the Sun :-)
-fun dx dy Move the earth image by dx dy pixels in the icon. See
puzzle.sh to understand why.
-oz Start in "austral" mode (for "down under" people)
-stable Keep the globe from going over the poles.
-d display Select another display
-w -shape Useless, since it is set by default (WMaker dockable
application)
mouse :
left button Change longitude while pressed, change longitude &
latitude if shift+left button.
middle button Zoom in, shift + middle button : zoom out
right button Displays 7 screens of parameters. On every screen, just
clic with left or right button on the figures to change
their value. The TIME screen shows an approximation
of date and time of the earth zone currently displayed,
using GMT time + longitude offset, it's close to the
real local time by one or two hours. Others options
don't need more help. Intuitive they said...
Links : Some sites dealing with WindowMaker
-------------------------------------------
Official Window Maker Website :
http:https://www.windowmaker.org/
The Dock App Warehouse :
http:https://www.bensinclair.com/dockapp/
Links : Where to find maps and similar softs
--------------------------------------------
where to find the sources of wmglobe :
http:https://perso.linuxfr.org/jdumont/wmg/wmglobe-1.0.tar.gz
the web page of WMGlobe (made by Sylvestre Taburet) :
http:https://perso.linuxfr.org/jdumont/wmg/
where to find maps and similar softs :
Earth image by a cgi :
http:https://www.fourmilab.ch/cgi-bin/uncgi/Earth
two softs running under X :
XGlobe Homepage: http:https://www.uni-karlsruhe.de/~uddn/xglobe
(the recent 0.2 version brings a very nice map of earth)
Xearth Homepage: http:https://www.cs.colorado.edu/~tuna/xearth/
For the maps XGlobe doc says :
« WHERE TO GET MAPS:
1. LivingEarth Inc.
http:https://livingearth.com/LE/LivEarthImg.html
http:https://livingearth.com/LE/BrillEarthImg.html
Livingearth Inc. has some nice (day and night) images on their web pages.
With these you can test the -nightmap option of XEarth. Unfortunately
they are pretty low-res (400x200).
You can find a higher-resolution (but heavily compressed) version of this
day map at the "Earth View" page:
http:https://www.fourmilab.ch/cgi-bin/uncgi/Earth
Check "No night" and set display to "map", then save the image.
2. NOAA NGDC Marine Geology & Geophysics
http:https://www.ngdc.noaa.gov:80/mgg/image/mggd.gif
This image is definitely not "photo-realistic" but nonetheless pretty
interesting. It also has a rather high resolution. »
Todo
----------------------------------------
- add interface module to allow plugins
- test on different platforms, better makefile
- changing map "on the fly", map generator, clouds generator...
- must work on every current WindowMaker platform (hug...)
- rewrite some ugly things in the code
- see how to minimize CPU load
- feature : load a local detailed map of some part of the globe when zooming
(country maps, city maps)
- maybe port to other window manager
Bugs
----------------------------------------
- Wmglobe depends on WindowMaker version
- The Makefile
- if you use the --enable-single-icon compile time option of WindowMaker,
you can not display more than one WMGlobe.
- WMGlobe hopes that an overflow of a long integer dont generate an error
and that LONG_MAX +1 = LONG_MIN . This happens with high values of -accel
when the date go over year 2038. The expected result is wmglobe
continuing smoothly from 1901.
- Using WMGlobe at high speed through a LAN may induce some load on the net.
License
----------------------------------------
WMGlobe is Copyright (C) 1998,99,2000,2001 by Jerome Dumonteil and licensed
through the GNU General Public License.
Read the COPYING file for the complete GNU license.
Credits
----------------------------------------
Original idea, tests, logos : Sylvestre Taburet <[email protected]>
WindowMaker 0.62 fix : Charles G Waldman <[email protected]>
The code in 'sunpos.cpp' is taken from Xearth by Kirk Lauritz Johnson.
(Actually, it uses now the 1.1 version of Xearth)
/*
* sunpos.c
* kirk johnson
* july 1993
*
* code for calculating the position on the earth's surface for which
* the sun is directly overhead (adapted from _practical astronomy
* with your calculator, third edition_, peter duffett-smith,
* cambridge university press, 1988.)
*
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <[email protected]>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*/
The rendering engine is taken from XGlobe by Thorsten Scheuermann
XGlobe Homepage: http:https://www.uni-karlsruhe.de/~uddn/xglobe
Raster graphics library by Alfredo K. Kojima, & stuff of Window Maker
<http:https://windowmaker.org> by A. K. Kojima, Dan Pascu, Matthew Hawkins & team
Feedback
----------------------------------------
For your questions, bugs, remarks, please contact our representative on
planet Earth : jerome dumonteil <[email protected]>