Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24922] Windows: Unable to package with VS 2017

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-07-25T20:45:45.000+0000
Affected Version/swindowslib 0.4.29, Release 6.2.0
Fix Version/sRelease 6.2.0
ComponentsCLI, Tooling, Windows
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2017-07-03T13:47:59.000+0000
Updated2017-08-22T09:29:54.000+0000

Description

Description

Packaging a Windows application with VS2017 errors out with the below on cert creation (added logging to show the error message), based off other changes in the VS2017 addition I swapped this (and other occurrences of vcvarsalll) to vsdevcmd and it worked
'MakeCert' is not recognized as an internal or external command,
operable program or batch file.

[ERROR:~nx0] Error in script usage. The correct usage is:
Syntax:
    vcvarsall.bat [arch]
  or
    vcvarsall.bat [arch] [version]
  or
    vcvarsall.bat [arch] [platform_type] [version]
where :
    [arch]: x86 | amd64 | x86_amd64 | x86_arm | x86_arm64 | amd64_x86 | amd64_arm | amd64_arm64
    [platform_type]: {empty} | store | uwp
    [version] : full Windows 10 SDK number (e.g. 10.0.10240.0) or "8.1" to use the Windows 8.1 SDK.

The store parameter sets environment variables to support Universal Windows Platform application
development and is an alias for 'uwp'.

For example:
    vcvarsall.bat x86_amd64
    vcvarsall.bat x86_amd64 10.0.10240.0
    vcvarsall.bat x86_arm uwp 10.0.10240.0
    vcvarsall.bat x86_arm onecore 10.0.10240.0
    vcvarsall.bat x64 8.1
    vcvarsall.bat x64 store 8.1

Please make sure either Visual Studio or C++ Build SKU is installed.

Steps to reproduce

Create an app appc new -t titanium -n myawesomeapp --id com.foo --no-services

Build the app using appc run -p windows -T dist-phonestore

Follow the prompts

Actual

When creating a cert the process will error out

Expected

Process should not error out, cert should be created after prompting

Comments

  1. Kota Iguchi 2017-07-03

    [~eharris] Isn't this happen in windowslib? Then affectVersion should have windowslib. I guess the bug is around [here](https://github.com/appcelerator/windowslib/blob/master/lib/certs.js#L224), and it needs changes similar to [this](https://github.com/appcelerator/titanium_mobile_windows/pull/959/commits/ee65518a8a24a923fffdaa61feec2cbc8a3adeff#diff-3c070925992beb37da472db6eddf146d).
  2. Ewan Harris 2017-07-03

    [~kiguchi] Yeah it's fixed by switching to vsDevCmd, I'm gonna push a PR for it in a little while once I've switched back to my main machine Just read your comment fully sorry. I'll add it now
  3. Ewan Harris 2017-07-03

    PR: https://github.com/appcelerator/windowslib/pull/71
  4. Kota Iguchi 2017-07-04

    windowslib updated. (windowslib 0.5.1) Now titanium_mobile needs this changes in order to resolve this ticket.
  5. Ewan Harris 2017-07-10

    PR: https://github.com/appcelerator/titanium_mobile/pull/9203
  6. Ewan Harris 2017-07-25

    Merged as part of TIMOB-24591
  7. Ewan Harris 2017-08-22

    Verified changes in 6.2.0.v20170821203442

JSON Source