On Tue, 23 Jul 2019 04:33:37 -0400, Paul wrote:
> I compiled it (pcal-4.11.0.tgz) from source, in MinGW.
> No, the makefile is not set up for that.
>
> I did a test run afterwards. ( pcal.exe 260,884 bytes )
>
> pcal -P tabloid -o
calendar.ps
>
> Here is the resulting output. A vanilla calendar.
>
>
https://i.postimg.cc/4yNG3MpC/calendar.gif
>
> Click the "download original", to get the full (300DPI) resolution.
>
> The output is postscript but I rasterized it so
> people could see a sample, without actually compiling
> the damn thing.
>
> pcal development might have started in 1991.
> Last edits are 2007.
> Today is 2019.
> That's 16 years development, 12 years decay.
>
> *******
>
> In the Makefile, change this chunk...
>
> ifeq ($(OS),DJGPP) # DOS+DJGPP
> OS_NAME = "DOS+DJGPP"
> D_BUILD_ENV = -DBUILD_ENV_DJGPP
> PCAL = pcal.exe
> CC = gcc
> PACK = :
> else # Unix
> OS_NAME = "Unix"
> D_BUILD_ENV = -DBUILD_ENV_UNIX
> PCAL = pcal
> CC = /usr/bin/gcc
> PACK = compress
> # PACK = pack
> # PACK = gzip
> endif
>
> to a simpler:
>
> OS_NAME = "DOS+DJGPP"
> D_BUILD_ENV = -DBUILD_ENV_DJGPP
> PCAL = pcal.exe
> CC = gcc
> PACK = :
>
> I did "BUILD_ENV_DJGPP=0" in msys, but that wasn't
> seemingly getting passed, so it was quicker to just
> hack it out and force the environment variables so
> it could find the gcc in MinGW.
>
> In writefil.c I changed this:
>
> #include <pwd.h>
>
> to this:
>
> /* include <pwd.h> */
>
> because MinGW is not POSIX, there is no getpwuid and
> friends, and the function in question is vanity bullshit
> (has nothing to do with printing a calendar).
>
> Now, further down in writefil.c, *remove* this section. Delete it.
>
> /* Generate "For" and "Routing" comments if user name is known... */
>
> #if defined (BUILD_ENV_UNIX) || defined (BUILD_ENV_DJGPP)
> if ((pw = getpwuid(getuid())) != NULL && strcmp(pw->pw_name, "nobody" /* anonymous account */) != 0) {
> printf("%%%%For: %s\n", pw->pw_name);
> #ifdef BUILD_ENV_UNIX
> /* The 'pw->pw_gecos' element ('real' user name) is not available in
> MS-DOS or DOS+DJGPP build environments... */
> strcpy(tmp, pw->pw_gecos);
> if ((p = strchr(tmp, ',')) != NULL) *p = '\0';
> printf("%%%%Routing: %s\n", tmp);
> #endif
> }
> #endif
>
> That should be enough to get a "make" to work in MinGW (32 bit version).
> The pcal.exe is in the exec folder (you have to watch the make output
> to figure out where it went :-/ )
>
> The program over the years, has become a bit more portable, so
> at least a vanilla calendar can be output. I'm not going to
> debug
>
> make install
>
> as I don't know if there is a point to bothering with that.
>
> If you look at the "doc" folder, the parameters you can pass
> to the stupid thing are endless. I hope someone has worked
> examples somewhere, because it would take me all week to
> figure out what to do :-/
>
> Paul
> Copy "calendar_us.txt" as "calendar" and place
> in the same directory as "pcal.exe".
>
> The program looks for ".calendar", which would be a workable
> choice on Linux, and it also looks for "calendar",
> which is the working choice on a Windows system.
>
> Then try:
>
> pcal.exe -P tabloid -n Helvetica-Narrow/18 -o
calendar.ps
>
> and the calendar will then show "Independence Day" as
> July 4th.
>
> The program was probably invented in B&W printer era,
> as the PostScript "colors" it refers to, have simple numeric values.
> For example "0.8/0.9" are likely two grayscale values.
>
> I don't see any way to add color portraits of puppies
> or kittens, so you're on your own there (use your colored
> pencils).
>
> Someone may have compiled this for Cygwin, but that doesn't
> necessarily mean it was an official package of Cygwin
> and can be fetched with the Cygwin package methods. It's
> probably less troublesome in Cygwin to do it. You would
> then need a minimum of three files, the pcal.exe plus
> the two DLLs that Cygwin uses for runtime support.
>
> Paul
Hi Paul,
This note is short as it goes to all the original groups - not just the
poorly archived Win10 ng where most of the suggestions are being explored.
Thanks for being one of a half dozen who (a) understood the question, and,
(b) who offered a purposefully helpful cross-platform solution of modifying
the Makefile in order to successfully compile the ancient Pcal source code
(1991 to 2007) on a current desktop OS.
> Here is the resulting output. A vanilla calendar.
>
https://i.postimg.cc/4yNG3MpC/calendar.gif
Others who understood the question well enough to share purposefully
helpful technical insight were Keith Nuttle (TB/Lightning), RatchetJaw
(LibreOffice calendar creator), Apd (pcal 16-bit issues), G Ross (Calendar
Creator), owl (pcval) Michael Logies & Zaidy036 (Excel calendar creator &
Birthday Alarm calendar creation, & pyotr filipivich (Open Office Calc)).
Just some of the helpful proposed solutions currently under test, are
<
https://www.techwalla.com/articles/how-do-i-create-a-calendar-in-openoffice>
<
https://extensions.libreoffice.org/templates/calendar-creator>
<
https://www.calendarlabs.com/excel-calendar/>
<
http://pcal.sourceforge.net/>
<
https://www.birthdayalarm.com/>
<
https://www.calendar-12.com/printable_calendar/2019>
<
https://filehippo.com/download_ams-photo-calendar-creator/>
<
https://www.thunderbird.net/en-US/calendar/>
<
https://www.rainlendar.net/cms/index.php>
<
https://print-a-calendar.com/july-2019>
<
https://www.vertex42.com/calendars/printable-calendars.html>
<
https://extensions.openoffice.org/en/project/calendar-template>
etc.
The solution will be of general use to almost everyone, where this note is
simply to say I will explore all valid suggested solutions & report back in
the Win10 group the cross platform successful results after testing.
--
(1) I've chosen to ignore the trolls, choosing, instead, to follow Mike
Easter's advice to provide a cross-platform solution to the Win10 ng.