浏览代码

Print error if no export destination has been passed

est31 9 年之前
父节点
当前提交
523b67e740
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      main/main.cpp

+ 11 - 0
main/main.cpp

@@ -1086,6 +1086,17 @@ bool Main::start() {
 
 #endif
 
+	if (_export_platform!="") {
+		if (game_path=="") {
+			String err="Command line param ";
+			err+=export_debug?"-export_debug":"-export";
+			err+=" passed but no destination path given.\n";
+			err+="Please specify the binary's file path to export to. Aborting export.";
+			ERR_PRINT(err.utf8().get_data());
+			return false;
+		}
+	}
+
 	if(script=="" && game_path=="" && String(GLOBAL_DEF("application/main_scene",""))!="") {
 		game_path=GLOBAL_DEF("application/main_scene","");
 	}