Page 1 of 2

Package manger - Script Language

Posted: Thu Jan 06, 2005 4:01 pm
by Dr. Fred
We want to code a package manager for ReactOs.
For this we need a script lang.

Here is an example for the Basic based one:

Code: Select all

Sub Main
  'This a comment
  download("http://www.somewere.org/setup.zip")
  extract("setup.zip")
End Sub

Sub After
  shell setup.exe
End Sub
and here is one for the batch file based.

Code: Select all

# This is a comment
main:
downl http://www.somewere.org/setup.zip
unzip setup.zip
after:
run setup.exe
But for advanced Stuff (like "if") we can go the Basic way here, too.

For more information about the package manager see the wiki and the topic Packet Manager on this board. General Things about it should be posted there.

Posted: Thu Jan 06, 2005 4:03 pm
by Dr. Fred
PS: My vote is the batch file one beause it's easier to implement,

Posted: Thu Jan 06, 2005 4:34 pm
by Phalanx
A batch file one is not good enough. It does not allow for file version checks, registering files, extra user input, downloading extra parts, updating and creating settings and much more. It simply does not have what is required.

Posted: Thu Jan 06, 2005 4:39 pm
by Dr. Fred
You can do that in a batch file, too. Alought I my suggestion was to go the Vb way for such advanced stuff.

Anyway we don't have to do everything like the original lang.

Posted: Thu Jan 06, 2005 5:33 pm
by Harteex
Phalanx wrote:A batch file one is not good enough. It does not allow for file version checks, registering files, extra user input, downloading extra parts, updating and creating settings and much more. It simply does not have what is required.
Of course you can do that, it just depends which commands you implement. Just because it's a batch style, doesn't mean you're bound to standard batch file commands.

My vote is on batch.

Posted: Thu Jan 06, 2005 5:43 pm
by Dr. Fred
Looks like this will be a close run.

Ohh.. I forgot to tell you the vote is for 3 days.

Posted: Thu Jan 06, 2005 6:46 pm
by Phalanx
The lack of variables and control structures are the problem in doing the above things. It will mean you will have to create programs to do the install and updates and running them is all the batch script will do, which just makes more work.

Posted: Thu Jan 06, 2005 8:37 pm
by Dr. Fred
Phalanx wrote:is all the batch script will do, which just makes more work.
This is not not a batch script ! It only looks like one. It's a brand new lang.

Posted: Thu Jan 06, 2005 9:35 pm
by frik85
Dr. Fred wrote:PS: My vote is the batch file one beause it's easier to implement,
I voted for a basic/vbscript like script language.

Posted: Thu Jan 06, 2005 10:35 pm
by Stof91
Dr. Fred wrote:
Phalanx wrote:is all the batch script will do, which just makes more work.
This is not not a batch script ! It only looks like one. It's a brand new lang.
ROScript ;)

Posted: Fri Jan 07, 2005 12:56 am
by Asraniel
Why cant you make the ROS shell more or less unix like but at the same time windows compatible, so you would have no problems at all

Posted: Fri Jan 07, 2005 7:32 am
by volksgeist III
I realize this might be an ignorant question, but why not just ship with (my favourite scripting language) Python? It's very simple, intuitive syntax, and is also very powerful.

Failing that, I would vote for basic ahead of batch.

Posted: Fri Jan 07, 2005 8:17 am
by Phalanx
Cause it is not a windows language and makes it yet another language for developers to learn.

Posted: Fri Jan 07, 2005 10:41 am
by Dr. Fred
The problem is that many don't want Python. (See above) And that we don't if the ros devlopers allow us to upload the libs to the tree.

Batch Based

Posted: Fri Jan 07, 2005 1:19 pm
by avryhof
I like Batch based.

...But not MS-DOS Batch File Based, Base it on the 4DOS Batch interpreter.

http://www.jpsoft.com/

4DOS Batch files have variabls, arrays, and alot of other things standard batch files don't... and since it's a win32 version, the screen drawing functions should be replaced with form drawing functions.

Code: Select all

@echo off
openwin /title="My Window" /handle=01
addbutton /window=01 /x=50 /y=240 /caption="My Button" /errorlevel=1
...add more controls here...

do while errorlevel 0
loop

on errorlevel 1 do something
What do you think? Sort of Batch sort of event driven, and very powerful.[/code]