Contents
Package Manager Utility
|
Package Manager is the installer utility for J Application Library. It is available from the J session menu Run|Package Manager. This is a new menu item added to the scripts after the J601 release. The installer requires that wget be available on your machine, and for Windows users, that an unzip program is configured in the Edit|Configure|External Programs dialog. To get the new scripts and required programs, see Prerequisites section below.
After successful installation, see Using Package Manager section for details of working with packages.
Prerequisites
To use the Package Manager in the J session, you need to get an updated copy of the scripts, and also check that wget and an unzip program are available. Once these steps are done, load J and select menu item Run|Package Manager.
You should first ensure you have installed the latest version of J from the stable download page.
All Systems
download and install a new core library from the library distribution location directly. This has to be done manually - once installed, later updates can be done from the J session. Copy the contents of the archive, confirming overwrite, into the system folder under J, that is j601/system.
ensure that wget is available on your system.
Linux and Mac users can get this from their usual code repositories, or from the official wget homepage.
ensure that zip is available on Windows.
Windows
Windows users will need to download and install wget. See details at Installing wget.
An unzip program is required for Windows users. After installing the new core library, load J, select menu Edit|Configure|External Programs and enter in the command string to unzip a file into the current directory, overwriting any existing files. See details at Installing Zip.
An alternate approach for Windows users to obtain 'wget' and 'unzip' is to install the Cygwin Linux like environment. This also has the advantage of a better scripting environment and the ability to have multi-platform common scripts. Just ensure that 'C:\cygwin\bin\' is in your path and you have installed the options for 'wget' and 'zip'. If the cygwin\bin is in your path you will not need to enter a path in the external programs configuration.
Mac OS X
Mac users will need to install and cofigure wget. See details at Installing wget.
External Programs Configuration
To specify an external program for HTTP (and Zip for Windows), use External Programs screen of Configuration dialog of the J system.
Choose the program in the top table and use the Select button to make a choice corresponding to the installed program.
Note: the manual entry of the command-line using the %-placeholders is necessary only for non-standard commands or parameters. The meaning of %-placeholder is where the concrete value will be substituted by J. See examples, in Select for an idea.
Using Package Manager
Package Manager installs packages. A package is either an addon or base library, and is identified by a name and version number; has short caption and longer description; and contains a number of files placed under category/addonname folder.
List of available packages is called catalog. Initially it is downloaded from the server and a local copy is saved. In order to keep the catalog current, it is loaded from the server periodically (atomatically on each start or manually, per Preferences).
The catalog and packages are downloaded from JSoftware web server (no personal data sent to the server). So the functionality of Package Manager depends on HTTP connection: required for initial catalog download (Setup phase), otherwise the application will close; however subsequently (after-setup runs) it can start in off-line mode for browse-only functionality, but will need to go online for actual catalog updates and downloading packages.
The Package Manager window and Preferences dialog are:
The ability to interact with the server is called server mode: in Off-line Mode catalog is read from disk and Install button is disabled; in On-line Mode catalog is read from server and Install button is enabled. It is selected at start-up automatically or with the initial dialog Read Catalog from Server if Always Ask option is specified in the Catalog At Startup section of Preferences in Tools menu of Package Manager (not general Configuration).
After selecting the Run|Package Manager menu, you are first prompted to download the repository catalog from the server. This requires an active Internet connection. Thereafter you can set the startup state in Preferences. When working on-line, the system ensures the local repository catalog is up to date. If off-line, you can only browse the packages that are installed on your machine.
Starting Package Manager
- Start J
Select Package Manager from Run menu
Initial (Setup) Run
Setup Repository dialog appears
Select Yes if you have internet connection to download the catalog and proceed the setup
Select No to cancel setup and close Package Manager
After successful Setup the log window shows Updating server catalog... Done. and the addons and library status. You can install any addons now (see below).
Also after Setup, the server mode is Always Ask, and if left unchanged, on each start of Package Manager it will ask if you want to read Catalog from Server. Use preferences to make automated decision if you like.
After-Setup Run
If server mode is Always Ask
the dialog is presented Read Catalog from Server
Select Yes to connect to the server and enter on-line mode
Select No to read off-line catalog from disk and enter off-line mode
- Otherwise either on-line or off-line mode is selected automatically
To enter a different server mode, change Preferences if necessary, close and re-start Package Manager and respond to Read Catalog from Server dialog (if in Always Ask mode).
Browsing Packages
Package Mananger allows to browse the available and installed packages in both on-line and off-line mode.
- use the left menu to filter messages by group
- use Status or Category selection below to choose grouping
- observe Installed and Latest available version of the addon or base library
- select items clicking on the nave to view description at the bottom
Installing Packages
The application lets you choose packages to install. The package list shown can be configured by selecting from the list on the left, which is either a list by installed status, or a list by package type.
- select packages by either
- using checkboxes directly
- using a combination of goupped Selection buttons at the bottom
- press Do Install button
- observe the log window at the bottom
wait until the message Done. and addons and library status appear.
During the installation the GUI is disabled, so it is necessary to wait until all selections are installed. If error occurs, the process will be interrupted and message with possible reason is displayed in the log window. See Troubleshooting section in that case.
Troubleshooting
If pacman is not working properly, likely causes are:
- You are not online, and so are not getting the latest server catalog.
- The wget program is not installed properly. To test this, open a command prompt and change to your J temp directory. Then enter the wget command to read jal.zip from the server. Use the correct pathnames and J version:
cd c:\j601\temp wget www.jsoftware.com/jal/j601/jal.zip
- The unzip program is not installed properly (for Windows users only). To test this, download jal.zip as above, then change to your addons/config directory (create it if necessary). Then enter the required command to unzip jal.zip, overwriting existing files. Note that if your zip pathname contains blanks, then the executable should be wrapped in double quotes. Repeat the unzip to ensure that files are automatically overwritten without prompting.
cd c:\j601\addons\config "c:\program files\7-zip\7za.exe" x -y c:\j601\temp\jal.zip "c:\program files\7-zip\7za.exe" x -y c:\j601\temp\jal.zip
Ensure that the exact unzip command (double quotes are not needed) is entered in Edit|Configure|External Programs, see examples above.
If you suspect that an addon is not installed correctly, open ~addons folder in file explorer, delete the addon folder (if it is present). Issue Tools|Rebuild ... command from PacMan menu. Now the addon should be indicated as not installed. Select it and try installing again.
Diagnosis. To verify that an addon or core library is installed correctly, download the corresponding archive manually from the distribution location directly, extract to a separate folder, and diff with the destination folder under J. If there are differences, verify that wget and unzip are configured correctly.


