git @ Cat's Eye Technologies Funicular / master eg / Amiga-500 / Funicularfile
master

Tree @master (Download .tar.gz)

Funicularfile @masterraw · history · blame

#
# Needs `lha`: on Linux, you can install `lhasa`, e.g. `sudo apt install lhasa`
#

PLATFORM="a500-e-uae"
INSTALL_IMAGE='Workbench_1.3.adf'
SETUP_IMAGE='setup.adf'
SYSTEM_IMAGE='dh0'
DIST_IMAGE='df0.adf'

DISTFILES="
  http://aminet.net/dev/asm/A68kGibbs.lha
  http://aminet.net/dev/asm/FixFd.lha
  http://aminet.net/dev/c/dice-3.15.lha
  http://aminet.net/dev/c/vbcc_target_m68k-amiga.lha
  http://aminet.net/dev/lang/Draco.lha
  http://aminet.net/dev/lang/pcq12b.lzh
  http://aminet.net/dev/misc/blink67.lzh
  http://aminet.net/dev/src/ArpRequest.lha
  http://aminet.net/text/font/FastFonts.lha
  http://aminet.net/util/batch/Xicon.lha
  http://aminet.net/util/boot/CLImax.lha
  http://aminet.net/util/shell/Conman.lha
  http://www.nic.funet.fi/pub/amiga/fish/001-100/ff048/du.lha
  http://www.nic.funet.fi/pub/amiga/fish/001-100/ff069/IconType.lha
  http://www.nic.funet.fi/pub/amiga/fish/001-100/ff092/SmallLib.lha
  http://www.nic.funet.fi/pub/amiga/fish/101-200/ff113/NoIconPos.lha
  http://www.nic.funet.fi/pub/amiga/fish/201-300/ff224/Who.lha
  http://www.nic.funet.fi/pub/amiga/fish/901-1000/ff935/MuchMore.lha
"

if [ "x$DISTREPO_ROOT" = "x" ]; then
    DISTREPO_ROOT="https://github.com/"
fi
DISTREPOS="
  catseye/Befunge-93
  catseye/Maentwrog
  catseye/minischeme
  catseye/Pixley
  catseye/RUBE
  catseye/Sally
  catseye/stringie
"

setup_script() {
    if [ ! -e kick.rom ]; then
        echo "Need kick.rom"
        return 1
    fi

    if [ ! -e "$INSTALL_IMAGE" ]; then
        echo "Need $INSTALL_IMAGE"
        return 1
    fi

    cp -Rp skel/* dh0/

    #======== Extract the simple and cromulent archives ========#

    ARCHIVES="
      FastFonts
      Conman CLImax
      MuchMore Who du
      Xicon NoIconPos IconType
      SmallLib FixFd
      ArpRequest
    "
    for ARCHIVE in $ARCHIVES; do
        lha xfw=dh0/Distributions distfiles/${ARCHIVE}.lha
    done

    #======== Now the stronger stuff ========#

    ### DICE 3.15 ###
    lha xfw=dh0/Distributions distfiles/dice-3.15.lha
    chmod 755 dh0/Distributions/dice-rel-3.15/abin/*
    # for lack of a better place to put this
    cp dh0/Distributions/SmallLib/small.lib dh0/Distributions/dice-rel-3.15/dlib/

    ### vbcc_target_m68k-amiga.lha (...just for amigas.lib...) ###
    lha xfw=dh0/Distributions distfiles/vbcc_target_m68k-amiga.lha
    cp dh0/Distributions/vbcc_target_m68k-amigaos/targets/m68k-amigaos/lib/amigas.lib dh0/Distributions/dice-rel-3.15/dlib/
    # can't stand the ugly...
    rm dh0/Distributions/vbcc_target_m68k-amigaos.info
    rm -rf dh0/Distributions/m68k-amigaos/vbcc_target_m68k-amigaos
    mv dh0/Distributions/vbcc_target_m68k-amigaos dh0/Distributions/m68k-amigaos

    ### A68k ###
    lha xfw=dh0/Distributions/A68k distfiles/A68kGibbs.lha

    ### Blink ###
    lha xfw=dh0/Distributions/Blink distfiles/blink67.lzh

    ### PCQ 1.2b ###
    lha xfw=dh0/Distributions/PCQ-1.2b distfiles/pcq12b.lzh

    ### Draco ###
    lha xfw=dh0/Distributions distfiles/Draco.lha
    chmod 755 dh0/Distributions/Draco/c/*

    #======== Now the distrepos ========#

    rm -rf dh0/Shelf
    mkdir dh0/Shelf
    cp -Rp distrepos/* dh0/Shelf/

    #======== Drawer icons for Distributions and Shelf ========#

    for DIR in dh0/Distributions/* dh0/Shelf/*; do
      if [ -d $DIR ]; then
        cp -p skel/icons/Drawer.info ${DIR}.info
      fi
    done
    cp -p skel/icons/Drawer.info dh0/Distributions.info
    cp -p skel/icons/Drawer.info dh0/Shelf.info

    #======== Now populate some system directories ========#

    ### C: ###

    cp dh0/Distributions/Xicon/Xicon dh0/c/
    cp dh0/Distributions/MuchMore/MuchMore dh0/c/   # version 3.6
    cp dh0/Distributions/MuchMore/MuchMore dh0/c/Less
    cp dh0/Distributions/MuchMore/MuchMore dh0/c/More   # TODO: use Replex?
    cp dh0/Distributions/NoIconPos/noIconPos dh0/c/
    cp dh0/Distributions/A68k/A68k dh0/c/
    cp dh0/Distributions/Blink/Blink dh0/c/
    cp dh0/Distributions/PCQ-1.2b/Pascal dh0/c/
    cp dh0/Distributions/PCQ-1.2b/Peep dh0/c/
    cp dh0/Distributions/Conman/ConMan dh0/c/
    cp dh0/Distributions/Conman/SetCMan dh0/c/
    cp dh0/Distributions/Conman/History dh0/c/
    cp dh0/Distributions/CLImax/CLImax dh0/c/
    cp dh0/Distributions/FixFd/FixFD dh0/c/
    cp dh0/Distributions/FastFonts/FastFonts dh0/c/
    cp dh0/Distributions/Who/Who dh0/c/
    cp dh0/Distributions/Du/du dh0/c/

    chmod 755 dh0/c/*

    ### L: ###
    cp dh0/Distributions/Conman/ConHandler dh0/l/

    ### S: ###
    # just some tweaks to PCQ-1.2b's Make scripts
    cat >dh0/s/PCQMake <<EOF
.key source
pascal <source>.p t:<source>.asm
a68k t:<source>.asm t:<source>.o
delete t:<source>.asm
blink t:<source>.o to <source> library PCQ:PCQ.lib
delete t:<source>.o
EOF

    cat >dh0/s/PCQOMake <<EOF
.key source
Pascal <source>.p t:<source>.asm
Peep t:<source>.asm t:<source>.s
delete t:<source>.asm
a68k t:<source>.s t:<source>.o
delete t:<source>.s
blink t:<source>.o to <source> library PCQ:PCQ.lib
delete t:<source>.o
EOF

    ### LIBS: ###
    cp dh0/Distributions/Conman/conhandler.library dh0/libs/
    cp dh0/Distributions/ArpRequest/arp.library dh0/libs/      # ver 39.1
}

setup_instructions() {
    cat <<EOF
------------------------------------------------------
[*] Wait for the Workbench to appear.
[*] Double-click the "Funicular" disk icon.
    You may need to move CLI windows out of the way
    first, to uncover it.
[*] Double-click the "Workbenchize" icon that appears.
[*] Wait until it asks you to reboot, then close
    the window and shut down the emulator.
------------------------------------------------------
EOF
}

dist_instructions() {
    cat <<EOF
* Format DF0: by typing:
    format drive df0 name Burgundy
  (or pick whatever name you want instead of Burgundy.)
* Copy whatever you like onto DF0:
* If you want to make the disk bootable, type:
    install df0:
EOF
}