Skip to content

Commit bce02c7

Browse files
authored
Merge pull request #115 from mike632t/unstable
Merge changes from unstable
2 parents 8f506c9 + eb7440d commit bce02c7

File tree

8 files changed

+333
-170
lines changed

8 files changed

+333
-170
lines changed

README.md

+29-18
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ Tru64 Unix.
8383

8484
The simulator has been successfully compiled and tested on:
8585

86+
- Alpine 3.20, gcc 13.2.1, x64 + arm64
87+
8688
- Alpine 3.19, gcc 13.2.1, x64 + arm64
8789

8890
- Debian 12 (Bookworm), clang 14.0.6, x64 + arm64
@@ -158,11 +160,11 @@ If you install the simulator on most modern desktops it should create a new
158160
menu entry that will start the launcher script by default. When invoked for
159161
the first time this will prompt you to select the default simulator as well
160162
as any additional command line options. These selections will be saved and
161-
used in future.
163+
the selected simulator will become the new default.
162164

163-
On some desktop environments it is also possible to right click on the menu
164-
icon which will display a sub-menu that will allow you to select a specific
165-
model directly as well as change the default model and options.
165+
When using some desktop environments (like GNOME and KDE) it is possible to
166+
access a sub-menu that will allow you to select a specific model as well as
167+
change the default settings by right clicking on the menu icon.
166168

167169
#### Keyboard Shortcuts
168170

@@ -218,6 +220,12 @@ For models with a 'sliding' On/Off switch clicking on the switch will turn
218220
the simulator on or off, but if when switching off you hold down the switch
219221
down for two seconds the program will exit.
220222

223+
#### Window Size
224+
225+
The size of the simulator window can be adjusted from the command line with
226+
the `--zoom ZOOM` option, where the value for ZOOM can be in the range zero
227+
to four (0-4).
228+
221229
#### Debugging
222230

223231
You can start the simulation in trace mode using '-t', or in single step
@@ -369,7 +377,12 @@ make DESTDIR=/tmp/staging install
369377
### Using a pre-compiled package <sup>[Back to Top](#top)</sup>
370378

371379
If you don't want to download an compile the sources yourself you can use a
372-
pre-compiled binary package from [Flathub](https://flathub.org/apps/io.github.mike632t.x11-calc) using Flatpak.
380+
pre-compiled binary package compatible with most distros from [Flathub](https://flathub.org/apps/io.github.mike632t.x11-calc) using Flatpak.
381+
382+
A native binary package is also available on Alpine Linux 3.20 release.\
383+
If x11 is not already installed, add it as standalone (`setup-xorg-base`) or together with a standard desktop (`setup-desktop`).\
384+
Make sure `community` repo is enabled and then install with `apk add x11-calc`.\
385+
To leverage GUI for setup, install `apk add zenity`. Optional program saves may be installed with `apk add x11-calc-prg`.
373386

374387
<a id="issues"></a>
375388
### Known Issues <sup>[Back to Top](#top)</sup>
@@ -385,10 +398,6 @@ pre-compiled binary package from [Flathub](https://flathub.org/apps/io.github.mi
385398

386399
- Keyboard test is successful but these models do not pass the self-test.
387400

388-
##### HP 29C
389-
390-
- All 30 registers have continuous memory.
391-
392401
##### HP 37E
393402

394403
- Fails self-test.
@@ -426,21 +435,23 @@ on Xwayland the window manager does not handle this correctly.
426435
### Acknowledgements <sup>[Back to Top](#top)</sup>
427436

428437
There are almost certainly some names I've missed off this list but without
429-
the help and encouragement from a multiple it is unlikely that this project
430-
would have happened at all or that it would got as far as it has.
438+
the help and encouragement from several members of the calculator community
439+
it is unlikely that this project would have happened at all or that I would
440+
have managed to get as far as I have.
431441

432-
- `Teenix` for convincing me that it was possible in the first place and help
433-
since (at least I think I glad he did).
442+
- `Teenix` for convincing me that it was possible in the first place.
434443

435-
- `Teenix/Panamatik` for their excellent simulators from which I was able to
436-
figure out most of what should happen when each instruction is executed.
444+
- `Teenix` and `Panamatik` for their excellent simulators from which I was able
445+
to figure out most of what should happen when each instruction is executed.
437446

438447
- `Agarza` for providing the details of the voyager displays.
439448

440-
- `Macmpi` for completely rewriting the makefiles creating a Flatpak package the simulator
441-
for Flatpak and for packaging and testing the simulators on Alpine Linux.
449+
- `Macmpi` for completely rewriting the makefiles and packaging the simulator
450+
for Flatpak.
451+
452+
- `Macmpi` for packaging and testing the simulators on Alpine Linux
442453

443-
- `Agarza/Martin HEPPERLE` for translating the help text.
454+
- `Agarza` and `Martin HEPPERLE` for translating the help text.
444455

445456
- `Brouhaha` for taking the time to explain the workings of various models.
446457

makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
# same common files. Make is still parallelizing
104104
# submakes calls which do the real work. - macmpi
105105
# 29 Apr 24 - Improve parallel make performance - macmpi
106+
# 12 May 24 - Use a separate makefile for MacOS - MT
106107
#
107108

108109
PROGRAM = x11-calc
@@ -115,7 +116,7 @@ IMG = img
115116

116117
# Files to be backed up (and the current date).
117118

118-
_files = `ls makefile makefile.*.[0-9] $(SRC)/makefile $(SRC)/makefile.all $(SRC)/makefile.linux $(SRC)/makefile.bsd $(SRC)/makefile.osf1 $(SRC)/makefile.*.[0-9] 2>/dev/null || true`
119+
_files = `ls makefile makefile.*.[0-9] $(SRC)/makefile $(SRC)/makefile.all $(SRC)/makefile.linux $(SRC)/makefile.darwin $(SRC)/makefile.bsd $(SRC)/makefile.osf1 $(SRC)/makefile.*.[0-9] 2>/dev/null || true`
119120
_source = `ls $(SRC)/*.c $(SRC)/*.c.[0-9] $(SRC)/*.h $(SRC)/*.h.[0-9] $(SRC)/*.in $(SRC)/*.in.[0-9] 2>/dev/null || true`
120121
_data = `ls $(ROM)/$(PROGRAM)*.rom $(ROM)/$(PROGRAM)*.rom.[0-9] $(PRG)/$(PROGRAM)*.dat $(PRG)/$(PROGRAM)*.dat.[0-9] 2>/dev/null || true`
121122
_images = `ls $(SRC)/*.ico $(SRC)/*.ico.[0-9] $(SRC)/*.png $(SRC)/*.png.[0-9] $(SRC)/*.svg $(SRC)/*.svg.[0-9] $(IMG)/*.png $(IMG)/*.png.[0-9] 2>/dev/null || true`

src/makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@
2424
# Linux (now we can get rid of make.sh) - MT
2525
# 24 Mar 24 - Pass model number - MT
2626
# 29 Mar 24 - Use linux/bsd/osf1 makefiles -macmpi
27+
# 12 May 24 - Use a separate makefile for MacOS - MT
2728
#
2829

2930
MODEL = 21
3031

3132
all:
3233
@_os="`uname -s | tr '[:upper:]' '[:lower:]'`"; \
33-
echo "$$_os" | grep -qwE "freebsd|netbsd|darwin" && _os=bsd; \
34+
echo "$$_os" | grep -qwE "freebsd|netbsd" && _os=bsd; \
3435
$(MAKE) -s -f "makefile.$$_os" MODEL=$(MODEL) $@
3536

3637
.DEFAULT:
3738
@_os="`uname -s | tr '[:upper:]' '[:lower:]'`"; \
38-
echo "$$_os" | grep -qwE "freebsd|netbsd|darwin" && _os=bsd; \
39+
echo "$$_os" | grep -qwE "freebsd|netbsd" && _os=bsd; \
3940
$(MAKE) -s -f "makefile.$$_os" MODEL=$(MODEL) $@

src/makefile.bsd

+1-6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#
2727
# 28 Mar 24 - Initial version - macmpi
2828
# 06 May 24 - Fixed include path for Darwin - MT
29+
# 12 May 24 - Use a separate makefile for MacOS - MT
2930
#
3031

3132
CFLAGS ?=
@@ -51,10 +52,4 @@ CFLAGS += -I/usr/X11R7/include/
5152
LDFLAGS += -L/usr/X11R7/lib/ -R /usr/X11R7/lib
5253
.endif
5354

54-
.if ${OS} == "Darwin" # MacOS
55-
LANG = LANG_en
56-
CFLAGS += -I/opt/X11/include/
57-
LDFLAGS += -L/opt/X11/lib/
58-
.endif
59-
6055
include makefile.all

src/makefile.darwin

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#
2+
# makefile - RPN (Reverse Polish) calculator simulator.
3+
#
4+
# Copyright(C) 2019 - MT
5+
#
6+
# makefile.darwin
7+
#
8+
# This program is free software: you can redistribute it and/or modify it
9+
# under the terms of the GNU General Public License as published by the
10+
# Free Software Foundation, either version 3 of the License, or (at your
11+
# option) any later version.
12+
#
13+
# This program is distributed in the hope that it will be useful, but
14+
# WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16+
# Public License for more details.
17+
#
18+
# You should have received a copy of the GNU General Public License along
19+
# with this program. If not, see <http://www.gnu.org/licenses/>.
20+
#
21+
# Note seperator (tab) at the beginning of the line CANNOT be a space..!
22+
#
23+
# https://stackoverflow.com/questions/50941196/
24+
#
25+
# https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
26+
#
27+
# 12 May 24 - Initial version - MT
28+
#
29+
30+
CFLAGS += -I/opt/X11/include/
31+
LDFLAGS += -L/opt/X11/lib/
32+
LDLIBS ?=
33+
34+
LANG = LANG_en
35+
36+
ifneq ($(COMMIT),)
37+
CFLAGS += -DCOMMIT_ID='"[Commit Id : $(COMMIT)]"'
38+
endif
39+
ifneq ($(SCALE_WIDTH),)
40+
CFLAGS += -DSCALE_WIDTH=$(SCALE_WIDTH)
41+
endif
42+
ifneq ($(SCALE_HEIGHT),)
43+
CFLAGS += -DSCALE_HEIGHT=$(SCALE_HEIGHT)
44+
endif
45+
46+
include makefile.all

0 commit comments

Comments
 (0)