Package manger - Script Language

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Which script languge do you like better ?

Poll ended at Sun Jan 09, 2005 4:01 pm

A basic based one.
17
63%
A Batch file based one.
10
37%
 
Total votes: 27

Dr. Fred
Developer
Posts: 607
Joined: Wed Dec 22, 2004 10:09 pm
Location: Amsterdam

Re: Package manger - Script Language

Post by Dr. Fred »

What do you think? Sort of Batch sort of event driven, and very powerful.
Looks good.
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
1. We are not talk about a shell we are talking about a script lang for the package manger.
2. Most Windows User would not want it.
Where do you want ReactOS to go today ?
Pythagoras1
Posts: 15
Joined: Fri Jan 07, 2005 5:08 pm
Location: Vienna (Wien)

Post by Pythagoras1 »

However I would vote for Python if available.

at least the language should support structured programming (maybe basic?).
Dr. Fred
Developer
Posts: 607
Joined: Wed Dec 22, 2004 10:09 pm
Location: Amsterdam

Post by Dr. Fred »

I started coding a simple Basic Interpreter yesterday. I hope to finish it this weekend.

PS: I made it C++, not C as I orignally wanted. Coding a Interpreter without using the STL is even hard enought. :wink:
Where do you want ReactOS to go today ?
Drs
Posts: 6
Joined: Thu Dec 23, 2004 1:17 am
Contact:

Post by Drs »

Why not use Perl? Perl is an excellent scripting language and does everything you could ever dream to do :)
--
Devin
Tristan
Posts: 3
Joined: Mon Dec 06, 2004 9:21 am

Cart befor the horse...

Post by Tristan »

Hi Dr Fred,

I think that you need to decide exactly what your package manager is going to do before you decide on a scripting language.
Looking at the example you posted (oversimplified, I know) you don't need any language at all. A simple shell script would do the trick without the need for you to re-invent the wheel and write a new interpreter.

Perhaps people on this forum could help with a set of requirements? I would like to see how things like error handling and dependency checking would work.

Why not have a look at RPM, or Java Webstart, or even Installshield for ideas? They all work pretty well.

I would personally like to see something along the lines of the ant build tool (http://ant.apache.org) where the 'script' is an XML file. It would save you a lot of work since your interpreter would simply be an XML parser. The other nice thing is that it would be trivial to generate new scripts from a wide variety of applications.
Dr. Fred
Developer
Posts: 607
Joined: Wed Dec 22, 2004 10:09 pm
Location: Amsterdam

Re: Cart befor the horse...

Post by Dr. Fred »

Tristan wrote:I think that you need to decide exactly what your package manager is going to do before you decide on a scripting language.
Well. I'm tried of planning after 158 posts about the topic. There still things to think about e.g. that might the API look like, but most things are clear now.
A simple shell script would do the trick without the need for you to re-invent the wheel.
The problem is the error handling. How should a shell-script (or batch-file in windows) report to the program that something went wrong ?
I would like to see how things like error handling and dependency checking would work.
Maybe I should update the wiki. However the program works like this works like this:
1. download tree file from SVN (using http interface)
2. let the user browse trow the tree
3. If he clicks on a icon the description file (dependencies are listed here too) will be downloaded
4. he has chooses all packages he wants to install
5. the program downlaods the script files and interpretes them.
6. when something wents wrong the installation of the package will be stopped
Why not have a look at RPM, or Java Webstart, or even Installshield for ideas?
Actually I think, we have enough ideas here. And the this are no good sources for ideas.
It would save you a lot of work since your interpreter would simply be an XML parser.
We have ready thought about something like that, but i don't think that this is much harder to implement.
Where do you want ReactOS to go today ?
Harteex
Posts: 224
Joined: Fri Nov 26, 2004 9:21 pm
Location: Sweden
Contact:

Re: Cart befor the horse...

Post by Harteex »

Dr. Fred wrote:
Tristan wrote:A simple shell script would do the trick without the need for you to re-invent the wheel.
The problem is the error handling. How should a shell-script (or batch-file in windows) report to the program that something went wrong ?
In batch files in windows you can check on ERRORLEVEL.
Tristan
Posts: 3
Joined: Mon Dec 06, 2004 9:21 am

Overkill

Post by Tristan »

OK. There are thousands of different solutions to every problem. My opinion is that creating yet another scripting language is overkill - particularly when (a perfectly good?) one already exists in your shell.
To be fair though, a potential problem with this approach is that ROS may eventually have a number of different shells available - each with their own scripting languages.

<shameless plug>
I still think an XML configuration file is best. It can be automatically generated by build tools (helping application developers) AND it is inherently cross-platform.
</shameless plug>
Dr. Fred
Developer
Posts: 607
Joined: Wed Dec 22, 2004 10:09 pm
Location: Amsterdam

Post by Dr. Fred »

I don't think that there is a script lang, called batch-files, we could use that easy. I've never seen a program that uses that as it's script lang.

And about the XML thing. That is just not that is XML has been made for. XML is made for descriptions that is what we will use it for.
Where do you want ReactOS to go today ?
Dr. Fred
Developer
Posts: 607
Joined: Wed Dec 22, 2004 10:09 pm
Location: Amsterdam

Post by Dr. Fred »

I've just uploaded what i have done at the weekend.

Here
Where do you want ReactOS to go today ?
Phalanx
Posts: 360
Joined: Sun Dec 19, 2004 12:42 am
Location: Australia

Post by Phalanx »

Maybe the install functions could be part of an object like app is an object with many functions. Call it something like install, so
install.download "http://yada.com/ft.cab"
Could we also have a form of resources stored in an xml file. That way the EULA or what every could be found in the XML file.
Dr. Fred
Developer
Posts: 607
Joined: Wed Dec 22, 2004 10:09 pm
Location: Amsterdam

Post by Dr. Fred »

Phalanx wrote:Maybe the install functions could be part of an object like app is an object with many functions.
That could be done easily. Just chance the name form "download" to "whatever.download". :wink: I don't know what the others want.
Phalanx wrote:Could we also have a form of resources stored in an xml file. That way the EULA or what every could be found in the XML file.

I don't if I understood you right, but I think that was already planed.
Where do you want ReactOS to go today ?
frik85
Developer
Posts: 829
Joined: Fri Nov 26, 2004 7:48 pm
Location: Austria, Europe
Contact:

Post by frik85 »

Dr. Fred wrote:
Phalanx wrote:Maybe the install functions could be part of an object like app is an object with many functions.
That could be done easily. Just chance the name form "download" to "whatever.download". :wink: I don't know what the others want.
Yes, I like the vbscript way!

Code: Select all

rps.download("http://www.xyz.com/file01.zip")
RPS stand for Ros Packet Script (Host)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 74 guests