private String chooseArchiveFile(String approveButtonText, String approveToolTip) {

		GhidraFileChooser jarFileChooser =
			createFileChooser(ArchivePlugin.ARCHIVE_EXTENSION, "Ghidra Archives", archivePathName);
		jarFileChooser.setTitle("Archive a Ghidra Project");
		File jarFile = null;
		if (archivePathName != null && archivePathName.length() != 0) {
			jarFile = new File(archivePathName);
		}
		else if (projectLocator != null) {
			jarFile = new File(projectLocator.toString() + ArchivePlugin.ARCHIVE_EXTENSION);
		}
		jarFileChooser.setSelectedFile(jarFile);
		jarFileChooser.setApproveButtonText(approveButtonText);
		jarFileChooser.setApproveButtonToolTipText(approveToolTip);

		String pathname = null;
		while (pathname == null) {
			File selectedFile = jarFileChooser.getSelectedFile();

			if (selectedFile == null) {
				return null; // user cancelled, get out
			}

			File file = selectedFile;
			String chosenPathname = file.getAbsolutePath();
			String name = file.getName();
			if (!NamingUtilities.isValidProjectName(name)) {
				Msg.showError(getClass(), null, "Invalid Archive Name",
					name + " is not a valid archive name");
				continue;
			}

			File f = projectLocator.getProjectDir();
			String filename = f.getAbsolutePath();
			if (chosenPathname.indexOf(filename) >= 0) {
				Msg.showError(getClass(), null, "Invalid Archive Name",
					"Output file cannot be inside of Project");
				continue;
			}

			pathname = chosenPathname;
		}
		jarFileChooser.dispose();
		return pathname;
	}
Brings up a file chooser for the user to specify a directory and
filename of the archive file.
@param approveButtonText The label for the "Open" button on the file chooser
@param approveToolTip The tool tip for the "Open" button on the file chooser
@return the archive file path.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchiveDialog.java