protected void optimizeScript(String relpath, File src, File dst) throws IOException {
		if (relpath.equals("main.scr") || relpath.startsWith("special/")) {
			FileUtil.copyFile(src, dst);
		} else {
			StringBuilder sb = new StringBuilder((int)src.length());
			
			BufferedReader in = new BufferedReader(new InputStreamReader(
					new FileInputStream(src), "UTF-8"));
			try {
				String line;
				while ((line = in.readLine()) != null) {
					if (line.startsWith("#") || line.trim().isEmpty()) {
						continue;
					}
					
					if (line.startsWith("text ")) {
						line = optimizeTextLine(line);
						if (line != null && line.length() > 0) {
							sb.append(line);
							if (!line.endsWith("\n")) {
								sb.append('\n');
							}
						}
					} else {
						sb.append(line);
						sb.append('\n');
					}
				}
			} finally {
				in.close();
			}
			
			FileUtil.write(dst, sb.toString());
		}
	}