private void CertificateBrowseButton_Click(object sender, EventArgs e) { string PickedFilename; if (ToolsHub.ShowOpenFileDialog(ToolsHub.CertificatesFilter, "Picking a signing certificate to codesign with", "p12", CertificateEdit.Text, ref ToolsHub.ChoosingIpaDirectory, out PickedFilename)) { CertificateEdit.Text = PickedFilename; } }
private void MobileProvisionBrowseButton_Click(object sender, EventArgs e) { string PickedFilename; if (ToolsHub.ShowOpenFileDialog(ToolsHub.MobileProvisionFilter, "Picking a mobile provision to embed", "mobileprovision", MobileProvisionEdit.Text, ref ToolsHub.ChoosingIpaDirectory, out PickedFilename)) { MobileProvisionEdit.Text = PickedFilename; } }
private void InputIPABrowseButton_Click(object sender, EventArgs e) { string PickedFilename; if (ToolsHub.ShowOpenFileDialog(ToolsHub.IpaFilter, "Picking an application", "ipa", IPAFilenameEdit.Text, ref ToolsHub.ChoosingIpaDirectory, out PickedFilename)) { IPAFilenameEdit.Text = PickedFilename; ImportedPListData = null; } }
private void InstallIPAButton_Click(object sender, EventArgs e) { string PickedFilename; if (ToolsHub.ShowOpenFileDialog(ToolsHub.IpaFilter, "Choose an IPA to install", "ipa", "", ref ToolsHub.ChoosingIpaDirectory, out PickedFilename)) { Program.ProgressDialog.OnBeginBackgroundWork = delegate { DeploymentHelper.InstallIPAOnConnectedDevices(PickedFilename); }; Program.ProgressDialog.ShowDialog(); } }
void PickIpaAndCheckForUDID(string UDID) { if (UDID != null) { string PickedFilename; if (ToolsHub.ShowOpenFileDialog(ToolsHub.IpaFilter, "Picking an application to check", "ipa", "", ref ToolsHub.ChoosingIpaDirectory, out PickedFilename)) { MobileProvision Provision = MobileProvisionParser.ParseIPA(PickedFilename); CheckProvisionForUDID( Provision, UDID, String.Format("embedded mobile provision in {0}", Path.GetFileName(PickedFilename))); } } }
void PickProvisionAndCheckForUDID(string UDID) { if (UDID != null) { string PickedFilename; if (ToolsHub.ShowOpenFileDialog(ToolsHub.MobileProvisionFilter, "Picking a mobile provision to check", "mobileprovision", "", ref ToolsHub.ChoosingIpaDirectory, out PickedFilename)) { MobileProvision Provision = MobileProvisionParser.ParseFile(PickedFilename); CheckProvisionForUDID( Provision, UDID, String.Format("mobile provision {0}", Path.GetFileNameWithoutExtension(PickedFilename))); } } }
private void ImportInfoButton_Click(object sender, EventArgs e) { try { string PickedFilename; if (ToolsHub.ShowOpenFileDialog(ToolsHub.PListFilter, "Importing Info.plist", "plist", ExportImportPListFilename, ref ToolsHub.ChoosingIpaDirectory, out PickedFilename)) { ExportImportPListFilename = PickedFilename; ImportedPListData = File.ReadAllBytes(ExportImportPListFilename); } } catch (Exception ex) { ShowError("importing Info.plist", ex); } }
string PickIPAAndFetchBundleIdentifier() { string PickedFilename; if (ToolsHub.ShowOpenFileDialog(ToolsHub.IpaFilter, "Choose an IPA to provide the bundle identifier", "ipa", "", ref ToolsHub.ChoosingIpaDirectory, out PickedFilename)) { FileOperations.FileSystemAdapter IPA = new FileOperations.ReadOnlyZipFileSystem(PickedFilename); if (IPA != null) { byte[] InfoData = IPA.ReadAllBytes("Info.plist"); Utilities.PListHelper Info = new Utilities.PListHelper(Encoding.UTF8.GetString(InfoData)); string BundleID; if (Info.GetString("CFBundleIdentifier", out BundleID)) { return(BundleID); } } } return(null); }
static private bool ParseCommandLine(ref string[] Arguments) { if (Arguments.Length == 0) { StartVisuals(); // we NEED a project, so show a uproject picker string UProjectFile; string StartingDir = ""; if (ToolsHub.ShowOpenFileDialog("Unreal Project Files (*.uproject)|*.uproject;", "IPhonePackager now requires a .uproject file for certificate/provisioning setup", "mobileprovision", "", ref StartingDir, out UProjectFile)) { Arguments = new string[] { UProjectFile }; } else { Arguments = new string[] { "gui" }; } } if (Arguments.Length == 1) { // if the only argument is a uproject, then assume gui mode, with the uproject as the project if (Arguments[0].EndsWith(".uproject")) { Config.ProjectFile = GamePath = Arguments[0]; MainCommand = "gui"; } else { MainCommand = Arguments[0]; } } else if (Arguments.Length == 2) { MainCommand = Arguments[0]; GamePath = Arguments[1]; } else if (Arguments.Length >= 2) { MainCommand = Arguments[0]; GamePath = Arguments[1]; for (int ArgIndex = 2; ArgIndex < Arguments.Length; ArgIndex++) { string Arg = Arguments[ArgIndex].ToLowerInvariant(); if (Arg.StartsWith("-")) { // Behavior switches switch (Arg) { case "-verbose": Config.bVerbose = true; break; case "-strip": Config.bForceStripSymbols = true; break; case "-compress=best": Config.RecompressionSetting = (int)CompressionLevel.BestCompression; break; case "-compress=fast": Config.RecompressionSetting = (int)CompressionLevel.BestSpeed; break; case "-compress=none": Config.RecompressionSetting = (int)CompressionLevel.None; break; case "-distribution": Config.bForDistribution = true; break; case "-createstub": Config.bCreateStubSet = true; break; case "-sign": Config.bPerformResignWhenRepackaging = true; break; case "-cookonthefly": Config.bCookOnTheFly = true; break; case "-iterate": Config.bIterate = true; break; } // get the stage dir path if (Arg == "-stagedir") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.RepackageStagingDirectory = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-manifest") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.DeltaManifest = Arguments[++ArgIndex]; } else { return(false); } } else if (Arg == "-backup") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.FilesForBackup.Add(Arguments[++ArgIndex]); } else { return(false); } } else if (Arg == "-config") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { GameConfiguration = Arguments [++ArgIndex]; } else { return(false); } } // append a name to the bungle identifier and display name else if (Arg == "-bundlename") { if (Arguments.Length > ArgIndex + 1) { Config.OverrideBundleName = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-mac") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.OverrideMacName = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-architecture" || Arg == "-arch") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Architecture = "-" + Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-project") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.ProjectFile = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-device") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.DeviceId = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-additionalcommandline") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { AdditionalCommandline = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-provision") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.Provision = Arguments [++ArgIndex]; Config.bProvision = true; } else { return(false); } } else if (Arg == "-certificate") { if (Arguments.Length > ArgIndex + 1) { Config.Certificate = Arguments [++ArgIndex]; Config.bCert = true; } else { return(false); } } } else { // RPC command MainRPCCommand = Arguments[ArgIndex]; } } if (!SSHCommandHelper.ParseSSHProperties(Arguments)) { return(false); } } return(true); }
static private bool ParseCommandLine(ref string[] Arguments) { if (Arguments.Length == 0) { StartVisuals(); // we NEED a project, so show a uproject picker string UProjectFile; string StartingDir = ""; if (ToolsHub.ShowOpenFileDialog("Unreal Project Files (*.uproject)|*.uproject;", "IPhonePackager now requires a .uproject file for certificate/provisioning setup", "mobileprovision", "", ref StartingDir, out UProjectFile)) { Arguments = new string[] { UProjectFile }; } else { Arguments = new string[] { "gui" }; } } if (Arguments.Length == 1) { // if the only argument is a uproject, then assume gui mode, with the uproject as the project if (Arguments[0].EndsWith(".uproject")) { Config.ProjectFile = GamePath = Arguments[0]; MainCommand = "gui"; } else { MainCommand = Arguments[0]; } } else if (Arguments.Length == 2) { MainCommand = Arguments[0]; GamePath = Arguments[1]; if (GamePath.EndsWith(".uproject")) { Config.ProjectFile = GamePath; } } else if (Arguments.Length >= 2) { MainCommand = Arguments[0]; GamePath = Arguments[1]; if (GamePath.EndsWith(".uproject")) { Config.ProjectFile = GamePath; } for (int ArgIndex = 2; ArgIndex < Arguments.Length; ArgIndex++) { string Arg = Arguments[ArgIndex].ToLowerInvariant(); if (Arg.StartsWith("-")) { // Behavior switches switch (Arg) { case "-verbose": Config.bVerbose = true; break; case "-strip": Config.bForceStripSymbols = true; break; case "-compress=best": Config.RecompressionSetting = (int)CompressionLevel.BestCompression; break; case "-compress=fast": Config.RecompressionSetting = (int)CompressionLevel.BestSpeed; break; case "-compress=none": Config.RecompressionSetting = (int)CompressionLevel.None; break; case "-distribution": Config.bForDistribution = true; break; case "-codebased": Config.bIsCodeBasedProject = true; break; case "-createstub": Config.bCreateStubSet = true; break; case "-sign": Config.bPerformResignWhenRepackaging = true; break; case "-cookonthefly": Config.bCookOnTheFly = true; break; case "-iterate": Config.bIterate = true; break; case "-tvos": Config.OSString = "TVOS"; break; case "-autosigning": Config.bAutomaticSigning = true; break; } // get the stage dir path if (Arg == "-stagedir") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.RepackageStagingDirectory = Arguments [++ArgIndex]; } else { return(false); } } // get the provisioning uuid else if (Arg == "-provisioninguuid") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.ProvisionUUID = Arguments[++ArgIndex]; } else { return(false); } } else if (Arg == "-teamID") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.TeamID = Arguments[++ArgIndex]; } else { return(false); } } else if (Arg == "-manifest") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.DeltaManifest = Arguments[++ArgIndex]; } else { return(false); } } else if (Arg == "-backup") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.FilesForBackup.Add(Arguments[++ArgIndex]); } else { return(false); } } else if (Arg == "-config") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { GameConfiguration = Arguments [++ArgIndex]; } else { return(false); } } // append a name to the bungle identifier and display name else if (Arg == "-bundlename") { if (Arguments.Length > ArgIndex + 1) { string projectName = "[PROJECT_NAME]"; string bundleId = Arguments[++ArgIndex]; // Check for an illegal bundle id for (int i = 0; i < bundleId.Length; ++i) { char c = bundleId[i]; if (c == '[') { if (bundleId.IndexOf(projectName, i) != i) { Error("Illegal character in bundle ID"); return(false); } i += projectName.Length; } else if ((c < '0' || c > '9') && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && c != '.' && c != '-') { Error("Illegal character in bundle ID"); return(false); } } // Save the verified bundle id Config.OverrideBundleName = bundleId; } else { return(false); } } else if (Arg == "-schemename") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { SchemeName = Arguments[++ArgIndex]; } else { return(false); } } else if (Arg == "-schemeconfig") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { SchemeConfiguration = Arguments[++ArgIndex]; } else { return(false); } } else if (Arg == "-mac") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.OverrideMacName = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-architecture" || Arg == "-arch") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Architecture = "-" + Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-project") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.ProjectFile = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-device") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.DeviceId = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-additionalcommandline") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { AdditionalCommandline = Arguments [++ArgIndex]; } else { return(false); } } else if (Arg == "-provision") { // make sure there's at least one more arg if (Arguments.Length > ArgIndex + 1) { Config.Provision = Arguments [++ArgIndex]; Config.bProvision = !String.IsNullOrEmpty(Config.Provision); } else { return(false); } } else if (Arg == "-certificate") { if (Arguments.Length > ArgIndex + 1) { Config.Certificate = Arguments [++ArgIndex]; Config.bCert = !String.IsNullOrEmpty(Config.Certificate); } else { return(false); } } } else { // RPC command MainRPCCommand = Arguments[ArgIndex]; } } if (!SSHCommandHelper.ParseSSHProperties(Arguments)) { return(false); } } return(true); }