Script Library: 1238 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Help for uploading files in a package

1. Types of files in a package

There are two types of file you can put in a package:

  • Your files that you upload
  • Existing library scripts

1.1. Your files that you upload

The upload page lets you specify up to five files at a time. If you have more than five, do them in batches. Each time, after you click the update button, the Package Details table (towards the bottom of the page) will update to show what files are now in the package.

  • Notes -- optionally, use this field for any notes that the user may need to read when installing the package, eg "This file only needed on LINUX" or "Run this file to execute the application"
  • Version -- optionally, supply a version number for the file. This may help you and your users keep track of what has changed in a package
  • Installation folder -- optionally, supply a folder name into which this file will be installed when downloaded.
    • The folder name will be taken as relative to the main installation folder
    • Example: package is being downloaded into c:\rebol\mystuff and the installation folder for a file says images/jpgs/, that file will be downloaded into c:\rebol\mystuff\images\jpgs\
    • When deciding on folder structures for your package, please bear in mind cross-platform issues -- see notes on file names, below.

Please don't upload zip, tar, rip or any other sort of archive file:

  • Though it may take you a little longer to upload each file individually the first time, it'll be that much faster to make changes later
  • It makes it harder for the user to install your application -- rather than running the downloader and having the files immediately available, they need to take an extra step to unzip the downloaded files
  • It makes it harder for the user to refresh their copy of a package. With individual files, the downloader will refresh just those that have changed. With an archive format, that becomes a manual process -- the downloader refreshes the whole archive; then the user has to extract the changed files

To update the notes on a file or its version number, you'll have to upload it again. Sorry. But there is no better way yet available.

To remove a file from the package, tick the Tick to delete checkbox in the Package Details table and click the update button again.

1.2. Existing Library scripts

If your package needs existing scripts from the Library (e.g. values.r or map.r), type their full names into the Other library scripts needed box.

  • You do not need to be the owner of a script to include it in one of your packages -- but it would be good rebiquette to let them know that you are using their work in this way.
  • When a user downloads the package, they will be sent the latest version of the existing Library script automatically -- you do not need to update your package when the included Library scripts change.

1.2.1. Embedded packages

The existing Library script could also be a package itself. If so, the appropriate downloader and installer will handle that when downloading the files.

1.2.2. Specifying an installation folder

You can specify an installation folder by preceding the existing Library script name with a relative folder name, examples:

utils/values.r normal.r functions/map.r

values.r will be downloaded and installed into the utils sub-folder of the installation folder. The sub-folder will be created if needed. normal.r will be installed in the installation folder itself..

1.2.3. To remove existing Library scripts from your package:

  • precede the name with a hyphen (e.g. -normal.r -/utils/values.r)

2. Notes on file names

2.1. File names for cross-platform compatibility

Your package will, potentially, run on any platform that REBOL runs on. That means you need to take a little care with your application to ensure that your code is fully cross-plaform compatible.

The biggest potential headache is that some platforms are case sensitive, and some are not. These two lines of code read and write the same file on some platforms, and different files on others:

  • read %MY-FILE.txt
  • write %my-file.txt test

Similarly, different platforms have different ideas on what characters are allowed in a file name.

For full cross-platform compatibility, check that your application meets these rules for file names (or a similar set):

  • Use only lower-case for any letters in the name
  • Restrict your file names to just letters, digits, hyphens, and a maximum of one dot
  • Start the file name with a letter
  • Restrict letters to the 26 undecorated ASCII letters: a-z

2.2. File name clashes in your package

We ignore any path in the filename, so if you upload both:

  • c:\my-stuff\rebol\application\config.txt
  • style="color:blue">c:\my-new-stuff\config.txt

We take only the last instance: your package will contain just one file called config.txt

Limitation in the first release of package support: we don't check for name clashes between files you upload and existing Library scripts in the package:

  • If you upload a file called values.r and also add the Library script values.r to the package, both files will be in the package
  • But the downloader will notice the duplicate name, and only download the file that you have uploaded. The existing Library script will not be downloaded.

3. Other fields on the page

3.1. Notes for user

The downloader will display this note before the user downloads the package. Tell them what they need to know, e.g. "On windows, select just my-encap.exe. On all other platforms, select all files *except* my-encap.exe">

3.2. Check to make package available

Tick this box when you have fully uploaded the package, and click the update button once more. If it is not ticked, the downloader will not allow any of the files to be downloaded.

4. Related help