Code Monkey home page Code Monkey logo

installerlg's People

Contributors

aggre55or avatar gareth-smyth avatar polluks avatar sodero avatar wawatok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

installerlg's Issues

vbcc: retrace hits

This line makes trouble
(set @back 1) (trace) (trace) (set f (askfile (prompt "p") (help "h") (default "d") (back (retrace)))) ; "","Line 1: Max recursion depth exceeded 'retrace' phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 0",""

--- 20200517 04:11:22 ---
TLSF_FreePooled: pool 0x1400f0f0 ptr 0x22252250 wrong size 591014652 (memory was allocated for 547786005-547786020 bytes)

[20200517 04:11:22] >>> DumpTaskState
----------------------------------------------------------------------
      Task 0x24ed2958 Name 0x24ed6a3c <vfork()'d process> Type 13 Pri 0
     Flags 0x8 State 2 IDNestCnt -1 TDNestCnt -1
  SigAlloc 0x0000ffff    SigWait 0x00000100 SigRecvd 0x04000100 SigExcept 0x00000000
ExceptCode 0x10120dec ExceptData 0x00000000 TrapCode 0x10120de4  TrapData 0x00000000
    Switch 0x00000000     Launch 0x00000000 UserData 0x00000000
   SPLower 0x24ed2a3c    SPUpper 0x24ed6a3c    SPReg 0x22256180
----------------------------------------------------------------------
         ETask 0x215f8054
       MemPool 0x236257f0     PPCLibData 0x00000000
    PPCSPLower 0x252d1fdc     PPCSPUpper 0x252e1fe0
PPCTrapMsgPort 0x00000000 PPCTrapMessage 0x247a2b4c
   PPCRegFrame 0x252e1b00
     Private[] 0x00000000 0x00000000 0x00000000 0x00000000
    EmulHandle 0x00000000
----------------------------------------------------------------------
 EmulHandle 0x252e19b0     Type 0x00000004    Flags 0x00000001
----------------------------------------------------------------------
   SRR0 0x1011ffe4 SRR1 0x02007030
     LR 0x1010f074  CTR 0x11267588
     CR 0x82224882  XER 0x00000000
GPR[00] 11267588 252e0a60 252e19b0 0000bc00 00000006 00000002 0000001f 24224842
GPR[08] 00000000 00000000 00000000 00000000 10001000 255ea740 00000000 00000000
GPR[16] 00000000 00000000 24ed6a3c 24ed2a3c 24ed6a38 00000016 093b4a8f 24ed6a34
GPR[24] 00004000 14001948 252e0e68 215f8054 24ed2958 00000000 10020010 252e1b00
SRR0 -> exec_of_604e.elf Hunk 0 Offset 0x0001ffe4
  LR -> exec_of_604e.elf Hunk 0 Offset 0x0000f074
>>> Task Stack History
----------------------------------------------------------------------
StackFrame[ 0].LR[0x1011e7f8] -> exec_of_604e.elf [Hunk 0 Offset 0x0001e7f8]
StackFrame[ 1].LR[0x1010a0bc] -> exec_of_604e.elf [Hunk 0 Offset 0x0000a0bc]
StackFrame[ 2].LR[0x10106ba4] -> exec_of_604e.elf [Hunk 0 Offset 0x00006ba4]
StackFrame[ 3].LR[0x10294e28] -> dos.elf [Hunk 0 Offset 0x00003168]
StackFrame[ 4].LR[0x10294f90] -> dos.elf [Hunk 0 Offset 0x000032d0]
StackFrame[ 5].LR[0x102b262c] -> dos.elf [Hunk 0 Offset 0x0002096c]
StackFrame[ 6].LR[0x102b2244] -> dos.elf [Hunk 0 Offset 0x00020584]
StackFrame[ 7].LR[0x148f5058] -> MOSSYS:LIBS/ixemul.library [Hunk 1 Offset 0x000460c0]
StackFrame[ 8].LR[0x148f4908] -> MOSSYS:LIBS/ixemul.library [Hunk 1 Offset 0x00045970]
StackFrame[ 9].LR[0x148f41c4] -> MOSSYS:LIBS/ixemul.library [Hunk 1 Offset 0x0004522c]
StackFrame[10].LR[0x1bc4bd4c] -> sh [Hunk 1 Offset 0x0000989c]
StackFrame[11].LR[0x1bc502c4] -> sh [Hunk 1 Offset 0x0000de14]
StackFrame[12].LR[0x1bc4c770] -> sh [Hunk 1 Offset 0x0000a2c0]
StackFrame[13].LR[0x1bc4b4dc] -> sh [Hunk 1 Offset 0x0000902c]
StackFrame[14].LR[0x1bc50664] -> sh [Hunk 1 Offset 0x0000e1b4]
StackFrame[15].LR[0x1bc4b1c4] -> sh [Hunk 1 Offset 0x00008d14]
>>> Full PPC mode: Last 68k context
----------------------------------------------------------------------
   PC 14927d50 SR 0008
Dn[0] 233a2afc 00000015 00001000 1f95ebe0 00000016 094b8494 00000101 00000000
An[0] 24ed2958 22252250 140222bc 23bf4a7c 00000000 102c0a04 14001948 24ed6a34
PC -> MOSSYS:LIBS/ixemul.library Hunk 4 Offset 0x00000158
Stack: 0x24ed6a34
>>> Last saved PPCThread State
----------------------------------------------------------------------
SRR0 0x1011ff18 SRR1 0x200f030 LR 0x1010f074 R1 0x252e1050
GPR[00] 11267588 252e1050 252e1210 0000bc00 00000006 00000002 0000001f 24224842
GPR[08] 00000000 00000000 00000000 00000000 10001000 14021ca0 00000000 1133e21c
GPR[16] 00000002 08adc885 230c839d 00000001 00000001 00000010 24ed2958 00000000
GPR[24] 00000101 00000000 140221a0 230c839d 00000005 148a57e0 148a583c 14001948
  FPSCR 82028000
FPR[00] 3e263120002f6e75 6c6c20323e263120 005c282e2a5c295c 5c222e2a5c242f00
FPR[04] 406cc00000000000 0000000000000000 0000000000000000 3ff0000000000000
FPR[08] 3ff0000000000000 3f90000000000000 41e0000000000000 4330000000000000
FPR[12] 412263ba9a38e38e 3ffa5f5fa6b5e96b 0000000000000000 0000000000000000
FPR[16] 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR[20] 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR[24] 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR[28] 0000000000000000 0000000000000000 0000000000000000 0000000000000000
SRR0 -> exec_of_604e.elf Hunk 0 Offset 0x0001ff18
  LR -> exec_of_604e.elf Hunk 0 Offset 0x0000f074

----------------------------------------------------------------------
    SegList 0x08a23a40        GlobVec 0x140222bc
  StackBase 0x093b4a8f      StackSize 0x00004000
    TaskNum 0x00000007        Result2 0x00000000
 CurrentDir 0x085d6def            CIS 0x088d6bcd
        COS 0x08adc885            CES 0x08c54257
ConsoleTask 0x1a944758 FileSystemTask 0x1436855c
        CLI 0x0836a4f7     ReturnAddr 0x24ed6a38
    PktWait 0x00000000      WindowPtr 0x00000000
     HomeDir 0x0851d373         Flags 0x0000005e
    ExitCode 0x00000000      ExitData 0x00000000
   Arguments 0x00000000  ShellPrivate 0x00000000
[20200517 04:11:22] >>> End of DumpTaskState Dump
----------------------------------------------------------------------

clang: one error

clang -I . -I ../src -Os -std=gnu99 -DAMIGA -noixemul -Wall -Wextra -Werror -pedantic -Wno-gnu-statement-expression -Wno-pointer-sign -D__AMIGADATE__="\"(07.08.2020)\""    -c -o file.o ../src/file.c
../src/file.c:1037:43: error: address of array 'fib->fib_Comment' will always evaluate to 'true'
      [-Werror,-Wpointer-bool-conversion]                                                                                  
    if(lock && Examine(lock, fib) && fib->fib_Comment)
                                  ~~ ~~~~~^~~~~~~~~~~
1 error generated.

MUI warning with Skip

It was a normal copyfiles:

Application_Application_RemInp: inputhandler: msg=45dda05c ihnode=300d40a4 flags=00000001 sigs=000a0000
Application_Application_RemInp: HANDLER NOT IN LIST. NOT REMOVING IT

String comparison quirk

The CBM installer has a special case where numeric <-> string comparison doesn't trigger conversions. Instead 0 is interpreted as "", but this is only done when the number is 0 and the string is a symbolic reference.

Refer to the IBrowse script (#multiview is not defined before the 'if'):

(if (exists "sys:system/multiview")
(set #multiview "sys:system/multiview")
)

(if (= #multiview 0)
(message #multiview-error)
(run (cat #multiview " ReadMe.txt") )
)

Updating user-startup fails

When an installer running under 68k Amiga OS tries to update an existing user-startup the temporary file is created, but fails to open so the installer quits.

I think it is an issue with the mode, i'll create a pull request for a fix.

Abort window

Its text should not "Proceed".
Maybe RC should be RETURN_WARN.

ASpell fails

AlphaSpell/Docs/Register
Line 7: syntax error, unexpected STR, expecting SYM or ')' '"Installer program to create a registration form for AlphaSpell."'
At least line 30 is broken says the MorphOS Installer and Installer 43.

Parsing error for workbench3.1 install

The workbench3.1 install script seems to have a mistake in the following section that is handled differently in InstallerLG (I've removed some lines).

(set startupII        (tackon target "S/StartupII"))
(set cli-startup      (tackon target "S/CLI-Startup"))

(set oldfiles "")
(if (exists startupII)
(
    (set oldfiles (cat oldfiles startupII "�����������\n"))   ; these are hard spaces
))

(if (exists cli-startup)
(
    (set oldfiles (cat oldfiles s/cli-startup "���������\n"))   ; these are hard spaces
))

I think the second last line should be using the variable cli-startup instead of the unquoted string s/cli-startup.

Original installer
The Install3.1 installer parses this okay, but will concatenate s/cli-startup as if it were an empty string

InstallerLG
InstallerLG fails with Line 3616: syntax error '/'

Test script
This script will output "AC" on the original install and a parse error in InstallerLG.

(set cli-startup "B")
(debug (cat "A" s/cli-startup "C"))

Return code improvements

Suggestion:

#define RETURN_OK 0 /* No problems, success /
#define RETURN_WARN 5 /
User abort /
#define RETURN_ERROR 10 /
Script error /
#define RETURN_FAIL 20 /
InstallerLG failure */

File not found / readable -> RETURN_ERROR + 1

Crash on free() in AROS i386

Hi,

I'm trying to bring InstallerLG v40 into AROS core. It crashes in arg_done:

#4 0xd97ae6c4 in free (memory=0xd9fb06e7) at /home/mazze/projects/fullaros/aros-src/compiler/stdc/./free.c:62
#5 0xd9ff2e9e in arg_done ()
at /home/mazze/projects/fullaros/aros-linux-i386-dbg/bin/linux-i386/Ports/installerlg/alpha.40/sodero-InstallerLG-07832d6/src/args.c:286
#6 0xd9fdb018 in main (argc=0, argv=0xd9c500a0) at ../src/lexer.l:298

(gdb) p args
$25 = {0x0, 0x0, 0xd9fb06e7 "", 0x0, 0x0, 0x0, 0xda023e40 "System:Utilities", 0x0, 0x0, 0x0}
(gdb) p args[arg]
$26 = 0xd9fb06e7 ""

Copyfile in 68k IoERR() failure

The code in file.c handling copyfiles seems to be inconsistently broken when AMIGA is defined.

    static char buf[BUFSIZ];
    FILE *file = h_fopen(contxt, src, "r", false);
    size_t cnt = file ? fread(buf, 1, BUFSIZ, file) : 0;
    int err =
        #if defined(AMIGA) && !defined(LG_TEST)
        IoErr();
        #else
        file ? ferror(file) : 0;
        #endif

    if(!file || err)

I think the problem is that IoErr() is used to get the error, but according to the docs (http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node02C2.html) the return value from IoErr() is not guaranteed in the case of success.

I am going to suggest removing the Amiga specific code. I get the error as part of the Workbench 3.1 install when it tries to copy AddDataTypes, when I change the code the files copy successfully.

    static char buf[BUFSIZ];
    FILE *file = h_fopen(contxt, src, "r", false);
    size_t cnt = file ? fread(buf, 1, BUFSIZ, file) : 0;
    int err = file ? ferror(file) : 0;

    if(!file || err)

I don't know how to simulate a failed read to be able to test this. I tried removing the "readable" protection bit but that results in the h_fopen returning zero,

Replacement for "AROS Installer"

How about replacing this tool by an installer script?
Of course we need some kind of partition management, maybe a special HDToolbox mode?

MUIbase 4.1 installer fails

(protect (tackon #destination "MUIbase") "+rwed")
MUIbase

[49:run] Executed 'C:Version >NIL: MorphOS'.
[598:makedir] Created 'New_Work:Applications/MUIbase'.
[608:makedir] Created 'New_Work:Applications/MUIbase/Include'.
[618:makedir] Created 'New_Work:Applications/MUIbase/Projects'.
[631:copyfiles] Directory 'New_Work:Applications/MUIbase' exists already.
[631:copyfiles] Get mask '' 2
[631:copyfiles] Protect 'New_Work:Applications/MUIbase' 2
[631:copyfiles] Copied 'LiesMich' to 'New_Work:Applications/MUIbase/LiesMich'.
[631:copyfiles] Get mask 'LiesMich' 0
[631:copyfiles] Protect 'New_Work:Applications/MUIbase/LiesMich' 0
[650:copyfiles] Directory 'New_Work:Applications/MUIbase' exists already.
[650:copyfiles] Get mask 'MUIbase-ppc-morphos' 0
[650:copyfiles] Protect 'New_Work:Applications/MUIbase' 0
[651:protect] Get mask 'New_Work:Applications/MUIbase/MUIbase' -1

String formating is to picky

The CBM installer doesn't verify the correctness when doing string formatting. It accepts things like:

("int:%ld" undef) -> 0
("str:%s" undef) -> ""
("str:%s" 1) -> ""
("num:%ld" "NAN") -> garbage

InstallerLG should do the same - the garbage.

Escape not working on MorphOS

It's not possible to abort using on MorphOS. The abort button doesn't work when copying files either. It's seems as if the MUI notifications are messed up.

(delopts) as a function rather than an option to a function

The workbench 3.1 install disk uses "delopts" at the root level as follows...

(delopts "oknodelete" "force" "askuser")

InstallLG is unable to parse this as it only expects "delopts" as an option to functions.

I'm not sure if the installer should allow this but since it's used in the official workbench install it seems like it should be handled in some way.

vbcc compiles but execution fails

This compiler seems to be more restrictive:

vc +aos68k -c99 -Ivbcc:PosixLib/include   -c -o eval.o eval.c
>    if(gui_init(status))
error 39 in line 479 of "eval.c": invalid types for assignment
1 error found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "eval.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include  -O=1 -Ivincludeos3: failed
make: *** [eval.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include   -c -o external.o external.c
>            inp_t grc = gui_confirm(str(prompt), str(help), back);
error 39 in line 88 of "external.c": invalid types for assignment
1 error found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "external.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include  -O=1 -Ivincludeos3: failed
make: *** [external.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include   -c -o file.o file.c
>            grc = gui_confirm(get_buf(), hlp, back);
error 39 in line 138 of "file.c": invalid types for assignment
>                    );
error 39 in line 1464 of "file.c": invalid types for assignment
>                                                 cur->copy, back, mode);
error 39 in line 1494 of "file.c": invalid types for assignment
>                                    grc = h_copyfile(contxt, src, name, back, m
error 39 in line 1797 of "file.c": invalid types for assignment
>                                    grc = h_copyfile(contxt, src, name, back, m
error 39 in line 1816 of "file.c": invalid types for assignment
>                            grc = h_copyfile(contxt, src, name, back, mode);
error 39 in line 1823 of "file.c": invalid types for assignment
>                                    grc = h_copyfile(contxt, src, name, back, m
error 39 in line 1950 of "file.c": invalid types for assignment
>                                    grc = h_copyfile(contxt, src, name, back, m
error 39 in line 1959 of "file.c": invalid types for assignment
>                                        grc = h_copyfile(contxt, src, name, bac
error 39 in line 1981 of "file.c": invalid types for assignment
9 errors found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "file.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include  -O=1 -Ivincludeos3: failed
make: *** [file.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include   -c -o information.o information.c
>                    inp_t grc = gui_message(msg, back);
error 39 in line 196 of "information.c": invalid types for assignment
1 error found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "information.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include  -O=1 -Ivincludeos3: failed
make: *** [information.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include   -c -o prompt.o prompt.c
>                    inp_t grc = gui_bool(prt, hlp, yes, nay, back);
error 39 in line 82 of "prompt.c": invalid types for assignment
>                    inp_t grc = gui_choice(prt, hlp, chs, ndx - del, back, &DNU
error 39 in line 281 of "prompt.c": invalid types for assignment
>                                           def, back, &ret);
error 39 in line 373 of "prompt.c": invalid types for assignment
>                                            def, back, &ret);
error 39 in line 647 of "prompt.c": invalid types for assignment
>                    inp_t grc = gui_number(prt, hlp, min, max, def, back, &DNUM
error 39 in line 768 of "prompt.c": invalid types for assignment
>                    inp_t grc = gui_options(prt, hlp, chs, ndx, back, &DNUM);
error 39 in line 929 of "prompt.c": invalid types for assignment
>                    inp_t grc = gui_string(prt, hlp, def, back, &res);
error 39 in line 1009 of "prompt.c": invalid types for assignment
7 errors found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "prompt.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include  -O=1 -Ivincludeos3: failed
make: *** [prompt.o] Error 20
make: Target `Installer' not remade because of errors.

ALPHA41 bug

Installer "InstallerLG installer"
Line 63: syntax error, unexpected ')' ')'

ASSERT w/ vbcc

vc +aos68k -c99 -Ivbcc:PosixLib/include -Ivbcc:MUI/C/include -DMUIA_Dtpic_Name=0x80423d72 -I. -I../build -I../src -O -dontwarn=153 -DAMIGA -DLG_TEST   -c -o alloc.o alloc.c
>    ASSERT(src && dst)
error 273 in line 270 of "alloc.c": not enough arguments to macro
unexpected end of file
1 error found!

I don't know why the ellipsis of the macro is ignored...

Esc aborts

Because of MUI, a simple key press may abort the installation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.