Packaging

Packaging is the process for creating and compressing the information required for execution on a device. It involves creating the start_android[ios].json file by using project information, and creating/compressing bootstrap archive files, project archive files and theme archive files.

Packaged files are uploaded to the deploy server and installed by downloading the files from the server.

From Nexacro Studio, access the Archive menu to perform the packaging. Nexacro Studio creates the files to be distributed to the designated paths. Distributing files to the server will be subject to the work environments.

Use Nexacro Studio to perform the packaging. Using other editors to create or edit packaging might cause an error and is unacceptable.

archive_menu2

The below table shows the classifications of the files generated through the packaging process. However, you should create a base library by yourself rather than through the packaging process.


Application

Bootstrap

File

Theme

Theme file

Y



Y

Executable file

Y

Y



Form file

Y


Y


Base library





Base Libraries

When the Nexacro Platform accesses the installed path, you can see the following folders. When the applications are serviced on the web (when the applications are used on an iOS or Android device), the folders are copied to the corresponding servers as compressed .zip files.

When compressing the folders, copy the nexacro14lib folder to another path and then zip the folder. You can use functions provided with the operating system or separate software, as shown here.

At this moment, the zip file includes the nexacro14lib folder.

Depending on software to be used, it is possible that only subfolders - component, framework and resources - are zipped when selecting and zipping the nexacro14lib folder. In this case, zip the nexacro14lib folder by creating an arbitrary parent folder and creating the zip file.

When creating the Run Template file and selecting the Merge JSON File option, select the Compress JS Files option and the Merge JSON File option using the [Build > Deploy > Deploy Application] menu, and use the created nexacro14lib.zip file by compressing the folder.

Archive: Make Application Archive

This is a feature to perform the three aforementioned archiving methods (Make Bootstrap, Make File Archive and Make Theme Archive) at once.

  1. Access [Archive > Make Application Archive] in Nexacro Studio.

  1. Proceed with the wizard process by specifying information in the following order.

Step 1

Specify the path for creating archive files as well as the project path.

Archive_Make-Application-Archive_Step1

Item

Description

1

Output Path

This is a path where archive files are generated.

2

Target Path

This is a path where a project is compiled.

If you have designated a target path for the current project already, the designated path is automatically entered.

3

Finish

Clicking this button will create archive files with the default values applied.

  • Run.zip and start_android[ios].json files (As for the Merge JSON File option, a previous value will be applied.)

  • Project archive file (regenerated after checking the existing project archive file in the output path)

  • Theme archive file (Themes that the current ADL file is using are included in the archive file)

Step 2

Specify the options for Bootstrap.

Please refer to the Make Bootstrap section for the detailed settings.

Archive_Make-Application-Archive_Step2

Step 3

Specify the options for creating archive files.

Please refer to the Make File Archive section for the detailed settings.

Archive_Make-Application-Archive_Step3

Step 4

Specify the options for incorporating themes into an archive file.

Please refer to the Make Theme Archive section for the detailed settings.

Archive_Make-Application-Archive_Step4

  1. Apply the generated files to the deployment server.

Archive: Make Bootstrap

The Make Bootstrap menu option creates files which run apps such as an start_android[ios].json and a Run.zip including a Run.html file.

  1. Click [nexacro studio > Archive > Make Bootstrap] menu option.

  1. Create a Run.zip file and an start_android[ios].json file as archive files. The start_android[ios].json is created based on the information entered in the [Archive > Make File Archive] stage.

Step 1

Designate a path where Run.zip and start_android[ios].json files are generated.

Archive_Make-Bootstrap_Step1

Item

Description

1

Output Path

This is a path where Run.zip and start_android[ios].json files are generated. The information in the Update tab in TypeDefinition will be included in start_android[ios].json.

2

Finish

Clicking this button will lead to the generation of Run.zip and start_android[ios].json. As for the Merge JSON File option, a previous value will be applied.

Step 2

Select the mobile platform which your app will be based on, and then specify a project URL. You must select at least one of the two platforms: Android or iOS.

Archive_Make-Bootstrap_Step2

Item

Description

1

Android

This option determines whether to create the start_android.json file, which is necessary for executing an Android app.

2

iOS

This option determines whether to create the start_ios.json and Run.zip files, which are necessary for executing an iOS app.

3

Project URL

This is a URL where the application is launched.

This input box is activated only when 2 is selected.

4

Merge JSON File

This option determines the method of calling Nexacro Platform libraries.

Before selecting this option, you must select the 'Compress JS file' and 'Merge JSON file' options in the [Build > Deploy > Deploy Application] menu when generating a Nexacro application in the form of a JavaScript file.

5

Finish

Clicking this button will lead to the generation of Run.zip and start_android[ios].json.

start_android[ios].json will not be generated if you select neither 1 nor 2.

If a local host (127.0.0.1 ) is set as a URL path in TypeDefinition, the device itself will be acknowledged as the local host instead of the deploy server. For that reason, the URL should be a private IP or URL which the device can access.

  1. Create the start_android[ios].json file as follows. The contents can be changed depending on the product update.

    When creating the file archive file or the theme archive file, you must create it before creating the start_android[ios].json file. This is necessary to be able to use the project/theme archive file offline.

{
    "version" : "14.0.0.1",
    "runtime" :
    {
        "target" :
        {
            "os" : "android"
        },
        "framework" :
        [
         "./nexacro14lib/framework/Framework.js",
         "./nexacro14lib/framework/Device.js",
         "./nexacro14lib/framework/Device_Android.js"
        ],
        "component" :
        [
         "./nexacro14lib/component/CompBase.js",
         "./nexacro14lib/component/ComComp.js",
         "./nexacro14lib/component/Grid.js",
         "./nexacro14lib/component/DeviceAPI.js",
         "./archivefiles.js"
        ],
        "form" :
        [

        ],
        "xadl" :
        {
            "launch" : "./HelloWorld.xadl.js",
            "quickview" : "./HelloWorld.xadl.quickview.js"
        },
        "protocol":
        {
            "adaptors":
            [
          
            ]
        },
        "resource" :
        {
            "android" : {
                "updateurl" : "http://172.20.20.20:8080/packageBuilder/output/app-dist/HelloWorld",
                "all" : {
                    "updateurl" : "",
                    "all" : {
                        "updateurl" : "",
                        "resources" :
                        [{"type" : "File", "file" : "Archive00.xzip", "targetpath" : "", "version" : "1.0", "failpass" : "false"},
                         {"type" : "Engine", "file" : "nexacro14lib.zip", "targetpath" : "", "version" : "1.0", "failpass" : ""},
                         {"type" : "Theme", "file" : "default.zip", "targetpath" : "./_theme_", "version" : "1.0", "failpass" : "false"}]
                    }
                }
            },
            "ios" : {
                "updateurl" : "http://localhost:8080/packageBuilder/output/app-dist/HelloWorld",
                "all" : {
                    "updateurl" : "",
                    "all" : {
                        "updateurl" : "",
                        "resources" :
                        [{"type" : "File", "file" : "Archive00.xzip", "targetpath" : "", "version" : "1.0", "failpass" : "false"},
                         {"type" : "Engine", "file" : "nexacro14lib.zip", "targetpath" : "", "version" : "1.0", "failpass" : ""},
                         {"type" : "Engine", "file" : "Run.zip", "targetpath" : "", "version" : "1.0", "failpass" : ""},
                         {"type" : "Theme", "file" : "default.zip", "targetpath" : "./_theme_", "version" : "1.0", "failpass" : "false"}]
                    }
                }
            }
        }
    }
}

The Run.zip file is not used on the Android OS.

Androids and iOS generate their own necessary files:

- start_android.json

- start_ios.json

When a version value for each file is changed, an app updates the file when running it.

  1. Reflect the created file to the deploy server.

Archive: Make File Archive

Use the Make File Archive option from the Archive menu to create a project archive file and register the appropriate information required for distribution in TypeDefinition.

Archive file names are designated by the user and saved with the xzip extension. The project archive file can be downloaded from the deploy server when an app is initially installed. It will be executed by the file saved on the device later on.

  1. From the Archive menu, select [Nexacro Studio > Archive > Make File Archive].

  1. Organize ADL, forms, style sheets and etc to be included in the archive file, and designate a path where the file will be created.

Step 1

Designate a path where archive files are generated.

Archive_Make-File-Archive_Step1

Item

Description

1

Output Path

This is a path where archive files are generated.

2

Target Path

This is a path where a project is compiled.

If you have designated a target path for the current project already, the designated path is automatically entered.

3

Finish

Clicking this button will incorporate the project files to an archive file.

Step 2

Construct archive files as well as lists of ADL files, forms and style sheets, which are all included in the archive file.

Archive_Make-File-Archive_Step2

Item

Description

1

Add

Adds an archive

2

Delete

Deletes the selected archive

3

Archive

This is a list of archive files to create.

You must add at least one archive.

4

Select File

Selects project files to be included in archive files

If there are existing archive files, the wizard will check whether there is any overlapping project file. If there are matches, the wizard will show you those projects in the form of a tree.

You must select at least one file.

5

Update

You can add archive files manually to Update (Resource) of TypeDefinition.

6

Finish

If the current archive file is already registered in TypeDefinition, you can skip the Step 3 and finish creating the archive file.

Step 3

You can add archive files to Update of TypeDefinition.

Archive_Make-File-Archive_Update

Item

Description

1

Add

After adding the system type first, you can add information on the OS version, device, and resource.

If you need settings of a specific device, you must designate a value corresponding to the value of system.mobileproducttype property.

ex) SHW-M250S, Nexus One


※ You can specify the below property for a detailed setting.

- UpdateURL : URL for updating a component library

2

Add

Register archive files as a Resource. The archive file here refers to the one to be created through the Step 2

Edit_Update-Add_Resource

Item

Description

1

Type

You can select the type from File, Engine and Theme.

Only the Engine option allows you to download project archives and theme archives from the web server without generating them again.

2

File

You can use the archive file name made in the Step 2 as a file name.

  1. Reflect the created archive file in the deploy server manually.

Archive: Make Theme Archive

Theme archive files are downloaded from the deploy server when apps are initially installed. They will run as data saved on the device later on.

The Make Theme Archive menu option makes archive files with user-designated theme names that will not be changed arbitrarily:

  1. Click [nexacro studio > Archive > Make Theme Archive] menu.

  1. Create a theme archive converted to a JavaScript file.

Step 1

Designate a path where a theme archive file is a generated.

Archive_Make-Theme-Archive_Step1

Item

Description

1

Output Path

This is a path where an archive file is generated.

2

Target Path

This is a path where a project is compiled in HTML5. If you designated a path for the current HTML5 project at the time of the compilation, the designated path is automatically entered.

3

Finish

Clicking this button will generate an archive file that contains the themes applied to the current ADL file.

Step 2

Select themes to be included in an archive file.

Archive_Make-Theme-Archive_Step2

Item

Description

1

Theme

Select themes to archive.

Themes must be complied in HTML5 if they are to be archived. Moreover, those themes must be located in the “theme” folder in the path where the theme files are compiled.

The wizard shows a list of active themes that are being used in the current project and a list of screen-specific themes.

You must select at least one theme.

2

Update

You can add archive files manually to Update (Resource) of TypeDefinition.

3

Finish

Clicking this button will lead to creating an archive file with selected themes in it.

  1. Reflect the created archive file in the deploy server manually.