Setting up the development environment - Mago-DACH-Hub/documentation Wiki
Development Environment
To start developing a Mago Application it's necessary to set up a Development environment:
- Download the latest Mago Build using your Microarea credentials
- Install SQL Server Express Dev
- Install SQL Server Management Studio
- Install the necessary Windows Features
- Download Visual Studio 2019 (Direct Download: Community|Professional|Enterprise)
- Download the VS2019 install configuration. More Details here
- Install Visual Studio 2019 importing the configuration.
- Start VS2019
- Install the microarea addon under Extensions -> Manage Extensions and search for "Microarea"
- Create a folder under
C:\
(name only a-z and 0-9) - Extract TaskBuilderStudio.zip from the Mago Build into the previously created folder
- Extract Mago4 Sources.zip into the previously created folder
- Open the solution under
Standard\Applications\ERP\ERP.sln
- Try to build Mago 4
- If you run into problems, open Powershell and unblock the necessary files using the "Unblock-File" command:
Unblock-File ./Standard/Applications/ERP/Barcode/Microarea.ERP.BarcodeComponents/ScanDataCtrl.cs Unblock-File ./Apps/TBApps/Debug/* Unblock-File ./Apps/TBApps/Release/* Unblock-File ./Apps/AdministrationConsole/Release/*
- Create a IIS Directory by VS2019 under Extensions -> Microarea Tools -> Create IIS Directory (starting VS2019 as Admin might be needed)
- Open the Administration Console under /Apps/AdministrationConsole/Release/
- Register Mago4 using the Serial under http://mymago.zucchetti.com/int/Prodotti/MyM4SerialNumbers.aspx
- Create a new sytem database
- Create a new company by right clicking "companies" on the left
- Right click on the new company and select create/update database structure and click on create
- Right click on the new company and select manage company data
- Select Manage Sample Data and click through the dialogue
- Start Mago4 from VS2019 using F5
To generate an application you also need the tb-legacy tool:
- Install nodejs 8.9 or higher
- Follow the tb-legacy install instructions
Your Mago4 development environment should now be fully setup.
Generating an application with tblegacy
To generate an application we use the tb-legacy tool as follows:
PS C:\development\newdev\Standard\Applications> tbl n Comics
Welcome to the TBLegacy generator!
? What is the name of your organization? Zucchetti
? Give your app a description Comics App
? Application version 1.0.0.0
? Is it a codeless application? No
? Re-use ERP precompiled headers? Yess
? Name of the first module comics
? Description of the module comics module
? Module 4-chars short name CMIC
? Name of the first library Dbl
After that restart IIS with iisreset
Please also take a look at https://github.com/Microarea/tblegacy#Application
Especially important is the registration of the application in the Microarea Portal http://www.microarea.it/int/common/Login.aspx?ReturnUrl=%2fint%2fProdotti%2fVerticalizzazioni%2fPreInsertScheda.aspx