Skip to content

Commit fe9cbf3

Browse files
Project: Move source files into src/ to tidy up root dir
* Source files move into src/ * Fonts move from mgtk/fonts to res/fonts * A top-level Makefile is retained * bin/ files are updated to reference new paths * References to ../out from source files need an extra ../
1 parent 3dda044 commit fe9cbf3

File tree

685 files changed

+128
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

685 files changed

+128
-100
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ all: vercheck $(targets)
1111
# Build all targets
1212
$(targets):
1313
@tput setaf 3 && echo "Building: $@" && tput sgr0
14-
@$(MAKE) -C $@ \
14+
@$(MAKE) -C src/$@ \
1515
&& (tput setaf 2 && echo "make $@ good" && tput sgr0) \
1616
|| (tput blink && tput setaf 1 && echo "MAKE $@ BAD" && tput sgr0 && false)
1717

@@ -35,7 +35,7 @@ shk:
3535
clean:
3636
@for dir in $(targets); do \
3737
tput setaf 2 && echo "cleaning $$dir" && tput sgr0; \
38-
$(MAKE) -C $$dir clean; \
38+
$(MAKE) -C src/$$dir clean; \
3939
done
4040

4141
# Ensure minimum cc65 version

bin/audit_das

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ max_seg_size=$(( 0x1C00 - 0x800 ))
1010

1111
make
1212
printf " Main Aux Main%% Aux%% \n"
13-
for file in $(cat desk.acc/TARGETS | bin/targets.pl targets | sort); do
13+
for file in $(cat src/desk.acc/TARGETS | bin/targets.pl targets | sort); do
1414
aux_lo=$(xxd -p -l1 -s0 "out/${file}.da")
1515
aux_hi=$(xxd -p -l1 -s1 "out/${file}.da")
1616
aux=$(( 0x${aux_hi}${aux_lo} ))

bin/bumpver

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ cd "$(dirname "$0")/.."
1414
# ============================================================
1515
# Extract metadata for the build
1616

17-
vmajor=$(grep 'kDeskTopVersionMajor =' config.inc | sed -e 's/.* = //')
18-
vminor=$(grep 'kDeskTopVersionMinor =' config.inc | sed -e 's/.* = //')
19-
vsuffix=$(grep 'define kDeskTopVersionSuffix' config.inc | cut -d'"' -f2)
20-
lang=$(grep 'define kBuildLang' config.inc | cut -d'"' -f2)
17+
vmajor=$(grep 'kDeskTopVersionMajor =' src/config.inc | sed -e 's/.* = //')
18+
vminor=$(grep 'kDeskTopVersionMinor =' src/config.inc | sed -e 's/.* = //')
19+
vsuffix=$(grep 'define kDeskTopVersionSuffix' src/config.inc | cut -d'"' -f2)
20+
lang=$(grep 'define kBuildLang' src/config.inc | cut -d'"' -f2)
2121
vtype=$(echo "$vsuffix" | sed -E -e 's/^-//' -e 's/[0-9]+$//')
2222
vrel=$(echo "$vsuffix" | sed -E -e 's/[^0-9]*//')
2323

@@ -33,7 +33,7 @@ echo "Bumping to ${version}..."
3333

3434
bin/setlang "en"
3535

36-
perl -pni -e "s/define kDeskTopVersionSuffix .*/define kDeskTopVersionSuffix \"-${vtype}${vrel}\"/" config.inc
36+
perl -pni -e "s/define kDeskTopVersionSuffix .*/define kDeskTopVersionSuffix \"-${vtype}${vrel}\"/" src/config.inc
3737

3838
git commit -a -m "Bump verson to ${version}" > /dev/null
3939
git tag "v${version}" > /dev/null

bin/lkg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ source "bin/util.sh"
77
# ============================================================
88
# Tweak config
99

10-
git checkout config.inc
10+
git checkout src/config.inc
1111
bin/setdate en
1212
hash=$(git rev-parse --short HEAD)
13-
perl -pni -e "s/define kDeskTopVersionSuffix .*/define kDeskTopVersionSuffix \"-build-${hash}\"/" config.inc
13+
perl -pni -e "s/define kDeskTopVersionSuffix .*/define kDeskTopVersionSuffix \"-build-${hash}\"/" src/config.inc
1414

1515
# ============================================================
1616
# Do a build and package
@@ -29,4 +29,4 @@ INSTALL_IMG="${lkg}" INSTALL_PATH="/A2.DESKTOP" bin/setopt noram nosel noshort c
2929
# ============================================================
3030
# Reset config
3131

32-
git checkout config.inc
32+
git checkout src/config.inc

bin/loc_makeres.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ($$$$)
131131
my $outfile = $file;
132132
$outfile =~ s|/|/res/|;
133133
$outfile =~ s|\.s$|.res.$lang|;
134-
open $fhs{$lang}, '>'.$outfile or die $!;
134+
open $fhs{$lang}, '>src/'.$outfile or die $!;
135135
}
136136

137137
%dupes = ();

bin/manifest

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ source "bin/util.sh"
2727
get_da_loc_name() {
2828
local name="$1"
2929
local res="res_filename_${name//./_}"
30-
local filename="desk.acc/res/filenames.res.${lang}"
30+
local filename="src/desk.acc/res/filenames.res.${lang}"
3131
if [[ -n "$no_loc_da_names" ]]; then
32-
filename="desk.acc/res/filenames.res.en"
32+
filename="src/desk.acc/res/filenames.res.en"
3333
fi
3434
local match=$(egrep -i "^\.define ${res} " "${filename}" | cut -d' ' -f3 | tr -d '"')
3535
echo "${match:-$name}"
@@ -107,7 +107,7 @@ emit add_file $disposition "res/package/SAM.BIN" "Extras" "SAM" 000000
107107
# Part 5: Desk Accessories (optional and extra)
108108

109109
# Add Desk Accessories
110-
for line in $(cat desk.acc/TARGETS | bin/targets.pl); do
110+
for line in $(cat src/desk.acc/TARGETS | bin/targets.pl); do
111111
IFS=',' read -ra array <<< "$line"
112112
file="${array[0]}"
113113
loc=$(get_da_loc_name "$file")
@@ -149,44 +149,44 @@ if [[ -z "$no_sample_media" ]]; then
149149
emit add_file $disposition "out/System.$l.font" $mediafnt "System.$l" 070000
150150
emit add_file $disposition "out/Monaco.$l.font" $mediafnt "Monaco.$l" 070000
151151
done
152-
emit add_file $disposition "mgtk/fonts/MousePaint" $mediafnt "MousePaint" 070000
153-
emit add_file $disposition "mgtk/fonts/mini" $mediafnt "Mini" 070000
154-
emit add_file $disposition "mgtk/fonts/Athens" $mediafnt "Athens" 070000
155-
emit add_file $disposition "mgtk/fonts/New.York" $mediafnt "New.York" 070000
156-
emit add_file $disposition "mgtk/fonts/Toronto" $mediafnt "Toronto" 070000
157-
emit add_file $disposition "mgtk/fonts/Venice" $mediafnt "Venice" 070000
158-
emit add_file $disposition "mgtk/fonts/Catalyst" $mediafnt "Catalyst" 070000
159-
160-
emit add_file $disposition "mgtk/fonts/fairfax/Fairfax.en" $mediafnt "Fairfax.en" 070000
161-
emit add_file $disposition "mgtk/fonts/fairfax/FairfaxBd.en" $mediafnt "FairfaxBd.en" 070000
162-
emit add_file $disposition "mgtk/fonts/fairfax/FairfaxIt.en" $mediafnt "FairfaxIt.en" 070000
163-
emit add_file $disposition "mgtk/fonts/fairfax/FairfaxSf.en" $mediafnt "FairfaxSf.en" 070000
164-
emit add_file $disposition "mgtk/fonts/erin/Magdalena.en" $mediafnt "Magdalena.en" 070000
165-
emit add_file $disposition "mgtk/fonts/erin/MagdalenaBd.en" $mediafnt "MagdalenaBd.en" 070000
166-
emit add_file $disposition "mgtk/fonts/erin/McMillen.en" $mediafnt "McMillen.en" 070000
167-
emit add_file $disposition "mgtk/fonts/erin/McMillenBd.en" $mediafnt "McMillenBd.en" 070000
168-
emit add_file $disposition "mgtk/fonts/erin/Mischke.en" $mediafnt "Mischke.en" 070000
169-
emit add_file $disposition "mgtk/fonts/erin/MischkeBd.en" $mediafnt "MischkeBd.en" 070000
170-
emit add_file $disposition "mgtk/fonts/erin/Monterey.en" $mediafnt "Monterey.en" 070000
171-
emit add_file $disposition "mgtk/fonts/erin/MontereyBd.en" $mediafnt "MontereyBd.en" 070000
152+
emit add_file $disposition "res/fonts/MousePaint" $mediafnt "MousePaint" 070000
153+
emit add_file $disposition "res/fonts/mini" $mediafnt "Mini" 070000
154+
emit add_file $disposition "res/fonts/Athens" $mediafnt "Athens" 070000
155+
emit add_file $disposition "res/fonts/New.York" $mediafnt "New.York" 070000
156+
emit add_file $disposition "res/fonts/Toronto" $mediafnt "Toronto" 070000
157+
emit add_file $disposition "res/fonts/Venice" $mediafnt "Venice" 070000
158+
emit add_file $disposition "res/fonts/Catalyst" $mediafnt "Catalyst" 070000
159+
160+
emit add_file $disposition "res/fonts/fairfax/Fairfax.en" $mediafnt "Fairfax.en" 070000
161+
emit add_file $disposition "res/fonts/fairfax/FairfaxBd.en" $mediafnt "FairfaxBd.en" 070000
162+
emit add_file $disposition "res/fonts/fairfax/FairfaxIt.en" $mediafnt "FairfaxIt.en" 070000
163+
emit add_file $disposition "res/fonts/fairfax/FairfaxSf.en" $mediafnt "FairfaxSf.en" 070000
164+
emit add_file $disposition "res/fonts/erin/Magdalena.en" $mediafnt "Magdalena.en" 070000
165+
emit add_file $disposition "res/fonts/erin/MagdalenaBd.en" $mediafnt "MagdalenaBd.en" 070000
166+
emit add_file $disposition "res/fonts/erin/McMillen.en" $mediafnt "McMillen.en" 070000
167+
emit add_file $disposition "res/fonts/erin/McMillenBd.en" $mediafnt "McMillenBd.en" 070000
168+
emit add_file $disposition "res/fonts/erin/Mischke.en" $mediafnt "Mischke.en" 070000
169+
emit add_file $disposition "res/fonts/erin/MischkeBd.en" $mediafnt "MischkeBd.en" 070000
170+
emit add_file $disposition "res/fonts/erin/Monterey.en" $mediafnt "Monterey.en" 070000
171+
emit add_file $disposition "res/fonts/erin/MontereyBd.en" $mediafnt "MontereyBd.en" 070000
172172

173173
disposition="fonts2"
174174

175175
# HRCG conversions
176-
emit add_file $disposition "mgtk/fonts/hrcg/ASCII" $mediafnt "ASCII" 070000
177-
emit add_file $disposition "mgtk/fonts/hrcg/BLIPPO.BLACK" $mediafnt "Blippo.Black" 070000
178-
emit add_file $disposition "mgtk/fonts/hrcg/BYTE" $mediafnt "Byte" 070000
179-
emit add_file $disposition "mgtk/fonts/hrcg/COLOSSAL" $mediafnt "Colossal" 070000
180-
emit add_file $disposition "mgtk/fonts/hrcg/COUNT" $mediafnt "Count" 070000
181-
emit add_file $disposition "mgtk/fonts/hrcg/FLOW" $mediafnt "Flow" 070000
182-
emit add_file $disposition "mgtk/fonts/hrcg/GOTHIC" $mediafnt "Gothic" 070000
183-
emit add_file $disposition "mgtk/fonts/hrcg/MIRROR" $mediafnt "Mirror" 070000
184-
emit add_file $disposition "mgtk/fonts/hrcg/OUTLINE" $mediafnt "Outline" 070000
185-
emit add_file $disposition "mgtk/fonts/hrcg/PUDGY" $mediafnt "Pudgy" 070000
186-
emit add_file $disposition "mgtk/fonts/hrcg/ROMAN" $mediafnt "Roman" 070000
187-
emit add_file $disposition "mgtk/fonts/hrcg/SLANT" $mediafnt "Slant" 070000
188-
emit add_file $disposition "mgtk/fonts/hrcg/STOP" $mediafnt "Stop" 070000
189-
emit add_file $disposition "mgtk/fonts/hrcg/UPSIDE.DOWN" $mediafnt "Upside.Down" 070000
190-
191-
emit add_file $disposition "mgtk/fonts/Pig.Font" $mediafnt "Pig.Font" 070000
176+
emit add_file $disposition "res/fonts/hrcg/ASCII" $mediafnt "ASCII" 070000
177+
emit add_file $disposition "res/fonts/hrcg/BLIPPO.BLACK" $mediafnt "Blippo.Black" 070000
178+
emit add_file $disposition "res/fonts/hrcg/BYTE" $mediafnt "Byte" 070000
179+
emit add_file $disposition "res/fonts/hrcg/COLOSSAL" $mediafnt "Colossal" 070000
180+
emit add_file $disposition "res/fonts/hrcg/COUNT" $mediafnt "Count" 070000
181+
emit add_file $disposition "res/fonts/hrcg/FLOW" $mediafnt "Flow" 070000
182+
emit add_file $disposition "res/fonts/hrcg/GOTHIC" $mediafnt "Gothic" 070000
183+
emit add_file $disposition "res/fonts/hrcg/MIRROR" $mediafnt "Mirror" 070000
184+
emit add_file $disposition "res/fonts/hrcg/OUTLINE" $mediafnt "Outline" 070000
185+
emit add_file $disposition "res/fonts/hrcg/PUDGY" $mediafnt "Pudgy" 070000
186+
emit add_file $disposition "res/fonts/hrcg/ROMAN" $mediafnt "Roman" 070000
187+
emit add_file $disposition "res/fonts/hrcg/SLANT" $mediafnt "Slant" 070000
188+
emit add_file $disposition "res/fonts/hrcg/STOP" $mediafnt "Stop" 070000
189+
emit add_file $disposition "res/fonts/hrcg/UPSIDE.DOWN" $mediafnt "Upside.Down" 070000
190+
191+
emit add_file $disposition "res/fonts/Pig.Font" $mediafnt "Pig.Font" 070000
192192
fi

bin/setdate

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ yy=$(expr `date +%y` + 0)
1515
mm=$(expr `date +%m` + 0)
1616
dd=$(expr `date +%d` + 0)
1717

18-
month=$(egrep "\bres_string_month_name_${mm}\b" "common/res/common.res.${lang}" | cut -d'"' -f2)
19-
order=$(egrep "\bres_const_date_order\b" "common/res/common.res.${lang}" | cut -d' ' -f3)
18+
month=$(egrep "\bres_string_month_name_${mm}\b" "src/common/res/common.res.${lang}" | cut -d'"' -f2)
19+
order=$(egrep "\bres_const_date_order\b" "src/common/res/common.res.${lang}" | cut -d' ' -f3)
2020

2121
if [ "$order" = "0" ]; then
2222
date="$month $dd, $yyyy"
@@ -25,12 +25,12 @@ else
2525
fi
2626

2727
# Update build date string
28-
perl -pni -e "s/define kBuildDate .*/define kBuildDate \"$date\"/" config.inc
28+
perl -pni -e "s/define kBuildDate .*/define kBuildDate \"$date\"/" src/config.inc
2929

3030
# Update default date
31-
perl -pni -e 's/^(kBuildYYYY \s+ = \s+) \d+ /${1}'"$yyyy"'/x' config.inc
32-
perl -pni -e 's/^(kBuildYY \s+ = \s+) \d+ /${1}'"$yy"'/x' config.inc
33-
perl -pni -e 's/^(kBuildMM \s+ = \s+) \d+ /${1}'"$mm"'/x' config.inc
34-
perl -pni -e 's/^(kBuildDD \s+ = \s+) \d+ /${1}'"$dd"'/x' config.inc
31+
perl -pni -e 's/^(kBuildYYYY \s+ = \s+) \d+ /${1}'"$yyyy"'/x' src/config.inc
32+
perl -pni -e 's/^(kBuildYY \s+ = \s+) \d+ /${1}'"$yy"'/x' src/config.inc
33+
perl -pni -e 's/^(kBuildMM \s+ = \s+) \d+ /${1}'"$mm"'/x' src/config.inc
34+
perl -pni -e 's/^(kBuildDD \s+ = \s+) \d+ /${1}'"$dd"'/x' src/config.inc
3535

3636
echo Set date to: $(echo "$date" | bin/transcode.pl decode $lang)

bin/setlang

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ decoded_a=$(echo 'a' | bin/transcode.pl decode $lang)
99
supports_lowercase=$(if [ "$decoded_a" == "a" ]; then echo 1; else echo 0; fi);
1010
date=$(bin/setdate $lang)
1111

12-
git checkout config.inc
12+
git checkout src/config.inc
1313
perl -pni \
1414
-e "s/(?<=define kBuildLang ).*/\"$lang\"/;" \
1515
-e "s/(?<=define kBuildSupportsLowercase ).*/$supports_lowercase/" \
16-
config.inc
16+
src/config.inc
1717

1818
if [ "$supports_lowercase" != "1" ]; then
1919
perl -pni \
2020
-e 's/(?<=define kDeskTopProductName )"(.*)"/"\U$1\E"/;' \
2121
-e 's/(?<=define kDeskTopVersionSuffix )"(.*)"/"\U$1\E"/;' \
22-
config.inc
22+
src/config.inc
2323
fi
2424

2525
echo Set lang to: $lang

bin/setopt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ config="$tempdir/DeskTop.config#F10000"
4747
# ============================================================
4848
# Modify bytes based on command line args
4949

50-
# See config.inc for the DeskTopSettings definition. Note that first byte
50+
# See src/config.inc for the DeskTopSettings definition. Note that first byte
5151
# of the file is version number, rest is settings struct.
5252
#
5353
# file_version = offset 0 len 1

bin/util.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ fini_progress () {
7373
# ============================================================
7474
# Extract metadata for the build
7575

76-
vmajor=$(grep 'kDeskTopVersionMajor =' config.inc | sed -e 's/.* = //')
77-
vminor=$(grep 'kDeskTopVersionMinor =' config.inc | sed -e 's/.* = //')
78-
vsuffix=$(grep 'define kDeskTopVersionSuffix' config.inc | cut -d'"' -f2)
79-
lang=$(grep 'define kBuildLang' config.inc | cut -d'"' -f2)
76+
vmajor=$(grep 'kDeskTopVersionMajor =' src/config.inc | sed -e 's/.* = //')
77+
vminor=$(grep 'kDeskTopVersionMinor =' src/config.inc | sed -e 's/.* = //')
78+
vsuffix=$(grep 'define kDeskTopVersionSuffix' src/config.inc | cut -d'"' -f2)
79+
lang=$(grep 'define kBuildLang' src/config.inc | cut -d'"' -f2)
8080
version=$(echo ${vmajor}.${vminor}${vsuffix}-${lang})
81-
supports_lowercase=$(grep 'define kBuildSupportsLowercase' config.inc | cut -d' ' -f3)
81+
supports_lowercase=$(grep 'define kBuildSupportsLowercase' src/config.inc | cut -d' ' -f3)

0 commit comments

Comments
 (0)