It used to be, in older puppies, that this welcome help window was a HTML page opened in a web browser, which was slow if it had to be opened with SeaMonkey or Firefox on old hardware. So, we put faster HTML viewers into Puppy. Then I tried the help window as just a PNG image, then the most recent it is a shell script that uses gtkdialog.
Wary and Quirky and all recent standard Woof-built puppies have this gtkdialog script. It works well, startup is fast.
Well, I just can't leave this one alone, and have now rewritten it in BaCon. In Woof, the binary executable is now /usr/sbin/welcome1stboot, launched from /usr/sbin/delayedrun. Here is a snapshot:
In the 'devx' there will also be /usr/sbin/welcome1stboot.pot, welcome1stboot.bac and welcome1stboot.pupdev -- the latter is a text file that explains how to compile welcome1stboot.bac and how to create a language file for any country from welcome1stboot.pot.
Comparison with gtkdialog script
The gtkdialog script is much smaller, only about 7KB compared with the compiled executable 46KB.
The gtkdialog script used to be at /usr/share/doc/welcome1stboot, and it is 97 lines (some lines are very long), including blank lines and comments. welcome1stboot.bac is 148 lines. The BaCon program is a little bit more verbose, but does have some extra functionality, such as tooltips on the buttons.
The BaCon version has some major advantages over the gtkdialog version. One is precise placement and control of widgets in the window. Another is that although I wrote it using HUG (Highlevel Universal GUI) it can drop down to raw GTK functions at any time (and my program has one example of that, for the tooltips). I think that HUG offers more functionality than gtkdialog, but the raw GTK functions extends that dramatically.
The source code
I have uploaded the compiled welcome1stboot, and the .pot, .pupdev and .bac files as a tarball (19KB):
You will need the latest 20110412 BaCon PETs to compile it, see my blog post:
International language support
I intend that all BaCon apps that I write will have support for international languages. If you would like to create a translation file for your country, the .pupdev file in the tarball explains how to create it.
What you would do is create a file, say 'de.po' for German, then you can email it to me at bkaulerATgmailDOTcom and I will put it into Woof.
.pot, .pupdev, .bac
For all executables written in BaCon, I intend to also provide .pot, .pupdev and .bac files in the 'devx' sfs (in the same directory as the binary executable):
.bac BaCon source code
.pot International language file
Comments:Posted on 12 Apr 2011, 23:31 by BarryK
Text editor for BaCon source
If you run Wary or Quirky, you will already have NicoEdit, which supports color highlighting of BaCon code. If you don't have it, install the PET. There is also a Vim PET.
Install the BaCon PETs last, as they have bacon.lang and bacon.vim files that are the most recent.
Posted on 13 Apr 2011, 7:42 by BarryK
Existing gtkdialog scripts
Note, this does not mean that I am going to rewrite some of my other scripts that use gtkdialog (or Xdialog, or anything else). The welcome1stboot gtkdialog script had layout problems -- such as the bottom text getting chopped off with certain screens, and a too-wide left margin. Gtkdialog has a bug, when the window contains markup text, it can miscalculate window dimensions -- I reported this to the developer years ago but gtkdialog is a dead project.
Posted on 13 Apr 2011, 7:51 by BarryK
Another note for developers who use Woof.
What causes .bac, .pot and .pupdev files to end up in the 'devx' SFS is the '3builddistro' script. Your chosen packages get accumulated in sandbox3/rootfs-complete, and dev-components into sandbox3/devx. 3builddistro now search through rootfs-complete and moves all .bac, .pot, and .pupdev files to devx. 'cause, those files won't be needed for normal running, only for development purposes.
So, if you create a PET yourself that has a program written in BaCon, put in those extra files alongside the binary executable. If the PET is included when Woof builds a Puppy system, then those extra files will get moved to the 'devx'.
Posted on 13 Apr 2011, 13:55 by 01micko
spup (one I'm working on) didn't use nicoedit because it always crashed. Today I recompiled it, mainly for the bacon syntax highlighting, works fine now. An interesting note, there is a script in there called "bk_package". Did you write that? (I don't think so). Anyway, it didn't work so I made it work and reuploaded the source.
The script now needs a version number as an argument. Just neater IMO.
Posted on 13 Apr 2011, 16:55 by BarryK
I don't remember it. I think there are some scripts in that source that I contributed, but they aren't needed. My memory on this is vague, but the 'waf' build system works fine.
Posted on 13 Apr 2011, 18:00 by rodin.s
It is good you've created a pot-file.It's easier now to translate. I'am working on russian l10n so it's a good news.
Posted on 13 Apr 2011, 20:29 by L18L
I am coming right now from from tweaking some widget dimensions, see http://www.murga-linux.com/puppy/viewtopic.php?p=512904
hope it will fit for Russion, too .
Posted on 14 Apr 2011, 3:33 by rodin.s
I put russian po-file with suggestions about dimensions here: http://www.murga-linux.com/puppy/viewtopic.php?p=513000#513000
Posted on 14 Apr 2011, 12:14 by BarryK
Here is the latest welcome1stboot:
Note, you must have my latest BaCon PETs for this app to display correctly.
I have de and ru language translations, see:
This will be in the upcoming Quirky 1.5-beta1 and anyone is welcome to submit more translations.
Posted on 14 Apr 2011, 17:58 by BarryK
welcome1stboot fr translation
Thanks to JJM who has contributed a French translation for welcome1stboot:
As BaCon HUG uses absolute-coordinate postioning of widgets, compared with the relative packing technique in gtkdialog, it will be up to the translators to create text that fills the widgets nicely.
JJM commented that /usr/lib/hug.so is not in Wary, needed by welcome1stboot. Yes, that is in my BaCon PET package, and I expect that library to be in all future puppies.
Posted on 15 Apr 2011, 3:26 by rodin.s
I put Russian menu2.png to the forum topic. Everything works OK with Russian but one letter is missing. "Saving a session" should be longer. In Russian should be "Сохранение сессии". Strange. French line is longer with no cut off. I'm using Wary-511 and bacon-1.0.22pre-20110412.pet.
Posted on 15 Apr 2011, 3:37 by rodin.s
Russian characters is not displayed. I put image in the forum topic.
Posted on 15 Apr 2011, 8:35 by BarryK
Re latest BaCon
Yeah, I widened some widgets for the fr translation, so ru should work. I posted a snapshot of ru translation here:
Posted on 19 Apr 2011, 4:00 by GCMartin
Should Bacon be used for your Report-Video tool
has rearrange couple features of your tool. Adds additional help for analyzing issues with video. After thoughts your Bacon may be a candidate for its underpinning. I'm not sure, but i thought I ask, Would it be a candidate?
Hope this helps.
Posted on 8 Jun 2011, 17:33 by rodin.s
mistakes in ru.po
I have found some mistakes in ru.po translation. So I put updated version here: http://murga-linux.com/puppy/viewtopic.php?p=531976#531976