From 88e864a553ad66c3b6b8631afd96a8d619eac3f5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 27 Dec 2015 13:18:35 +0100 Subject: WAGE: Implemented script for downloading fonts --- devtools/create_wage/create_wage.sh | 101 ++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 devtools/create_wage/create_wage.sh (limited to 'devtools/create_wage') diff --git a/devtools/create_wage/create_wage.sh b/devtools/create_wage/create_wage.sh new file mode 100644 index 0000000000..bb0e9ee6d9 --- /dev/null +++ b/devtools/create_wage/create_wage.sh @@ -0,0 +1,101 @@ +#bash +# +# Based on instructions posted at +# http://apple.stackexchange.com/questions/58243/can-i-get-the-original-mac-font-chicago-on-a-mountain-lion-mac + +echo_n() { + printf "$@" +} + +echo_n "Downloading System 7.0.1 image..." +if test ! -f System_7.0.1.smi.bin; then + curl -s http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/System_7.0.1.smi.bin -o System_7.0.1.smi.bin +fi + +if test ! -f System_7.0.1.smi.bin; then + echo "Cannot download System_7.0.1.smi.bin" + exit +fi + +echo done + +echo_n "Mounting System 7.0.1 image..." + +macbinary decode System_7.0.1.smi.bin +hdiutil convert -quiet System\ 7.0.1.smi -format UDRO -o sys7.dmg +hdiutil attach -quiet sys7.dmg + +if test ! -f /Volumes/7.0.1\ \(1440k.images\)/Fonts.image; then + echo "Failed to attach sys7.dmg" + exit +fi + +echo done + +echo_n "Mounting Fonts disk image..." + +hdiutil convert -quiet /Volumes/7.0.1\ \(1440k.images\)/Fonts.image -format UDRO -o fonts.dmg +hdiutil detach -quiet `hdiutil info|grep "/Volumes/7.0.1 (1440k.images)"|cut -f 1` +hdiutil attach -quiet fonts.dmg + +if test ! -f /Volumes/Fonts/Chicago; then + echo "Failed to attach fonts.dmg" + exit +fi + +echo done + +echo_n "Copying fonts..." + +for i in Athens Cairo Chicago Courier Geneva Helvetica London "Los Angeles" Monaco "New York" Palatino "San Francisco" Symbol Times Venice +do + echo $i + macbinary encode "/Volumes/Fonts/$i" -o "$i.bin" -n +done + +echo ...Done + +hdiutil detach -quiet `hdiutil info|grep "/Volumes/Fonts"|cut -f 1` + +if test ! -f fondu_src-060102.tgz; then + echo_n "Getting fondu_src-060102.tgz..." + curl -s http://fondu.sourceforge.net/fondu_src-060102.tgz -o fondu_src-060102.tgz + tar xf fondu_src-060102.tgz +fi + +if test ! -d fondu-060102; then + echo "Failed to download fondu_src-060102.tgz" + exit +fi + +echo done + +if test ! -x fondu-060102/fondu; then + echo_n "Compiling fondu..." + cd fondu-060102 + ./configure >configure.log 2>&1 && make 2>&1 >make.log + cd .. +fi + +if test ! -x fondu-060102/fondu; then + echo "Failed to build fondu. See configure.log and make.log" + exit +else + rm -f configure.log make.log +fi + +echo done + +echo_n "Converting fonts..." +fondu-060102/fondu -force *.bin +echo done + +zip -9 wage *.bdf +mv wage.zip wage.dat + +echo_n "Cleaning up..." +rm *.bdf +rm *.ttf +rm *.bin +rm *.dmg +echo done -- cgit v1.2.3 From 2802566f43bfe19f940051746abf8ff8b1c6d776 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 27 Dec 2015 23:26:28 +0100 Subject: WAGE: Fix font downloading script --- devtools/create_wage/create_wage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 devtools/create_wage/create_wage.sh (limited to 'devtools/create_wage') diff --git a/devtools/create_wage/create_wage.sh b/devtools/create_wage/create_wage.sh old mode 100644 new mode 100755 index bb0e9ee6d9..fb3c047661 --- a/devtools/create_wage/create_wage.sh +++ b/devtools/create_wage/create_wage.sh @@ -1,4 +1,4 @@ -#bash +#!bash # # Based on instructions posted at # http://apple.stackexchange.com/questions/58243/can-i-get-the-original-mac-font-chicago-on-a-mountain-lion-mac -- cgit v1.2.3 From 0d6b87b785ffba32f166411e6c44fc7abc33e0eb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 28 Dec 2015 01:08:39 +0100 Subject: WAGE: Added more documentation to the script --- devtools/create_wage/create_wage.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'devtools/create_wage') diff --git a/devtools/create_wage/create_wage.sh b/devtools/create_wage/create_wage.sh index fb3c047661..1ec7ef3ed3 100755 --- a/devtools/create_wage/create_wage.sh +++ b/devtools/create_wage/create_wage.sh @@ -1,4 +1,12 @@ -#!bash +#!/bin/bash +# +# This script downloads System 7.0.1 image from Apple and extracts fonts +# from it. Mac only, unfortunately. +# +# On Windows you perhaps can perform the extraction manually with use of +# HFV Explorer: https://web.archive.org/web/20011202005455/http://gamma.nic.fi/~lpesonen/HFVExplorer/ +# +# More information could be found in the vMac documentation: http://www.gryphel.com/c/image/ # # Based on instructions posted at # http://apple.stackexchange.com/questions/58243/can-i-get-the-original-mac-font-chicago-on-a-mountain-lion-mac @@ -7,6 +15,11 @@ echo_n() { printf "$@" } +if test `uname` != "Darwin"; then + echo This script is Mac OS X-only + exit +fi + echo_n "Downloading System 7.0.1 image..." if test ! -f System_7.0.1.smi.bin; then curl -s http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/System_7.0.1.smi.bin -o System_7.0.1.smi.bin -- cgit v1.2.3 From 13a62ce1a130631cd42fba0901bd5f4b908a5376 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 28 Dec 2015 01:15:27 +0100 Subject: WAGE: Cleanup --- devtools/create_wage/create_wage.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'devtools/create_wage') diff --git a/devtools/create_wage/create_wage.sh b/devtools/create_wage/create_wage.sh index 1ec7ef3ed3..5e8fe352a2 100755 --- a/devtools/create_wage/create_wage.sh +++ b/devtools/create_wage/create_wage.sh @@ -8,6 +8,9 @@ # # More information could be found in the vMac documentation: http://www.gryphel.com/c/image/ # +# Alternatively you may use vMac instructions for extracting these disk images: +# http://www.gryphel.com/c/minivmac/recipes/sys7inst/ +# # Based on instructions posted at # http://apple.stackexchange.com/questions/58243/can-i-get-the-original-mac-font-chicago-on-a-mountain-lion-mac @@ -22,7 +25,7 @@ fi echo_n "Downloading System 7.0.1 image..." if test ! -f System_7.0.1.smi.bin; then - curl -s http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/System_7.0.1.smi.bin -o System_7.0.1.smi.bin + curl -s http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/System_7.0.1.smi.bin -o System_7.0.1.smi.bin fi if test ! -f System_7.0.1.smi.bin; then @@ -62,8 +65,8 @@ echo_n "Copying fonts..." for i in Athens Cairo Chicago Courier Geneva Helvetica London "Los Angeles" Monaco "New York" Palatino "San Francisco" Symbol Times Venice do - echo $i - macbinary encode "/Volumes/Fonts/$i" -o "$i.bin" -n + echo $i + macbinary encode "/Volumes/Fonts/$i" -o "$i.bin" -n done echo ...Done @@ -71,9 +74,9 @@ echo ...Done hdiutil detach -quiet `hdiutil info|grep "/Volumes/Fonts"|cut -f 1` if test ! -f fondu_src-060102.tgz; then - echo_n "Getting fondu_src-060102.tgz..." - curl -s http://fondu.sourceforge.net/fondu_src-060102.tgz -o fondu_src-060102.tgz - tar xf fondu_src-060102.tgz + echo_n "Getting fondu_src-060102.tgz..." + curl -s http://fondu.sourceforge.net/fondu_src-060102.tgz -o fondu_src-060102.tgz + tar xf fondu_src-060102.tgz fi if test ! -d fondu-060102; then @@ -84,10 +87,10 @@ fi echo done if test ! -x fondu-060102/fondu; then - echo_n "Compiling fondu..." - cd fondu-060102 - ./configure >configure.log 2>&1 && make 2>&1 >make.log - cd .. + echo_n "Compiling fondu..." + cd fondu-060102 + ./configure >configure.log 2>&1 && make 2>&1 >make.log + cd .. fi if test ! -x fondu-060102/fondu; then @@ -112,3 +115,5 @@ rm *.ttf rm *.bin rm *.dmg echo done + +ls -l wage.dat -- cgit v1.2.3