Commit fb4d42dd authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Reconstruct Squish sources by un-squishing the v1.12 binary

Detail:
  This is some reconstructed sources for the Squish tool, formed by running the 1.12 binary through Beebug's/ProAction's !BasFormat, and then fixing up a few extra bits by hand.
  Most of FNs and PROCs have had meaningful names applied to them, making the sources more readable. However only a couple of the variables have been renamed.
  The test script (Test/Squish,feb) was used to verify that this new squish (after being re-squished) produces identical output to the original binary.
  Note that squishing these sources won't produce a binary identical to the original, as the original appears to have been modified post-squishing in order to add PROCknockoutkept.
Admin:
  Tested against original Squish binary for Disc & BCM2835 builds
  Version number is currently hardcoded in sources; build procedure needs updating to take it from VersionNum


Version 1.13. Tagged as 'Squish-1_13'
parent 1890b125
| Copyright 2012 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all
| Copyright 2012 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine clean
| Copyright 2012 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine install INSTDIR=<install$dir>.HardDisc4.Utilities
bas/** gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true
*,ffb gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true
# Copyright 2012 Castle Technology Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile for Squish
#
#
# Program specific options:
#
COMPONENT = Squish
MSGVERSION = ${AWK} -f Build:AwkVers
# Generic options:
#
AWK = GNU.gawk
MKDIR = do mkdir -p
CC = cc
CP = copy
NUMBER = util.Number
RM = remove
SQUISH = squish
XWIPE = x wipe
CFLAGS = -c++ -IC:,^ ${THROWBACK} ${DFLAGS}
CRFLAGS = %11111
CPFLAGS = ~cfr~v
SQFLAGS = -nolist
WFLAGS = ~c~v
FILES =\
squished.${COMPONENT}
#
# Generic build rules:
#
all: $(FILES)
@echo $(COMPONENT): all build complete
install: $(FILES)
${CP} squished.${COMPONENT} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo $(COMPONENT): installed
clean:
${XWIPE} squished ${WFLAGS}
${XWIPE} crunched ${WFLAGS}
${XWIPE} n ${WFLAGS}
@echo $(COMPONENT): cleaned
#
# Static dependencies:
#
squished.${COMPONENT}: crunched.${COMPONENT} bas.Keep
${MKDIR} squished
$(SQUISH) $(SQFLAGS) -keep bas.Keep -from crunched.${COMPONENT} -to $@
crunched.${COMPONENT}: n.${COMPONENT}
${MKDIR} crunched
crunch.${COMPONENT}; BASIC
n.${COMPONENT}: bas.${COMPONENT}
${MKDIR} n
${NUMBER} bas.${COMPONENT} $@
#---------------------------------------------------------------------------
# Dynamic dependencies:
| Copyright 2012 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
| Script to test if two different versions of Squish produce the same output
| Rename existing Library.Build.Squish to OldSquish, copy in your new version
| as NewSquish, and add this script as Squish.
| Note - errors probably won't halt the build, so it's best to check the log
| manually rather than relying on the build failing.
unset squish$output
set squish$temp x%1
if "<squish$temp>"="x-to" then set squish$output copy %2
set squish$temp x%2
if "<squish$temp>"="x-to" then set squish$output copy %3
set squish$temp x%3
if "<squish$temp>"="x-to" then set squish$output copy %4
set squish$temp x%4
if "<squish$temp>"="x-to" then set squish$output copy %5
set squish$temp x%5
if "<squish$temp>"="x-to" then set squish$output copy %6
set squish$temp x%6
if "<squish$temp>"="x-to" then set squish$output copy %7
set squish$temp x%7
if "<squish$temp>"="x-to" then set squish$output copy %8
set squish$temp x%8
if "<squish$temp>"="x-to" then set squish$output copy %9
if "<squish$output>"="" then error Unable to find output file
echo newsquish %*1
newsquish %*1 { > <wimp$scrapdir>.newsquishout }
do <squish$output> <wimp$scrapdir>.newsquish ~CFR~V
echo oldsquish %*1
oldsquish %*1 { > <wimp$scrapdir>.oldsquishout }
do <squish$output> <wimp$scrapdir>.oldsquish ~CFR~V
gnu.diff -q <wimp$scrapdir>.oldsquish <wimp$scrapdir>.newsquish
if "<sys$returncode>"<>"0" then error Squished output differs
/* (1.12) /* (1.13)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 1.12 #define Module_MajorVersion_CMHG 1.13
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 Aug 2012 #define Module_Date_CMHG 28 Aug 2012
#define Module_MajorVersion "1.12" #define Module_MajorVersion "1.13"
#define Module_Version 112 #define Module_Version 113
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "28 Aug 2012" #define Module_Date "28 Aug 2012"
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
#define Module_ComponentName "Squish" #define Module_ComponentName "Squish"
#define Module_ComponentPath "castle/RiscOS/Tools/Sources/Squish" #define Module_ComponentPath "castle/RiscOS/Tools/Sources/Squish"
#define Module_FullVersion "1.12" #define Module_FullVersion "1.13"
#define Module_HelpVersion "1.12 (28 Aug 2012)" #define Module_HelpVersion "1.13 (28 Aug 2012)"
#define Module_LibraryVersionInfo "1:12" #define Module_LibraryVersionInfo "1:13"
A%
B%
C%
D%
E%
F%
G%
H%
P%
@%
This diff is collapsed.
TEXTLOAD "n.Squish"
CRUNCH -1
SAVE "crunched.Squish"
QUIT
File added
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment