Initial commit
This commit is contained in:
159
dists/amigaos/install_deps.rexx
Normal file
159
dists/amigaos/install_deps.rexx
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
$VER: install_deps.rexx 0.6 (28.04.2024) Install dependant shared libraries
|
||||
|
||||
Extracts and installs .so libraries, the main binary depends on, to it's own sobjs/ dir
|
||||
*/
|
||||
|
||||
PARSE ARG argBinary argPath
|
||||
|
||||
/*
|
||||
Determine REXX interpreter
|
||||
*/
|
||||
PARSE UPPER VERSION language .
|
||||
|
||||
/*
|
||||
Check if arguments are available, otherwise quit
|
||||
*/
|
||||
IF ~ARG() THEN DO
|
||||
SAY 'No Arguments given!'
|
||||
SAY 'Usage: Install_deps.rexx argBinary argPath'
|
||||
EXIT
|
||||
END
|
||||
|
||||
/*
|
||||
If the given filename/path has spaces in it, AmigaDOS/CLI will add extra
|
||||
quotation marks to secure a sane working path
|
||||
Get rid of those to make AREXX find the file and remove leading and trailing spaces
|
||||
*/
|
||||
IF ~EXISTS(argBinary) THEN DO
|
||||
SAY argBinary' not available!'
|
||||
EXIT
|
||||
END
|
||||
ELSE DO
|
||||
argBinary=STRIP(argBinary)
|
||||
argBinary=COMPRESS(argBinary,'"')
|
||||
END
|
||||
IF installpath = '' THEN DO
|
||||
SAY 'No installation destination/path given!'
|
||||
EXIT
|
||||
END
|
||||
ELSE DO
|
||||
argPath=STRIP(argPath)
|
||||
argPath=STRIP(argPath,'T','/')
|
||||
argPath=COMPRESS(argPath,'"')
|
||||
/*
|
||||
Check for destination path and create it, if needed
|
||||
*/
|
||||
IF ~EXISTS(argPath'/sobjs/') THEN
|
||||
ADDRESS COMMAND 'makedir all 'argPath'/sobjs'
|
||||
END
|
||||
|
||||
/*
|
||||
Save used gcc version, which is needed later on to install the correct libgcc.so version
|
||||
*/
|
||||
ADDRESS COMMAND 'gcc -dumpversion >so_dump'
|
||||
|
||||
/*
|
||||
Create shared objects dump
|
||||
*/
|
||||
ADDRESS COMMAND 'readelf -d 'argBinary' >>so_dump'
|
||||
|
||||
/*
|
||||
Error check, if I/O went wrong
|
||||
*/
|
||||
IF ~OPEN(fileLiblist,'so_dump','R') THEN DO
|
||||
SAY 'File so_dump opening failed!'
|
||||
EXIT
|
||||
END
|
||||
|
||||
/*
|
||||
Get used gcc version
|
||||
*/
|
||||
gcc_version=READLN(fileLiblist)
|
||||
|
||||
/*
|
||||
We know that the dumped shared library entries always start at line 4 (line 5 now with
|
||||
added gcc version)
|
||||
Skip unneeded lines to speed up processing
|
||||
*/
|
||||
lineRead=CALL READLN(fileLiblist)
|
||||
lineRead=CALL READLN(fileLiblist)
|
||||
lineRead=CALL READLN(fileLiblist)
|
||||
|
||||
i=1
|
||||
libPaths.i = 'SDK:local/newlib/lib/'
|
||||
i=i+1
|
||||
libPaths.i = 'SDK:newlib/lib/'
|
||||
i=i+1
|
||||
libPaths.i = 'SDK:gcc/lib/'
|
||||
i=i+1
|
||||
libPaths.i = 'SDK:gcc/lib/gcc/ppc-amigaos/'gcc_version'/'
|
||||
i=i+1
|
||||
libPaths.i = 'SOBJS:'
|
||||
i=i+1
|
||||
|
||||
/*
|
||||
VALUE(arg,, 'ENVIRONMENT') is a Regina REXX extension
|
||||
*/
|
||||
IF POS('REGINA', language) ~= 0 THEN DO
|
||||
prefix = VALUE('PREFIX',, 'ENVIRONMENT')
|
||||
IF prefix <> '' THEN DO
|
||||
libPaths.i = prefix'/lib/'
|
||||
i=i+1
|
||||
END
|
||||
prefix = VALUE('CROSS_PREFIX',, 'ENVIRONMENT')
|
||||
IF prefix ~= '' THEN DO
|
||||
libPaths.i = prefix'/lib/gcc/ppc-amigaos/'gcc_version'/'
|
||||
i=i+1
|
||||
libPaths.i = prefix'/ppc-amigaos/lib/'
|
||||
i=i+1
|
||||
END
|
||||
END
|
||||
libPaths.0 = i - 1
|
||||
|
||||
i=1
|
||||
DO WHILE i>0
|
||||
lineRead=READLN(fileLiblist)
|
||||
IF POS('Shared library:', lineRead) > 0 THEN DO
|
||||
i=1
|
||||
/*
|
||||
We know that the shared library names always start at position 59
|
||||
*/
|
||||
lineLib=SUBSTR(lineRead,59,LASTPOS(']', lineRead)-59)
|
||||
|
||||
/*
|
||||
- Find and install the dependant shared libraries from their varying home dirs
|
||||
- libgcc.so is deeply hidden inside the gcc install directory tree by default
|
||||
Since people can use different gcc versions we have to determine which to use
|
||||
the correct path
|
||||
*/
|
||||
DO j = 1 TO libPaths.0
|
||||
IF EXISTS(libPaths.j''lineLib) THEN DO
|
||||
ADDRESS COMMAND 'copy clone quiet' libPaths.j''lineLib argPath'/sobjs/'
|
||||
LEAVE
|
||||
END
|
||||
END
|
||||
IF j > libPaths.0 THEN DO
|
||||
/*
|
||||
If no shared library is found, abort
|
||||
*/
|
||||
SAY lineLib' not found! Aborting!'
|
||||
EXIT
|
||||
END
|
||||
END
|
||||
ELSE
|
||||
i=0
|
||||
END
|
||||
|
||||
/*
|
||||
AREXX is doing its own cleaning of open files
|
||||
Closing the file anyway
|
||||
*/
|
||||
IF ~CLOSE(fileLiblist) THEN DO
|
||||
SAY 'File so_dump closing failed!'
|
||||
EXIT
|
||||
END
|
||||
|
||||
ADDRESS COMMAND 'delete force quiet so_dump'
|
||||
|
||||
EXIT
|
||||
149
dists/amigaos/md2ag.rexx
Normal file
149
dists/amigaos/md2ag.rexx
Normal file
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
$VER: md2ag.rexx 0.2 (16.02.2022) README(.md) to (amiga).guide converter.
|
||||
Converts ScummVM's markdown README file to a basic hypertext Amiga guide
|
||||
file and installs it to a given location.
|
||||
*/
|
||||
|
||||
PARSE ARG p_readme p_instpath
|
||||
|
||||
/*
|
||||
Check if arguments are available, otherwise quit.
|
||||
*/
|
||||
IF ~ARG() THEN DO
|
||||
SAY 'No Arguments given!'
|
||||
SAY 'Usage: md2ag.rexx README.md INSTALLPATH'
|
||||
EXIT
|
||||
END
|
||||
|
||||
/*
|
||||
If the given filename/path has spaces in it, AmigaDOS/CLI
|
||||
will add extra quotation marks to secure a sane working path.
|
||||
Get rid of them to make AREXX find the file and remove leading
|
||||
and trailing spaces.
|
||||
*/
|
||||
IF ~EXISTS(p_readme) THEN DO
|
||||
SAY p_readme' not available!'
|
||||
EXIT
|
||||
END
|
||||
ELSE DO
|
||||
p_readme=STRIP(p_readme)
|
||||
p_readme=COMPRESS(p_readme,'"')
|
||||
END
|
||||
IF p_instpath='' THEN DO
|
||||
SAY 'No installation destination given!'
|
||||
EXIT
|
||||
END
|
||||
ELSE DO
|
||||
p_instpath=STRIP(p_instpath)
|
||||
p_instpath=STRIP(p_instpath,'T','/')
|
||||
p_instpath=COMPRESS(p_instpath,'"')
|
||||
END
|
||||
|
||||
/*
|
||||
Convert README.md to ASCII to get rid of non-displayable characters.
|
||||
*/
|
||||
ADDRESS COMMAND 'iconv -f UTF-8 -t ASCII//TRANSLIT 'p_readme' >README.conv'
|
||||
|
||||
CALL OPEN read_md,'README.conv','R'
|
||||
|
||||
IF READCH(read_md,18)~='# [ScummVM README]' THEN DO
|
||||
CALL CLOSE read_md
|
||||
SAY p_readme' is not the ScummVM README.md file. Aborting!'
|
||||
EXIT
|
||||
END
|
||||
ELSE
|
||||
/*
|
||||
Skip the first "Build Status" line.
|
||||
*/
|
||||
CALL READLN read_md
|
||||
|
||||
CALL OPEN write_guide,'README.guide','W'
|
||||
|
||||
/*
|
||||
Prepare Amiga guide, add intro and fixed text.
|
||||
*/
|
||||
CALL WRITELN write_guide,'@DATABASE ScummVM README.guide'
|
||||
CALL WRITELN write_guide,'@$VER: ScummVM Readme 2026.1.1git'
|
||||
CALL WRITELN write_guide,'@(C) by The ScummVM team'
|
||||
CALL WRITELN write_guide,'@AUTHOR The ScummVM team'
|
||||
CALL WRITELN write_guide,'@WORDWRAP'
|
||||
CALL WRITELN write_guide,'@NODE "main" "ScummVM README Guide"'
|
||||
CALL WRITELN write_guide,'@{b}'
|
||||
CALL WRITELN write_guide,'ScummVM README'
|
||||
CALL WRITELN write_guide,'@{ub}'
|
||||
|
||||
DO WHILE ~EOF(read_md)
|
||||
v_line=READLN(read_md)
|
||||
|
||||
/*
|
||||
Rejoin two rolled over lines that cut a weblink.
|
||||
Lines 12, 13 and 40 in the original .md file both hold a weblink
|
||||
which is cut due to the lines rolling over.
|
||||
Lines are:
|
||||
12 - latest release, progress reports and more, please visit the ScummVM [home
|
||||
13 - page](https://www.scummvm.org/).
|
||||
and
|
||||
40 - Please make sure the bug is reproducible, and still occurs in the latest git/Daily build version. Also check the [compatibility list](https://www.scummvm.org/compatibility/) for that game, to ensure the issue is not already known. Please do not report bugs for games that are not listed as completable on the [Supported Games](https://wiki.scummvm.org/index.php?title=Category:Supported_Games) wiki page, or on the compatibility list. We already know those games have bugs!
|
||||
*/
|
||||
IF POS('[',v_line)>0 THEN DO
|
||||
IF POS(']',v_line)=0 THEN DO
|
||||
rejoin_line=READLN(read_md)
|
||||
v_line=v_line''rejoin_line
|
||||
END
|
||||
END
|
||||
|
||||
/*
|
||||
Change local markdown links to AmigaGuide ones.
|
||||
*/
|
||||
IF POS('[here](',v_line)>0 THEN DO
|
||||
v_locallink=SUBSTR(v_line,POS('(',v_line)+1,POS(')',v_line)-POS('(',v_line)-1)
|
||||
v_line=DELSTR(v_line,POS('(',v_line)+1,POS(')',v_line)-POS('(',v_line)-1)
|
||||
v_line=INSERT('@{"'v_locallink'" link 'v_locallink'/main}',v_line,POS(']',v_line)+1)
|
||||
END
|
||||
|
||||
/*
|
||||
Change html markdown links to AmigaGuide ones.
|
||||
*/
|
||||
IF POS('http',v_line)>0 THEN DO
|
||||
v_protocol=SUBSTR(v_line,POS('http',v_line),POS('://',v_line)-POS('http',v_line))
|
||||
IF POS('<http',v_line)>0 THEN DO
|
||||
v_weblink=SUBSTR(v_line,POS('://',v_line)+3,LASTPOS('>',v_line)-POS('://',v_line)-3)
|
||||
v_line=DELSTR(v_line,POS('<',v_line)+1,LASTPOS('>',v_line)-POS('<',v_line)-1)
|
||||
SAY v_line
|
||||
v_line=INSERT('@{"'v_protocol'://'v_weblink'" System "URLOpen 'v_protocol' 'v_weblink'"}',v_line,POS('<',v_line))
|
||||
SAY v_line
|
||||
END
|
||||
ELSE DO
|
||||
v_weblink=SUBSTR(v_line,POS('://',v_line)+3,POS(')',v_line)-POS('://',v_line)-3)
|
||||
v_line=DELSTR(v_line,POS('(',v_line)+1,POS(')',v_line)-POS('(',v_line)-1)
|
||||
v_line=INSERT('@{"'v_protocol'://'v_weblink'" System "URLOpen 'v_protocol' 'v_weblink'"}',v_line,POS('(',v_line))
|
||||
END
|
||||
END
|
||||
|
||||
/*
|
||||
Use bold font for all links to make the [ ] encapsulated text stand out.
|
||||
*/
|
||||
IF POS('[',v_line)>0 THEN DO
|
||||
v_line=INSERT('@{b}',v_line,POS('[',v_line)-1)
|
||||
v_line=INSERT('@{ub} ',v_line,POS(']',v_line))
|
||||
END
|
||||
|
||||
CALL WRITELN write_guide,v_line
|
||||
END
|
||||
|
||||
/*
|
||||
Close guide and clean up.
|
||||
*/
|
||||
CALL WRITELN write_guide,'@ENDNODE'
|
||||
|
||||
CALL CLOSE read_md
|
||||
CALL CLOSE write_guide
|
||||
|
||||
/*
|
||||
Install finished README.guide to installation path and delete README.guide.
|
||||
*/
|
||||
ADDRESS COMMAND 'copy README.guide 'p_instpath
|
||||
ADDRESS COMMAND 'delete quiet README.guide'
|
||||
ADDRESS COMMAND 'delete quiet README.conv'
|
||||
|
||||
EXIT
|
||||
149
dists/amigaos/md2ag.rexx.in
Normal file
149
dists/amigaos/md2ag.rexx.in
Normal file
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
$VER: md2ag.rexx 0.2 (16.02.2022) README(.md) to (amiga).guide converter.
|
||||
Converts ScummVM's markdown README file to a basic hypertext Amiga guide
|
||||
file and installs it to a given location.
|
||||
*/
|
||||
|
||||
PARSE ARG p_readme p_instpath
|
||||
|
||||
/*
|
||||
Check if arguments are available, otherwise quit.
|
||||
*/
|
||||
IF ~ARG() THEN DO
|
||||
SAY 'No Arguments given!'
|
||||
SAY 'Usage: md2ag.rexx README.md INSTALLPATH'
|
||||
EXIT
|
||||
END
|
||||
|
||||
/*
|
||||
If the given filename/path has spaces in it, AmigaDOS/CLI
|
||||
will add extra quotation marks to secure a sane working path.
|
||||
Get rid of them to make AREXX find the file and remove leading
|
||||
and trailing spaces.
|
||||
*/
|
||||
IF ~EXISTS(p_readme) THEN DO
|
||||
SAY p_readme' not available!'
|
||||
EXIT
|
||||
END
|
||||
ELSE DO
|
||||
p_readme=STRIP(p_readme)
|
||||
p_readme=COMPRESS(p_readme,'"')
|
||||
END
|
||||
IF p_instpath='' THEN DO
|
||||
SAY 'No installation destination given!'
|
||||
EXIT
|
||||
END
|
||||
ELSE DO
|
||||
p_instpath=STRIP(p_instpath)
|
||||
p_instpath=STRIP(p_instpath,'T','/')
|
||||
p_instpath=COMPRESS(p_instpath,'"')
|
||||
END
|
||||
|
||||
/*
|
||||
Convert README.md to ASCII to get rid of non-displayable characters.
|
||||
*/
|
||||
ADDRESS COMMAND 'iconv -f UTF-8 -t ASCII//TRANSLIT 'p_readme' >README.conv'
|
||||
|
||||
CALL OPEN read_md,'README.conv','R'
|
||||
|
||||
IF READCH(read_md,18)~='# [ScummVM README]' THEN DO
|
||||
CALL CLOSE read_md
|
||||
SAY p_readme' is not the ScummVM README.md file. Aborting!'
|
||||
EXIT
|
||||
END
|
||||
ELSE
|
||||
/*
|
||||
Skip the first "Build Status" line.
|
||||
*/
|
||||
CALL READLN read_md
|
||||
|
||||
CALL OPEN write_guide,'README.guide','W'
|
||||
|
||||
/*
|
||||
Prepare Amiga guide, add intro and fixed text.
|
||||
*/
|
||||
CALL WRITELN write_guide,'@DATABASE ScummVM README.guide'
|
||||
CALL WRITELN write_guide,'@$VER: ScummVM Readme @VERSION@'
|
||||
CALL WRITELN write_guide,'@(C) by The ScummVM team'
|
||||
CALL WRITELN write_guide,'@AUTHOR The ScummVM team'
|
||||
CALL WRITELN write_guide,'@WORDWRAP'
|
||||
CALL WRITELN write_guide,'@NODE "main" "ScummVM README Guide"'
|
||||
CALL WRITELN write_guide,'@{b}'
|
||||
CALL WRITELN write_guide,'ScummVM README'
|
||||
CALL WRITELN write_guide,'@{ub}'
|
||||
|
||||
DO WHILE ~EOF(read_md)
|
||||
v_line=READLN(read_md)
|
||||
|
||||
/*
|
||||
Rejoin two rolled over lines that cut a weblink.
|
||||
Lines 12, 13 and 40 in the original .md file both hold a weblink
|
||||
which is cut due to the lines rolling over.
|
||||
Lines are:
|
||||
12 - latest release, progress reports and more, please visit the ScummVM [home
|
||||
13 - page](https://www.scummvm.org/).
|
||||
and
|
||||
40 - Please make sure the bug is reproducible, and still occurs in the latest git/Daily build version. Also check the [compatibility list](https://www.scummvm.org/compatibility/) for that game, to ensure the issue is not already known. Please do not report bugs for games that are not listed as completable on the [Supported Games](https://wiki.scummvm.org/index.php?title=Category:Supported_Games) wiki page, or on the compatibility list. We already know those games have bugs!
|
||||
*/
|
||||
IF POS('[',v_line)>0 THEN DO
|
||||
IF POS(']',v_line)=0 THEN DO
|
||||
rejoin_line=READLN(read_md)
|
||||
v_line=v_line''rejoin_line
|
||||
END
|
||||
END
|
||||
|
||||
/*
|
||||
Change local markdown links to AmigaGuide ones.
|
||||
*/
|
||||
IF POS('[here](',v_line)>0 THEN DO
|
||||
v_locallink=SUBSTR(v_line,POS('(',v_line)+1,POS(')',v_line)-POS('(',v_line)-1)
|
||||
v_line=DELSTR(v_line,POS('(',v_line)+1,POS(')',v_line)-POS('(',v_line)-1)
|
||||
v_line=INSERT('@{"'v_locallink'" link 'v_locallink'/main}',v_line,POS(']',v_line)+1)
|
||||
END
|
||||
|
||||
/*
|
||||
Change html markdown links to AmigaGuide ones.
|
||||
*/
|
||||
IF POS('http',v_line)>0 THEN DO
|
||||
v_protocol=SUBSTR(v_line,POS('http',v_line),POS('://',v_line)-POS('http',v_line))
|
||||
IF POS('<http',v_line)>0 THEN DO
|
||||
v_weblink=SUBSTR(v_line,POS('://',v_line)+3,LASTPOS('>',v_line)-POS('://',v_line)-3)
|
||||
v_line=DELSTR(v_line,POS('<',v_line)+1,LASTPOS('>',v_line)-POS('<',v_line)-1)
|
||||
SAY v_line
|
||||
v_line=INSERT('@{"'v_protocol'://'v_weblink'" System "URLOpen 'v_protocol' 'v_weblink'"}',v_line,POS('<',v_line))
|
||||
SAY v_line
|
||||
END
|
||||
ELSE DO
|
||||
v_weblink=SUBSTR(v_line,POS('://',v_line)+3,POS(')',v_line)-POS('://',v_line)-3)
|
||||
v_line=DELSTR(v_line,POS('(',v_line)+1,POS(')',v_line)-POS('(',v_line)-1)
|
||||
v_line=INSERT('@{"'v_protocol'://'v_weblink'" System "URLOpen 'v_protocol' 'v_weblink'"}',v_line,POS('(',v_line))
|
||||
END
|
||||
END
|
||||
|
||||
/*
|
||||
Use bold font for all links to make the [ ] encapsulated text stand out.
|
||||
*/
|
||||
IF POS('[',v_line)>0 THEN DO
|
||||
v_line=INSERT('@{b}',v_line,POS('[',v_line)-1)
|
||||
v_line=INSERT('@{ub} ',v_line,POS(']',v_line))
|
||||
END
|
||||
|
||||
CALL WRITELN write_guide,v_line
|
||||
END
|
||||
|
||||
/*
|
||||
Close guide and clean up.
|
||||
*/
|
||||
CALL WRITELN write_guide,'@ENDNODE'
|
||||
|
||||
CALL CLOSE read_md
|
||||
CALL CLOSE write_guide
|
||||
|
||||
/*
|
||||
Install finished README.guide to installation path and delete README.guide.
|
||||
*/
|
||||
ADDRESS COMMAND 'copy README.guide 'p_instpath
|
||||
ADDRESS COMMAND 'delete quiet README.guide'
|
||||
ADDRESS COMMAND 'delete quiet README.conv'
|
||||
|
||||
EXIT
|
||||
BIN
dists/amigaos/scummvm.info
Normal file
BIN
dists/amigaos/scummvm.info
Normal file
Binary file not shown.
BIN
dists/amigaos/scummvm_drawer.info
Normal file
BIN
dists/amigaos/scummvm_drawer.info
Normal file
Binary file not shown.
Reference in New Issue
Block a user