Off-Topic > Off-Topic - Tiny Core Lounge

Do you want to make money creating extensions?

(1/5) > >>

Ulysses_:
Is anyone interested in creating a simple extension for a fee?  Can't do it myself so it would have to be done by someone more technical.  It would probably take you very little time.

If this is of interest, I can pay through paypal.

Ulysses_:
Here's what is required:

A rebuild of flwm_topside with fonts about as large as this:



Sources must be included plus build instructions as a build script that I can run after booting the live CD of TC 3.8.4 on a PC (x86) and the script does all the downloading necessary and builds the .tcz and associated files.

More extensions wanted also, but let's see how this one goes first.

maro:
OK, here is what I believe should suffice:
--- Code: (bash) ---#!/bin/sh

### a "quick & dirty" FLWM extension creation script ###

MIRROR=http://distro.ibiblio.org
DIR=tinycorelinux/3.x/release/src
FILE=flwm-1.14.tgz
SCRIPTS="/usr/bin/flwm_topside_"

EXT="flwm"
[ "$1" = "-t" ] && shift && EXT="${EXT}_topside"
FONT_SIZE="$1"
echo "$FONT_SIZE" | grep -q '^[0-9][0-9]*$' \
    || ! echo 'need to specify a font size' || exit 1
   
### if the font size is not wanted in the name, comment out the next line ###
EXT="${EXT}_${FONT_SIZE}"

which mksquashfs > /dev/null || tce-load -wi squashfs-tools-4.x
which gcc > /dev/null || tce-load -wi compiletc
[ -f /usr/include/X11//Xlib.h ] || tce-load -wi Xorg-7.5-dev

URL=${MIRROR}/${DIR}/${FILE}
ARCHIVE=$( basename "$URL" )
SRC_DIR=$( echo "$ARCHIVE" | sed 's:\.tgz::' )
PKG_DIR="/tmp/pkg_${EXT}"

# download and extract archive (if required)
[ -d ${SRC_DIR} ] && rm -rf ${SRC_DIR}
[ -f ${ARCHIVE} ] || wget "$URL" || exit
tar xf ${ARCHIVE} || exit

# create the executable (with adjustments for font size and frame layout)
cd ${SRC_DIR}
echo ${EXT} | grep -q topside \
    || sed -i '/^#define TOPSIDE 1$/ s:^:// :' config.h
sed -i "/_FONT_SIZE [0-9]\+$/ s: [0-9]\+$: ${FONT_SIZE}:" config.h
./compileit
mv flwm ${EXT}
cd - > /dev/null

# create package structure (i.e. scipts, the exectuable and the startup script)
sudo rm -rf ${PKG_DIR}
mkdir -p ${PKG_DIR}/usr/bin
sudo cp -p "${SCRIPTS}"* ${PKG_DIR}/usr/bin
if [ "$EXT" != "flwm_topside" ] ; then
    # make appropriate changes in the scripts and to their names
    cd  ${PKG_DIR}/usr/bin
    for SCRIPT in $( ls ) ; do
        sudo sed -i "s:flwm_topside_:${EXT}_:g" "$SCRIPT"
        sudo mv $SCRIPT "${SCRIPT/flwm_topside_/${EXT}_}"
    done
    cd - > /dev/null
fi
sudo cp -p ${SRC_DIR}/${EXT} ${PKG_DIR}/usr/bin
mkdir -p ${PKG_DIR}/usr/local/tce.installed
printf "#!/bin/sh\necho \"${EXT}\" > /etc/sysconfig/desktop\n" \
    > ${PKG_DIR}/usr/local/tce.installed/${EXT}
sudo chown -R root:root ${PKG_DIR}
sudo chmod -R 755 ${PKG_DIR}

# create extension files
rm -f ${EXT}.tcz*
mksquashfs ${PKG_DIR} ${EXT}.tcz > /dev/null
md5sum ${EXT}.tcz > ${EXT}.tcz.md5.txt
--- End code ---

Please note that I've taken the liberty to make the script a bit more generic:
* By default it will create an extension that follows the original frame layout (i.e. header on the left), but with the '-t' option it will create a "topside" version.
* One needs to specify the desired font size, which then becomes part of the extension name, but if this is not required it can be easily disabled by commenting out line 17.
* This script makes no attempt to clean up the surplus files extracted from the source archive (e.g. old executable, or object code files), any side effects from this "uncleanliness" are deemed out of scope. It also uses the apparently hard-coded short cut build mechanism (i.e. 'compileit'),  as I did not want to spend the time to investigate whether the "usual way" (i.e. './configure && make') is working or delivering any other outcome.So as it currently stands a run of this script (which I've named 'cr_flwm_ext.sh') like  cr_flwm_ext.sh -t 18 will create "flwm_topside_18.tcz" and cr_flwm_ext.sh 15 will create"flwm_15.tcz".

I'm not really sure what you hope to achieve by this, because changing just the font size of FLWM will only have an impact on the fonts of the menu and the windows headers. The applications themselves that are managed by the WM are of course not impacted by it.

vinnie:
Fine script Maro, even if I do not use flwm but also for my own eyes the font is too small

Ulysses_:
That's way cool! Thanks maro. Where do I send my donation?


--- Quote ---This script makes no attempt to clean up the surplus files extracted from the source archive
--- End quote ---

This is totally fine, just keeping the .tcz* on a pen drive - as I said it was to be built during a live CD session. 


--- Quote ---changing just the font size of FLWM will only have an impact on the fonts of the menu and the windows headers. The applications themselves that are managed by the WM are of course not impacted by it.
--- End quote ---

This is totally fine too because I have already received instructions how to change the other font sizes:

http://forum.tinycorelinux.net/index.php?topic=9317.0

One last thing I forgot to ask in that thread:



How can all terminals be made to use a larger font, about as big as the one shown above?

Also, is there any chance of cleartype fonts throughout, to take advantage of TFT displays, such as the font below?



Just tell me if it seems doable, no need to actually work on it.

Navigation

[0] Message Index

[#] Next page

Go to full version