Farbschema: Riviera
Sie befinden sich hier: start » en » Documentation » Microsoft Access development tools » WKL Bootstrapper » How-to guides » How to: Create a project from templates

How to: Create a project from templates

Begin a new project file with the entries an Access application, the WKL components, an ODBC driver, WKL Office JSON or a private .NET runtime need, instead of writing them by hand.

Requires WKL Bootstrapper 2.0.

Solution overview

/new-project <file> /template <names> writes a project file of format 2 from one or more templates and prints what is left to do. The templates fill in ordinary entries - files, registry values, conditions, the start - which can be changed afterwards like any other entry.

TemplateAdds
accessThe application file named by app-manifest.json of the build tool of WKL Forms Object Library, copied to [VersionDir]; the version from that manifest; the start of the database, with /runtime as the manifest says (start.runtime auto); the condition Microsoft Access.
componentsWKL Forms Object Library from components\x86 and components\x64 of the delivery, copied per release to [WklRoot]\Components\<release>\<bitness> and registered for the user (registerCom); the condition .NET 10 Desktop Runtime (Microsoft.WindowsDesktop.App 10.0), unless dotnet is chosen too.
odbcAn example ODBC driver (Wkl OData from odbc\Wkl OData, DLL Wkl.Data.OData.Odbc.dll), copied per release to [WklRoot]\Drivers\<driver>\<release>\<bitness>, and a data source of the user (WklGateway) whose Driver is the path of the copied DLL, in the registry view of each bitness. Replace it with the delivered driver.
jsonWKL Office JSON from json\x86 and json\x64 of the delivery, copied per release to [WklRoot]\Json\<release>\<bitness> and registered for the user. The template names Wkl.Office.JSON.dll; the starter also finds Wkl.Access.JSON.dll of releases up to 1.0.3 (then WKL Access JSON).
dotnetA private .NET runtime from dotnet\x86 and dotnet\x64, copied per release to [WklRoot]\Dotnet\<release>\<bitness>, and the variables DOTNET_ROOT(x86) and DOTNET_ROOT for the started program; see How to: Deliver a private .NET runtime.

<release> is the product version of the entry's main file without a build id. Every entry with a bitness is installed only for the bitness of the project.

Implementation

  1. Create the folder the starter will run from, named after the product - the product key is taken from the name of the file's folder (letters, digits, ., -, _; Product when nothing is left).
  2. Write the project:

    Wkl.Bootstrapper.exe /new-project Customers\bootstrapper.json /template access,components,odbc

    The output names the file and the steps left, one line each:

    ```text …\Customers\bootstrapper.json written.

    • source: 'deploy' beside the starter; set the delivery folder (a share such as \server\apps\Customers) when it lies elsewhere.
    • access: the delivery folder needs the application and its app-manifest.json (build tool of WKL Forms Object Library, target deploy).
    • components: copy the folders x86 and x64 of the release package into 'components' of the delivery folder.
    • odbc: replace the example driver 'Wkl OData' (folder, DLL, data source 'WklGateway') with the delivered one. ```

      A line starting with ! names a rule the written file still breaks, for example a missing version when access is not chosen.

  3. Work through the lines: set source, place the named folders in the delivery, replace the example driver.
  4. Check the result with Wkl.Bootstrapper.exe /check Customers\bootstrapper.json.

Remarks

  • source is deploy, a folder beside the starter, until it is set.
  • Without access, the project starts nothing yet: set version (value or from) and start.file; see How to: Start any program with the starter.
  • No template means a project with the product key and the source only.
  • Template names are separated by commas and may be given in any order and case.
  • An existing file is never overwritten.
  • /json prints an object with written, notes and problems instead of the lines, every character outside ASCII escaped.
  • Exit codes: 0 written; 10 no file named; 11 an unknown template, or the file exists.
  • components and json need a registration.json beside each COM server of the delivery; the release package of WKL Forms Object Library brings it from 1.57.
  • Choose components only when the delivery brings the components: its entries copy them from the delivery, so a delivery without components\x86 and components\x64 ends with code 12 even when a sufficient release is registered on the computer. When the computer has them already (installed by the IT, or for every application from one place), choose access alone; a sufficient registration found at the start is used either way.
en/wiki/msaccess/bootstrapper/how-to/create-a-project-from-templates.txt · Zuletzt geändert: von Wolfgang van der Stille