}
function installWgt(appName: string) {
- let onInstallation = {
- onprogress: (packageId: string, percentage: string) => {
- console.log("On installation(" + packageId + ") : progress(" + percentage + ")");
- },
- oncomplete: (packageId: string) => {
- console.log("Installation(" + packageId + ") Complete");
- wrt.postPlainNotification(appName, 'Install Success', 5);
- cleanUpAndQuit(appName);
- }
- };
let wgtPath = `${baseWorkingDir}/${appName}/${appName}.wgt`;
- console.log(`wgtPath: ${wgtPath}`);
- global.tizen.package.install(wgtPath, onInstallation, (err: any) => {
- console.log("Error occurred on installation : " + err.name);
- cleanUpAndQuit(appName);
- });
+ let installinfo = "{\"app_id\":\"" + appName + "\",\"pkg_path\":\"" + wgtPath + "\"}";
+ console.log(`installWgt info: ${installinfo}`);
+ wrt.notifyInstall(installinfo);
+ process.exit();
}
function makeWgt(appName: string) {