Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24454] Windows: Improve library integration with module

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-05-03T18:34:21.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.1.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2017-03-06T00:49:34.000+0000
Updated2017-07-12T06:16:04.000+0000

Description

Attachments

FileDateSize
com.module.test3.zip2017-03-21T02:25:41.000+0000242397

Comments

  1. Kota Iguchi 2017-03-21

    *Steps to create module for testing:* *1. Create new module*
       appc new -n test --id com.appc.module.test3
       

    when prompted for the project type, select "Titanium Module"

    *2. Replace source and library files* Extract [^com.module.test3.zip] and replace with module contents under *windows* diretory *3. Compile module and install into module directory*
       > cd YOUR_MODULE_PROJECT_DIR/windows
       > appc ti build -p windows --build-only --run-cmake
       
    And then install module zip in your Titanium SDK modules directory *4. Create Titanium app project*
       var sap = require('com.appc.module.test3');
       
       var win = Ti.UI.createWindow({
           backgroundColor: 'green',
           layout:'vertical'
       });
       
       win.addEventListener('open', function() {
       	alert(sap.testLogonCore());
       });
       
       win.open();
       
    This should prompt "V4"
  2. Kota Iguchi 2017-03-21

    https://github.com/appcelerator/titanium_mobile_windows/pull/961
  3. Cesar Cavazos 2017-04-12

    I wanted to point out something which I am not sure whether it has been considered in "lib folder will be packaged into module and also copied/linked during Ti app build." Does this mean that, references to those .winmd will also be added to the App's Project File and TitaniumWindows_Native Project file? The scenario where this becomes relevante is when, in the Module, there is a member declaration that includes a type from a third-party winmd.
  4. Kota Iguchi 2017-04-13

    {quote} Does this mean that, references to those .winmd will also be added to the App's Project File and TitaniumWindows_Native Project file? {quote} [~cesar.cavazos] Yes. Module's winmd will be also added to the app's project.
  5. Abir Mukherjee 2017-05-02

    [~kota] Sorry, I missed this one. Samir will be looking at this one.
  6. Samir Mohammed 2017-05-03

    Verified in 6.1.0.v20170502132103 and 6.2.0.v20170502165856 with the test case provided above by [~kota]. *Environment* APPC Studio: 4.8.1.201612050850 Hyperloop 2.1.0 APPC CLI: 6.2.0 Emulator 8.1 WVGA 4 inch 512MB *Operating System:* Name = Microsoft Windows 10 Pro Version = 10.0.14393 Architecture = 32bit CPUs = 4 Memory = 17034395648 *Node.js:* Node.js Version = 6.10.1

JSON Source