View on GitHub

twinBASIC Documentation

General user documentation for twinBASIC

Creating a TWINPACK package

To create a new TWINPACK package, navigate to the twinBASIC activity panel and choose the option labelled ‘Package’:

Create Package

Once you’ve created the project, you should find the extra ‘TWINBASIC PACKAGE MANAGER’ panel in the main Explorer activity panel:

Create Package

You should now edit the Namespace, Description, Licence and Visibility properties appropriately by using the package manager ‘EDIT’ links, which will take you to the individual settings in the Settings file. Once you’ve edited them, remember to close (and save) the Settings file in order for your changes to be reflected in the package manager panel.

If you don’t plan to publish your package on TWINSERV, then you don’t need to fill in the Licence or Visibility fields.

You can now create components (Class, Module, Interface) in your project as normal, and when you are finished, it’s time to finalize the package. You have two options;

OPTION 1 - Finalize the package into a TWINPACK file

Use this option if you want to just create a local TWINPACK file that you can use in other projects. For this, the build process is the same as any ordinary twinBASIC build… just hit the Build button in the TWINBASIC panel:

Create Package

You’ll see the build output notification in the DEBUG CONSOLE, as seen above.

Job done. See Importing a package from a TWINPACK file for referencing and using the TWINPACK file in other twinBASIC projects.

OPTION 2 - Publish the package directly to the package manager service (TWINSERV)

If you’re publishing your package onto TWINSERV, you don’t need to create the TWINPACK file manually. Just use the ‘PUBLISH THIS PACKAGE’ button:

Create Package

Publishing packages onto TWINSERV requires you to first create a publisher account. If you haven’t done so, you’ll be prompted to do so at this stage.

You will then be prompted to confirm the package details:

Create Package

After pressing YES, the package will be uploaded to TWINSERV. Check the DEBUG CONSOLE for completion notices:

Create Package

If the package got uploaded successfully, it should be available via TWINSERV within a few moments. If you’ve created a PUBLIC package, others will be able to see and download it at this point.

See Importing a package from TWINSERV for referencing and using the uploaded packages.

Special files and

When you create a new package project, you’ll see two additional files created for you in the project filesystem:

Create Package

If you’re publishing a PUBLIC package to the package manager service, it is important that you edit these two files before publishing. These are both markdown files, and will in future become more accessible to users that are considering using your package from TWINSERV.