Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25078

Windows: run cmake flag always defaults to Visual Studio 2015 generator

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.2
    • Fix Version/s: Release 6.2.0
    • Component/s: Windows
    • Labels:
      None
    • Environment:

      Windows 10 Pro
      Titanium SDK: 6.1.1.GA, 6.1.2.GA, 7.0.0.v20170808160733

    • Story Points:
      3
    • Sprint:
      2017 Sprint 17 SDK

      Description

      Description

      When using the --run-cmake flag with VS2017 the generator selected will always be Visual Studio 14 2015 this is because the check here needs to be data.windowsInfo.selectedVisualStudio

      Below is the working code

      function selectVisualStudio(data) {
          if (data.windowsInfo && data.windowsInfo.selectedVisualStudio) {
              var version = data.windowsInfo.selectedVisualStudio.version;
              if (version == '12.0') {
                  return 'Visual Studio 12 2013';
              } else if (version == '14.0') {
                  return 'Visual Studio 14 2015';
              } else if (/^Visual Studio \w+ 2017/.test(version)) {
                  return 'Visual Studio 15 2017';
              }
          }
          return 'Visual Studio 14 2015';
      }
      

      Steps to reproduce

      You need VS2017 to test this
      1. Grab https://github.com/appcelerator-archive/ti.paint
      2. Overwrite ti.paint/windows/plugins/hooks/windows.js with the hook here
      3. Make sure the path at ti.paint/blob/master/windows/CMakeLists.txt#L24, matches your selected
      4. Build the module using appc run -p windows --build-only --run-cmake

      Actual

      Errors out with

      [DEBUG] Run CMake on C:\Users\ewan\Documents\git\ti.paint\windows\Windows10.Win32
      [WARN]  CMake Error at CMakeLists.txt:20 (project):
        A Windows Store component with CMake requires both the Windows Desktop SDK
        as well as the Windows Store '10.0' SDK.  Please make sure that you have
        both installed
      [INFO]  -- Configuring incomplete, errors occurred!
      See also "C:/Users/ewan/Documents/git/ti.paint/windows/Windows10.Win32/CMakeFiles/CMakeOutput.log".
      

      Checking ti.paint\windows\Windows10.Win32\CMakeCache.txt shows CMAKE_GENERATOR:INTERNAL is Visual Studio 14 2015

      Expected

      Should select VS2017 generator and build successfully (note that you might still see a failure due to it attempting to build 8.1)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                eharris Ewan Harris
                Reviewer:
                Ewan Harris
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-10972
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code