Developing install scripts for packages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Developing install scripts for packages

Hannes Hirzel
Hello

The suggested process for developing external packages is (according
to the Cuis help entry 'Using github to host Cuis packages')


a)    Start with a standard (i.e. fresh) Cuis image. Never save the image.

b)    Set up Git repositories for external packages (if not already done)

c)    Install packages from Git repositories.

d)    Develop. Modify and/or create packages.

e)    Save own packages (to Git repositories).

f)    Git add / commit / push as appropriate.

g)    Fileout changes that are not part of any package. These are
automatically captured in numbered changesets, separated from changes
to packages.

h)    Exit the image. Usually without saving.


Regarding point c)

The 'Installed Packages' tool is meant for that (Context menu on
desktop / 'Open...')

However for doing this repeatedly every day for several packages
(where the load order has to be followed) this is not handy in the
long run.

I'd like to have build scripts.

My first attempt is here

https://github.com/hhzl/Cuis/blob/packages3/packages/PetitParser/README.md

#(
 'packages\PetitParser.pck'
 'packages\PetitTests.pck'
 'packages\PetitTutorial.pck'
)
 do:
    [ :fileName | CodeFileBrowser installPackage:
                      (FileStream concreteStream readOnlyFileNamed: fileName)
    ]


This is supposed to work in a setup you get from
https://github.com/hhzl/Cuis/archive/packages3.zip




Unfortunately it does not work in a fresh image.

I get an error 'PetitParser.pck' does not exist

When I wrote it a few days I seemingly only tested it with an image
which already had the package created.

How do I create such a package with code? (I might search 2 hours it
and then I am still not sure if that is the intended way. I assume for
some of you (in particular Juan :-) this is a 5 minutes exercise; and
I would like to start the discussion about writing install scripts for
packages)


Happy New Year 2013 again

Hannes

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Developing install scripts for packages

Juan Vuletich-4
Hi Hannes,

H. Hirzel wrote:

> Hello
>
> The suggested process for developing external packages is (according
> to the Cuis help entry 'Using github to host Cuis packages')
>
>
> a)    Start with a standard (i.e. fresh) Cuis image. Never save the image.
>
> b)    Set up Git repositories for external packages (if not already done)
>
> c)    Install packages from Git repositories.
>
> d)    Develop. Modify and/or create packages.
>
> e)    Save own packages (to Git repositories).
>
> f)    Git add / commit / push as appropriate.
>
> g)    Fileout changes that are not part of any package. These are
> automatically captured in numbered changesets, separated from changes
> to packages.
>
> h)    Exit the image. Usually without saving.
>
>
> Regarding point c)
>
> The 'Installed Packages' tool is meant for that (Context menu on
> desktop / 'Open...')
>
> However for doing this repeatedly every day for several packages
> (where the load order has to be followed) this is not handy in the
> long run.
>
> I'd like to have build scripts.
>
> My first attempt is here
>
> https://github.com/hhzl/Cuis/blob/packages3/packages/PetitParser/README.md
>
> #(
>  'packages\PetitParser.pck'
>  'packages\PetitTests.pck'
>  'packages\PetitTutorial.pck'
> )
>  do:
>     [ :fileName | CodeFileBrowser installPackage:
>                       (FileStream concreteStream readOnlyFileNamed: fileName)
>     ]
>
>
> This is supposed to work in a setup you get from
> https://github.com/hhzl/Cuis/archive/packages3.zip
>
>
>
>
> Unfortunately it does not work in a fresh image.
>
> I get an error 'PetitParser.pck' does not exist
>
> When I wrote it a few days I seemingly only tested it with an image
> which already had the package created.
>
> How do I create such a package with code? (I might search 2 hours it
> and then I am still not sure if that is the intended way. I assume for
> some of you (in particular Juan :-) this is a 5 minutes exercise; and
> I would like to start the discussion about writing install scripts for
> packages)
>
>
> Happy New Year 2013 again
>
> Hannes
>  

You forgot a directory level, and you hardcoded Windows style slash.
This works for me:

| slash |
slash _ FileDirectory slash.
{
 'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
 'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
 'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
}
 do:
    [ :fileName | CodeFileBrowser installPackage:
                      (FileStream concreteStream readOnlyFileNamed:
fileName)
    ]

BTW, always keep a Transcript open. You get notifications about
installed packages, in addition to the usual undeclared, etc.

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Developing install scripts for packages

Hannes Hirzel
Thank you, Juan

works fine, now fixed in
https://github.com/hhzl/Cuis/blob/packages3/packages/PetitParser/README.md

--Hannes

On 1/1/13, Juan Vuletich <[hidden email]> wrote:

> Hi Hannes,
>
> H. Hirzel wrote:
>> Hello
>>
>> The suggested process for developing external packages is (according
>> to the Cuis help entry 'Using github to host Cuis packages')
>>
>>
>> a)    Start with a standard (i.e. fresh) Cuis image. Never save the
>> image.
>>
>> b)    Set up Git repositories for external packages (if not already done)
>>
>> c)    Install packages from Git repositories.
>>
>> d)    Develop. Modify and/or create packages.
>>
>> e)    Save own packages (to Git repositories).
>>
>> f)    Git add / commit / push as appropriate.
>>
>> g)    Fileout changes that are not part of any package. These are
>> automatically captured in numbered changesets, separated from changes
>> to packages.
>>
>> h)    Exit the image. Usually without saving.
>>
>>
>> Regarding point c)
>>
>> The 'Installed Packages' tool is meant for that (Context menu on
>> desktop / 'Open...')
>>
>> However for doing this repeatedly every day for several packages
>> (where the load order has to be followed) this is not handy in the
>> long run.
>>
>> I'd like to have build scripts.
>>
>> My first attempt is here
>>
>> https://github.com/hhzl/Cuis/blob/packages3/packages/PetitParser/README.md
>>
>> #(
>>  'packages\PetitParser.pck'
>>  'packages\PetitTests.pck'
>>  'packages\PetitTutorial.pck'
>> )
>>  do:
>>     [ :fileName | CodeFileBrowser installPackage:
>>                       (FileStream concreteStream readOnlyFileNamed:
>> fileName)
>>     ]
>>
>>
>> This is supposed to work in a setup you get from
>> https://github.com/hhzl/Cuis/archive/packages3.zip
>>
>>
>>
>>
>> Unfortunately it does not work in a fresh image.
>>
>> I get an error 'PetitParser.pck' does not exist
>>
>> When I wrote it a few days I seemingly only tested it with an image
>> which already had the package created.
>>
>> How do I create such a package with code? (I might search 2 hours it
>> and then I am still not sure if that is the intended way. I assume for
>> some of you (in particular Juan :-) this is a 5 minutes exercise; and
>> I would like to start the discussion about writing install scripts for
>> packages)
>>
>>
>> Happy New Year 2013 again
>>
>> Hannes
>>
>
> You forgot a directory level, and you hardcoded Windows style slash.
> This works for me:
>
> | slash |
> slash _ FileDirectory slash.
> {
>  'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>  'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>  'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
> }
>  do:
>     [ :fileName | CodeFileBrowser installPackage:
>                       (FileStream concreteStream readOnlyFileNamed:
> fileName)
>     ]
>
> BTW, always keep a Transcript open. You get notifications about
> installed packages, in addition to the usual undeclared, etc.
>
> Cheers,
> Juan Vuletich
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org