/* CREATION FUNCTIONS */ public static PebbleProject CreateProjectFiles(string id, string name, string author, bool isWatchface, string sdk_version) { //First, run the command to generate the files. LinuxInterface.ExecuteCommand("pebble new-project " + id, Program.config.user_project_dir); //Now, load the project from the files. PebbleProject proj = new PebbleProject(id); //Now, edit the package config file to apply the params offered. proj.package.name = name; proj.package.author = author; proj.package.pebble.companyName = author; proj.package.pebble.shortName = name; proj.package.pebble.displayName = name; proj.package.pebble.longName = name; proj.package.pebble.enableMultiJS = true; proj.package.pebble.projectType = "native"; proj.package.pebble.watchapp.watchface = isWatchface; proj.package.pebble.sdkVersion = sdk_version; proj.package.pebble.resources = new Resources(); proj.package.pebble.resources.media = new List <Medium>(); //Rename the main.c. try { File.Move(proj.pathnane + "src/c/" + id + ".c", proj.pathnane + "src/c/main.c"); } catch { } //Save it proj.SavePackage(); return(proj); }
/* DOING FUNCTIONS */ public bool DoBuild(out string log) { //Run the Pebble compile command. log = LinuxInterface.ExecuteCommand("pebble build", pathnane); return(log.Contains("'build' finished successfully")); }