public TizenDebugLaunchOptions(SDBDeviceInfo device, bool isDebugMode, Project proj, string extraArgs)
            {
                _device = device;

                IsDebugMode = isDebugMode;

                AppId   = projHelper.GetAppId(proj);      //projHelper.GetManifestApplicationId(proj);
                AppType = projHelper.GetAppType(proj);
                TpkPath = GetDebugeeTpkPath(AppId, proj); //pkgTracer.GetTpkPathByAppId(AppId) ?? projHelper.GetTizenPackagePath(proj);
                string     debugLaunchPadArgs          = string.Empty;
                string     launchCommand               = string.Empty;
                Parameters debugEngineLaunchParameters = GetDebugEngineLaunchParameters();

                if (IsDebugMode)
                {
                    DebugEngineOptions =
                        "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<PipeLaunchOptions PipePath=\"" +
                        debugEngineLaunchParameters.PipePath +
                        "\" PipeArguments=\"" +
                        debugEngineLaunchParameters.PipeArguments +
                        "\" PipeCwd=\"" +
                        projHelper.GetValidRootPath() +
                        "\" ExePath=\"" +
                        DebugLaunchDataStore.DotNetLauncher +
                        "\" MIMode=\"" + debugEngineLaunchParameters.MiMode + "\" TargetArchitecture=\"" +
                        GetTargetArch() +
                        "\" WorkingDirectory=\"" +
                        DebugLaunchDataStore.AppInstallPath + "/" + projHelper.GetPackageId(TpkPath) + "/bin" +
                        "\" AdditionalSOLibSearchPath=\"\" xmlns=\"http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014\" >" +
                        debugEngineLaunchParameters.AdditionalOptions +
                        "</PipeLaunchOptions>";

                    launchCommand      = debugEngineLaunchParameters.LaunchCommand;
                    debugLaunchPadArgs = debugEngineLaunchParameters.LaunchpadArgs;
                }
                else
                {
                    DebugEngineOptions = string.Empty;
                    launchCommand      = debugEngineLaunchParameters.LaunchCommand;
                    debugLaunchPadArgs = " __AUL_SDK__ dotnet-launcher ";
                }
                LaunchSequence = GetLaunchSequence(AppId, proj, extraArgs, launchCommand, debugLaunchPadArgs);
            }
Beispiel #2
0
        private bool NeedToInstall(SDBDeviceInfo device, string pathTpkFile, bool forceInstall)
        {
            string fileInstall = Path.GetFileNameWithoutExtension(pathTpkFile) + ".tpi";
            string pathInstall = Path.Combine(Path.GetDirectoryName(pathTpkFile), fileInstall);

            //check whether the package is installed on target/emulator or not.
            var             sdbLauncher   = SDBLauncher.Create(outputPane);
            VsProjectHelper projectHelper = VsProjectHelper.GetInstance;

            if (!sdbLauncher.ConnectBridge())
            {
                return(false);
            }

            string curPkgId = projectHelper.GetPackageId(pathTpkFile);//.GetAppId(curProject);

            if (forceInstall || !sdbLauncher.IsPackageDetected(device, curPkgId))
            {
                ClearInstallCheckFile(pathInstall);
            }

            if (!File.Exists(pathInstall))
            {
                TouchInstallCheckFile(pathInstall);
                return(true);
            }

            DateTime tpkTime = File.GetLastWriteTime(pathTpkFile);
            DateTime insTime = File.GetLastWriteTime(pathInstall);

            if (tpkTime <= insTime)
            {
                return(false);
            }

            TouchInstallCheckFile(pathInstall);
            return(true);
        }