public void LoadSyncFilePrefs() { string prefsSection = mMog.GetProject().GetProjectName() + "." + mMog.GetActivePlatform().mPlatformName; mUserSyncFile = guiUserPrefs.Load(prefsSection, "UserSyncFile"); mProjectSyncFile = guiUserPrefs.Load(prefsSection, "ProjectSyncFile"); }
public guiPlatformSinc(string targetConsole, string sourcePath, MogMainForm main, string userName, bool useDefaultUser, bool force, bool runAfterSync, bool showSummary) { mTargetConsole = targetConsole; mSourcePath = sourcePath.ToLower(); mMog = main.gMog; mUserName = userName; mUseDefaultUser = useDefaultUser; mForce = force; mRunAfterSync = runAfterSync; mShowSummary = showSummary; mUserSyncFile = "None"; mProjectSyncFile = "Platform." + mMog.GetActivePlatform().mPlatformName + ".sync"; mConsoleCopy = true; mFileMapCreate = false; mainForm = main; }
private void RunXbox() { string output = ""; string xboxExe = ""; string Autoplay = ""; MOG_Ini buttonDefaults = null; if (mainForm.gMog.IsProject()) { // Get the project defaults string projectDefaultButtonsFile = mainForm.gMog.GetProject().GetProjectToolsPath() + "\\" + mainForm.gMog.GetProject().GetProjectName() + ".Client.Buttons.Default.info"; if (DosUtils.FileExist(projectDefaultButtonsFile)) { buttonDefaults = new MOG_Ini(projectDefaultButtonsFile); } } // Do we run autoPlay? if (mainForm.AssetManagerLocalDataXboxAutoplayCheckBox.Checked) { Autoplay = string.Concat(mainForm.AssetManagerLocalDataXboxUserMapComboBox.Text, "?Game=EonEngine.EonGameInfo -NoMenu"); } // Use 'default' as user, if the Default checkbox is checked. This is used for the programmers who debug their code using the default.xbe if (mainForm.AssetManagerLocalDataXboxDefaultCheckBox.Checked) { xboxExe = string.Concat("xE:\\", mMog.GetProject().GetProjectName(), "\\default.xbe", " ", Autoplay); } else { xboxExe = string.Concat("xE:\\", mMog.GetProject().GetProjectName(), ".", mainForm.gMog.GetUser().GetUserName(), "\\default.xbe", " ", Autoplay); } // Get the tool listed on the startup page string command = ""; if (buttonDefaults != null) { if (buttonDefaults.SectionExist(mMog.GetProject().GetProjectName() + ".Buttons")) { if (buttonDefaults.KeyExist(mMog.GetProject().GetProjectName() + ".Buttons", "Run")) { command = buttonDefaults.GetString(mMog.GetProject().GetProjectName() + ".Buttons", "Run"); } } } if (command.IndexOf("[ProjectPath]") != -1) { command = string.Concat(command.Substring(0, command.IndexOf("[")), mMog.GetActivePlatform().mPlatformTargetPath, command.Substring(command.IndexOf("]") + 1)); } // Make sure the tool we need exits if (DosUtils.FileExist(command)) { if (guiCommandLine.ShellExecute(command, string.Concat("/x ", mTargetConsole, " ", xboxExe), ProcessWindowStyle.Hidden, ref output) != 0) { MOG_REPORT.ShowMessageBox("XBox Tools", string.Concat(output), MessageBoxButtons.OK); } } else { MOG_REPORT.ShowMessageBox("XBox Tools", string.Concat("This tool is missing, have you updated to the latest version?"), MessageBoxButtons.OK); } }