Generic Target License

Discussion of issues related to writing ZBasic applications for targets other than ZX devices, i.e. generic targets.
Post Reply
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Generic Target License

Post by dkinzer »

The capability to compile for non-ZX targets is enabled by the presence of a license file, ZBasicLicense.txt, in the same directory as the ZBasic.exe file. If the license file is not present or does not contain a valid license an error message will be displayed by the compiler to that effect.

The license file is a plain text file - it can be viewed by any application capable of rendering plain text files and it can be printed out if desired. The license file generally should not be modified in any way. However, lines in the license file beginning with an exclamation mark are ignored so they may be edited, added or deleted as necessary.

If any of the licensee information contained in the license file is incorrect or changes, we can re-issue a new license file with the corrected information.
- Don Kinzer
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

I added the license and can see the extended device list. When I renamed the license, and restarted the IDE, I could still see the device list. Is the file read one time and then the license information held elsewhere?

Is there a way to tell that you have extended device support, other than by looking at the list in the IDE? Something on the ZBasic --version output might help e.g.

Code: Select all

Version 3.4
Licensed for AVR generic targets.
No modules processed.
as well as something in the IDE about dialog.

Edit: With more use I have found that the compiler will only work with the license. I think it is better if the IDE also makes note of the license and turns off/hides features that are not available - less confusion for end users.
Mike Perks
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

mikep wrote:I think it is better if the IDE also makes note of the license and turns off/hides features that are not available - less confusion for end users.
I added code to add the generic target devices only if a compiler license is detected. Further, the filtering checkboxes are disabled if no license is detected.

Per your suggestion, I also added a set of checkboxes under the ATmega checkbox for several broad categories of devices. The first one (ATmega88, 48, etc.) represents all of the 28-pin devices similar to the mega8. The next checkbox down represents all of the 40/44 pin devices that are pin compatible with the mega16 (e.g. mega32, mega324, mega644, etc.). The next one represents the 64/100 pin devices like the mega64, mega128, mega1280, mega2560, etc. The last category represents anything that didn't fit elsewhere (mega8515, mega8535, mega161, mega162, mega163 and mega323).
Attachments
Modified 'Edit Targets' dialog.
Modified 'Edit Targets' dialog.
EditTargets.jpg (59.21 KiB) Viewed 3106 times
- Don Kinzer
Post Reply