WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC fonts, language support and tcz package creation  (Read 9039 times)

Offline mountpeaks

  • Newbie
  • *
  • Posts: 28
TC fonts, language support and tcz package creation
« on: December 29, 2011, 05:32:01 AM »
So, I've been peeping here and there in the forum and arrived to the conclusion, that TC currently is not able to support different languages. Where are all the fonts, where are the tools to work with fonts?

Currently I'm trying to set cyrillic support in TC, first what I did -- searched for appropriate fonts, which I didn't find except for dejavu package.
Ok, I've downloaded cyrillic psf fonts from other source. And tried to install them
Code: [Select]
sudo loadfont < /home/tc/cyr_font/psf/UniCyr-sans-8x16.psf
loadfont: KDFONTOP: Invalid argument

(This is disappointing indeed, I did not expect to find quite exotic stuff in TC reps, such as echinus, oh, great! But not to have a font package for cyrillic... this is something new. Moreover, there are no chinese fonts too. In fact, I didn't find any fonts apart from dejavu package!)
« Last Edit: January 05, 2012, 03:13:31 AM by mountpeaks »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: TC fonts and language support
« Reply #1 on: December 29, 2011, 05:44:50 AM »
We'd be happy to accept extensions of cyrillic or chinese or any other fonts.

The ttf-arabic-font-Scheherazade extension seems to work for me and I seem to recall there might be a chinese font, but I forget the name.

Offline mountpeaks

  • Newbie
  • *
  • Posts: 28
Re: TC fonts and language support
« Reply #2 on: December 29, 2011, 05:51:47 AM »
I'd gladly make an extension, but I don't know how.
Where do I start?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: TC fonts and language support
« Reply #3 on: December 29, 2011, 06:09:19 AM »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: TC fonts and language support
« Reply #4 on: December 29, 2011, 10:27:10 AM »
Hi mountpeaks
The fireflysung.tcz extension may be of interest to you. You could also try the Search page.
See where it says  Home  Help  Search  Moderate  ....   Click on Search and enter   chinese font
Don't use the little search box at the top of the page, it does not do a global search.

Offline mountpeaks

  • Newbie
  • *
  • Posts: 28
Re: TC fonts and language support
« Reply #5 on: January 02, 2012, 03:35:15 PM »
Thanks, I will test it.

I'm still puzzled after reading wiki.
Code: [Select]
#Abbreviated steps
The Six Big Steps:

1. configure/make/make install
2. separate out docs, locale info, and development files
3. squash up everything into your extension(s)
4. write & place support files: dep, info, list, and md5 hash
5. bcrypt/tar it all
6. email it to the Tiny Core Team

Step 1: configure make and make install what and where? Why should I install something at all? Should I create a makefile myself or use the provided in the source package?
Step 2: what files to separate exactly and how?
Step 3: "squash" ?
Step 4: Place where?
Step 5: Again what should I bcrypt, "placed" or "squashed" files or folder with files or?

Currently I have a "proggycyr.pcf" font that I want to make a .tcz package of. Maybe a source tarball with makefiles and all the stuff prepared will be easier to "convert" to .tcz?
I still don't have a clear picture of what is .tcz file? (couldn't open it in the first place)
What should I do step by step?
Sorry
« Last Edit: January 02, 2012, 03:40:30 PM by mountpeaks »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: TC fonts and language support
« Reply #6 on: January 02, 2012, 10:41:41 PM »
1. configure/make/make install
This applies to compiling applications from source code and (probably) does not apply to packaging up fonts into an extension.

Quote
2. separate out docs, locale info, and development files
Again, this applies to the files created when installing applications after compiling them from source code and (probably) does not apply to packaging up fonts into an extension.

Quote
3. squash up everything into your extension(s)
If, for example you have placed all your font package files in a folder /tmp/pkg, you can make an extension like this:
Code: [Select]
$ cd /tmp
$ sudo mksquashfs pkg/ extension_name.tcz

Quote
4. write & place support files: dep, info, list, and md5 hash
Place in the tarball you make for submission - see section on extension submission in the forms

Quote
5. bcrypt/tar it all
See section on extension submission in the forms

Quote

I still don't have a clear picture of what is .tcz file? (couldn't open it in the first place)
Look in /tmp/tcloop/extension_name or you can mount an extension like this:
Code: [Select]
$ mkdir /tmp/image
$ sudo mount -o loop extension_name.tcz /tmp/image
Then look in /tmp/image

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: TC fonts and language support
« Reply #7 on: January 03, 2012, 12:22:22 AM »
Hi mountpeaks
Lets say for example you want your font file (proggycyr.pcf) to show up in  /usr/local/share/fonts
when your extension gets installed. First install the submitqc (or submitqc4) extension, then:
Code: [Select]
cd /home/tc
mkdir -p extension/usr/local/share/fonts
cp proggycyr.pcf extension/usr/local/share/fonts
mksquashfs extension/ cyrillicfonts.tcz
cd extension
find usr -not -type d > cyrillicfonts.tcz.list
rm -rf usr
md5sum cyrillicfonts.tcz > cyrillicfonts.tcz.md5.txt
touch cyrillicfonts.tcz.info
editor cyrillicfonts.tcz.info
cyrillicfonts.tcz.info will contain the information displayed in the Info tab in AppBrowser. The Description:
field should be a one liner easily understood by a layman. The Comments: field should contain any
additional information that will help the end user to use your extension. Try to write this with new users
in mind. Take a look at the  lua.tcz  extension for an example of a well done info file, also read this:
http://forum.tinycorelinux.net/index.php/topic,11026.msg57841.html#msg57841
Code: [Select]
touch jasonw.txt
editor jasonw.txt
This file should contain a brief note to Jason indicating whether this extension is suitable for TC3.x or
TC4.x or both.
Code: [Select]
submitqc   (or submitqc4 if that's what you installed)This will audit the files you created and provide feedback on any problems found, this may take a
minute or two. If this comes back without any major errors, copy the tcz file to your tce/optional
directory and reboot the machine. Use the  base norestore  boot codes. Then using the  Local  button
in AppBrowser, install your extension and make sure it works.
Code: [Select]
cd /home/tc/extension
tar zcf cyrillicfonts.tar.gz *
bcrypt cyrillicfonts.tar.gz
When bcrypt prompts you for a password, respond with tinycore
Your extension is now ready for submission.
These instructions are for simple extensions having no dependencies or startup scripts. If you wish to
create an extension for personal use only, you can stop after you have created the tcz file and copy
it to your  tce/optional  directory and add it to your  onboot.lst.


Offline mountpeaks

  • Newbie
  • *
  • Posts: 28
Re: TC fonts and language support
« Reply #8 on: January 04, 2012, 04:23:49 PM »
thank you, now I understood.
The procedure will get complicated as soon as I decide to make a package out of a source tarball with multiple files, isn't it?
Why am I asking, I'm thinking to package this ftp://ftp.samba.org/pub/ppp/ppp-2.4.5.tar.gz
A must-have package that should replace current quite useless pppsetup.tcz, moreover this way I will be able to finally connect to the Internet from TC (I'm still downloading *.tcz extensions to /dev/sdb1 from my installed linux os with a script)
ppp has only optional dependencies and here are all his owned files after install:

Code: [Select]
pacman -Ql ppp
ppp /etc/
ppp /etc/ppp/
ppp /etc/ppp/chap-secrets
ppp /etc/ppp/ip-down
ppp /etc/ppp/ip-down.d/
ppp /etc/ppp/ip-down.d/00-dns.sh
ppp /etc/ppp/ip-up
ppp /etc/ppp/ip-up.d/
ppp /etc/ppp/ip-up.d/00-dns.sh
ppp /etc/ppp/options
ppp /etc/ppp/pap-secrets
ppp /etc/ppp/peers/
ppp /etc/rc.d/
ppp /etc/rc.d/ppp
ppp /usr/
ppp /usr/bin/
ppp /usr/bin/poff
ppp /usr/bin/pon
ppp /usr/include/
ppp /usr/include/pppd/
ppp /usr/include/pppd/cbcp.h
ppp /usr/include/pppd/ccp.h
ppp /usr/include/pppd/chap-new.h
ppp /usr/include/pppd/chap_ms.h
ppp /usr/include/pppd/eap.h
ppp /usr/include/pppd/ecp.h
ppp /usr/include/pppd/eui64.h
ppp /usr/include/pppd/fsm.h
ppp /usr/include/pppd/ipcp.h
ppp /usr/include/pppd/ipv6cp.h
ppp /usr/include/pppd/ipxcp.h
ppp /usr/include/pppd/lcp.h
ppp /usr/include/pppd/magic.h
ppp /usr/include/pppd/md4.h
ppp /usr/include/pppd/md5.h
ppp /usr/include/pppd/patchlevel.h
ppp /usr/include/pppd/pathnames.h
ppp /usr/include/pppd/pppcrypt.h
ppp /usr/include/pppd/pppd.h
ppp /usr/include/pppd/session.h
ppp /usr/include/pppd/sha1.h
ppp /usr/include/pppd/spinlock.h
ppp /usr/include/pppd/tdb.h
ppp /usr/include/pppd/upap.h
ppp /usr/lib/
ppp /usr/lib/pppd/
ppp /usr/lib/pppd/2.4.5/
ppp /usr/lib/pppd/2.4.5/minconn.so
ppp /usr/lib/pppd/2.4.5/openl2tp.so
ppp /usr/lib/pppd/2.4.5/passprompt.so
ppp /usr/lib/pppd/2.4.5/passwordfd.so
ppp /usr/lib/pppd/2.4.5/pppoatm.so
ppp /usr/lib/pppd/2.4.5/pppol2tp.so
ppp /usr/lib/pppd/2.4.5/radattr.so
ppp /usr/lib/pppd/2.4.5/radius.so
ppp /usr/lib/pppd/2.4.5/radrealms.so
ppp /usr/lib/pppd/2.4.5/rp-pppoe.so
ppp /usr/lib/pppd/2.4.5/winbind.so
ppp /usr/sbin/
ppp /usr/sbin/chat
ppp /usr/sbin/plog
ppp /usr/sbin/pppd
ppp /usr/sbin/pppdump
ppp /usr/sbin/pppoe-discovery
ppp /usr/sbin/pppstats
ppp /usr/share/
ppp /usr/share/man/
ppp /usr/share/man/man1/
ppp /usr/share/man/man1/pon.1.gz
ppp /usr/share/man/man8/
ppp /usr/share/man/man8/chat.8.gz
ppp /usr/share/man/man8/pppd-radattr.8.gz
ppp /usr/share/man/man8/pppd-radius.8.gz
ppp /usr/share/man/man8/pppd.8.gz
ppp /usr/share/man/man8/pppdump.8.gz
ppp /usr/share/man/man8/pppstats.8.gz


So, when packaging from source, there should be some compilation made beforehand. Unfortunately ppp fails to compile on TC, spitting the error
Code: [Select]
cd chat; make  all
make[1]: Entering directory `/mnt/sdb1/ppp-2.4.5/chat'
cc -c -O2 -g -pipe -DTERMIOS                     -DSIGTYPE=void         
-UNO_SLEEP                      -DFNDELAY=O_NDELAY              -o
chat.o chat.c
chat.c:93:19: fatal error: stdio.h: No such file or directory
compilation terminated.
make[1]: *** [chat.o] Error 1
make[1]: Leaving directory `/mnt/sdb1/ppp-2.4.5/chat'
make: *** [all] Error 2

So, either somebody knowledged enough will do it, or help me with advice:)
(This thread should be separated, as soon as I mentioned another package)
« Last Edit: January 04, 2012, 04:36:03 PM by mountpeaks »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: TC fonts and language support
« Reply #9 on: January 04, 2012, 04:35:38 PM »
We already have pppd.tcz? Though it is 2.4.4, a minor version behind the latest.
The only barriers that can stop you are the ones you create yourself.

Offline mountpeaks

  • Newbie
  • *
  • Posts: 28
Re: TC fonts and language support
« Reply #10 on: January 04, 2012, 04:44:15 PM »
We already have pppd.tcz? Though it is 2.4.4, a minor version behind the latest.

that is just a daemon, I need a tool to setup PPPoE connection. Daemon can't do it. Here is how I setup my connection with pppoe-setup:
Code: [Select]
Welcome to the Roaring Penguin PPPoE client setup.  First, I will run
some checks on your system to make sure the PPPoE client is installed
properly...

Looks good!  Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default myconnection:) my_login@myprovider.com

INTERFACE

>>> Enter the Ethernet interface connected to the DSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0): eth0

Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped.  If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses.  You may have some problems with demand-activated links.
>>> Enter the demand value (default no): no

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: server

PASSWORD

>>> Please enter your PPPoE password:    *******
>>> Please re-enter your PPPoE password: *******

FIREWALLING

Please choose the firewall rules to use.  Note that these rules are
very basic.  You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security.  If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself.  Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc.  If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 - NONE: This script will not set any firewall rules.  You are responsible
          for ensuring the security of your machine.  You are STRONGLY
          recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
                for a LAN
>>> Choose a type of firewall (0-2): 1


Here is an article about PPPoE connection on archlinux https://wiki.archlinux.org/index.php/PPPoE_Setup_with_pppd
We should have a workaround of this on TC somehow :)
« Last Edit: January 04, 2012, 05:02:18 PM by mountpeaks »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: TC fonts and language support
« Reply #11 on: January 04, 2012, 05:04:08 PM »
I mean, you were talking about compiling pppd. There shouldn't be need to do that since we already have it. Your link to Arch wiki explains how to connect with pppd only?
The only barriers that can stop you are the ones you create yourself.

Offline mountpeaks

  • Newbie
  • *
  • Posts: 28
Re: TC fonts and language support
« Reply #12 on: January 05, 2012, 03:06:00 AM »
I mean, you were talking about compiling pppd. There shouldn't be need to do that since we already have it. Your link to Arch wiki explains how to connect with pppd only?
Yes, indeed. There is a pppd.tcz package. The package I'm talking about is not pppd daemon, but a collection of ppp scripts (see the ftp link provided above), that help to manage PPPoE connection.
Currently TC has pppd.tcz and pppsetup.tcz packages, that's good, but not enough. For all PPPoE users there should be a ppp.tcz package, pppd.tcz is just useless as it doesn't connect by itself (Well, at least I wasn't able to up the connection in TC without ppp scripts).
So either somebody makes ppp.tcz out of ftp://ftp.samba.org/pub/ppp/ppp-2.4.4.tar.gz (2.4.4 version as pppd is not the latest in TC rep either) or provide some little info on compiling and squashing it up here, so I could do it myself.

So my question stays the same, how creating a tcz package from source is different from making a tcz package out of one file? I don't want to be ignorant not to learn how to do it myself, but current wiki info on tcz creation is definitely not for newbies. Thanks to this thread, I've already understood some steps, but not enough to stop asking about it.
« Last Edit: January 05, 2012, 03:14:48 AM by mountpeaks »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: TC fonts and language support
« Reply #13 on: January 05, 2012, 04:43:50 AM »
So either somebody makes ppp.tcz out of ftp://ftp.samba.org/pub/ppp/ppp-2.4.4.tar.gz (2.4.4 version as pppd is not the latest in TC rep either) or provide some little info on compiling and squashing it up here, so I could do it myself.

So my question stays the same, how creating a tcz package from source is different from making a tcz package out of one file? I don't want to be ignorant not to learn how to do it myself, but current wiki info on tcz creation is definitely not for newbies.

If you untar the source:
Code: [Select]
$ mkdir /tmp/ppp
$ cd /tmp/ppp
$ wget -c ftp://ftp.samba.org/pub/ppp/ppp-2.4.4.tar.gz
$ tar xzf ppp-2.4.4.tar.gz
..and look in /tmp/ppp/ppp-2.4.4/scripts, there are a number of scripts:
Code: [Select]
ppp-on-rsh
autopppd
ppp-off
ppp-on-ssh
callback
ppp-on
redialer
ppp-on-dialer
secure-card
..and a README file

I guess these are the ones you're speaking of?

Offline mountpeaks

  • Newbie
  • *
  • Posts: 28
Re: TC fonts, language support and tcz package creation
« Reply #14 on: January 05, 2012, 05:53:26 AM »
Oh, my silly head...
I've erroneously said that ppp package is what is needed, because it is used in arch PPPoe setup and called "ppp" however the scripts that are used and mentioned above (pppoe-setup; pppoe-start; pppoe-stop; pppoe-stat) are provided by "rp_pppoe" package (http://www.roaringpenguin.com/files/download/rp-pppoe-3.10.tar.gz)
rp_pppoe scripts dir:
Code: [Select]

pppoe-connect
pppoe-init-su
pppoe-init-tu
pppoe-init.in
pppoe-setup.i
pppoe-start.i
pppoe-stop.in
pppoe-status

Back to making a tcz package. I can just wrap those (scripts) into tcz, provided I have ppp.tcz package (ppp package is a dependency for rp_pppoe), heh?
So, now we are getting somewhere. We need a ppp.tcz and rp_pppoe.tcz for setting up PPPoE connection properly. I just need to understand the steps of these two source packages > tcz conversion :)
« Last Edit: January 05, 2012, 05:59:57 AM by mountpeaks »