amiga-news DEUTSCHE VERSION
.
Links| Forums| Comments| Report news
.
Chat| Polls| Newsticker| Archive
.

amiga-news.de Forum > Programmierung > env-variable aus install-skript setzen? [ - Search - New posts - Register - Login - ]

-1- [ - Post reply - ]

2010-04-11, 22:29 h

AGSzabo
Posts: 1663
User
hi,

im installer skript kann man env-variablen aus env: lesen. gibts auch ne möglichkeit diese zu schreiben (nach env UND envarc)? wäre gut.

ags
--
Sam mini os4.1 -- e-uae 39bb2 -- A4000D 3.0 - 2mbchip/8mbfast - Ariadne_II - ide DVD und HD -- A500 3.1 (mkick) adide 50mb -- Duron 1200mhz Ubuntu Linux

[ Dieser Beitrag wurde von AGSzabo am 11.04.2010 um 22:33 Uhr geändert. ]

[ - Answer - Quote - Direct link - ]

2010-04-11, 22:33 h

thomas
Posts: 7717
User
@AGSzabo:

(run "setenv hugo "Hello World !"")

Gruß Thomas

--
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/

[ - Answer - Quote - Direct link - ]

2010-04-12, 03:21 h

Polluks
Posts: 105
User
@AGSzabo:
(run "setenv hugo "Hello World !"")
(run "setenv SAVE hugo "Hello World !"")

[ - Answer - Quote - Direct link - ]

2010-04-12, 10:52 h

DaxB
Posts: 1421
User
Das SAVE Argument von Setenv wird unter OS3.1 nicht unterstützt. Daher lieber copy oder echo benutzen. Shell Beispiel:
code:
echo "Hello World!" >env:hugo
echo "Hello World!" >envarc:hugo


[ - Answer - Quote - Direct link - ]

2010-04-12, 11:21 h

AGSzabo
Posts: 1663
User
so funktioniert es nicht:

(es wird immer auf OFF geschaltet)

code:
(set #choice

    (askchoice

        (prompt "nnDo you want to de-activate the skins? This is recommended if your system is relatively slow or low on colors.nn")

        (help "If you do deactivate the skins they will anyhow be installed, but deactivated. Later you can try the skins by activating them temporary in 'xuilibinfo'. See readme INSTALLATION section for this.")

        (choices "Please USE the skins!" "Please deactivate all skins!")

        (default 0)
    )
)

(if (in #choice 0)

(run "echo "ON" >env:xui/usebgimages")
(run "echo "ON" >envarc:xui/usebgimages")

)

(if (in #choice 1)

(run "echo "OFF" >env:xui/usebgimages")
(run "echo "OFF" >envarc:xui/usebgimages")

)


wie geht das richtig?
--
Sam mini os4.1 -- e-uae 39bb2 -- A4000D 3.0 - 2mbchip/8mbfast - Ariadne_II - ide DVD und HD -- A500 3.1 (mkick) adide 50mb -- Duron 1200mhz Ubuntu Linux

[ Dieser Beitrag wurde von AGSzabo am 12.04.2010 um 11:48 Uhr geändert. ]

[ - Answer - Quote - Direct link - ]

2010-04-12, 11:54 h

thomas
Posts: 7717
User
@AGSzabo:

Wie kommt man denn auf "in", um einen Vergleich durchzuführen ?


code:
The 'IN' Function
-----------------

     (IN  <expression> <bit number-1> ...)

   Returns 0 if none of the given bit numbers (starting at 0 for the
LSB) is set in the result of expression, else returns a mask of the
bits that were set.


In der 1 ist das Bit 0 (das den Wert 1 hat) natürlich gesetzt. Und das Bit 1 (mit dem Wert 2) ist nicht gesetzt. Deshalb landest du immer in dem Off-Zweig.

Versuchs mal mit "=" zum Vergleichen.

Außerdem hast du den Aufbau des If nicht ganz verstanden. Die erste Anweisung ist der "then"-Zweig und die zweite der "else"-Zweig. Wenn du beide Anweisungen im "then"-Fall ausführen möchtest, mußt du Klammern drum machen.

code:
(if (= #choice 1)
  (;then
    (run "setenv xui/usebgimages ON")
    (run "setenv envarc:xui/usebgimages ON")
  ); end of then
  (;else
    (run "setenv xui/usebgimages OFF")
    (run "setenv envarc:xui/usebgimages OFF")
  );end of else
);end of if


Gruß Thomas

--
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/

[ - Answer - Quote - Direct link - ]

2010-04-12, 12:54 h

AGSzabo
Posts: 1663
User
@thomas:

danke, jetzt funktioniert es!

> Wie kommt man denn auf "in", um einen Vergleich durchzuführen ?

indem man noch überhaupt keine ahnung von der materie hat, ein beispiel kopiert und das "in" im guide nicht beim "if" findet und letztlich misachtet dass es im beispiel um options ging.

ags
--
Sam mini os4.1 -- e-uae 39bb2 -- A4000D 3.0 - 2mbchip/8mbfast - Ariadne_II - ide DVD und HD -- A500 3.1 (mkick) adide 50mb -- Duron 1200mhz Ubuntu Linux

[ - Answer - Quote - Direct link - ]


-1- [ - Post reply - ]


amiga-news.de Forum > Programmierung > env-variable aus install-skript setzen? [ - Search - New posts - Register - Login - ]


.
Masthead | Privacy policy | Netiquette | Advertising | Contact
Copyright © 1998-2024 by amiga-news.de - all rights reserved.
.