Browse Source

[cs] Take off -D unity_std_target before the release

Cauê Waneck 10 years ago
parent
commit
bb2a064a3e
3 changed files with 2 additions and 29 deletions
  1. 0 2
      common.ml
  2. 0 22
      gencommon.ml
  3. 2 5
      gencs.ml

+ 0 - 2
common.ml

@@ -242,7 +242,6 @@ module Define = struct
 		| SwfScriptTimeout
 		| SwfUseDoAbc
 		| Sys
-		| UnityStdTarget
 		| Unity46LineNumbers
 		| Unsafe
 		| UseNekoc
@@ -329,7 +328,6 @@ module Define = struct
 		| SwfScriptTimeout -> ("swf_script_timeout", "Maximum ActionScript processing time before script stuck dialog box displays (in seconds)")
 		| SwfUseDoAbc -> ("swf_use_doabc", "Use DoAbc swf-tag instead of DoAbcDefine")
 		| Sys -> ("sys","Defined for all system platforms")
-		| UnityStdTarget -> ("unity_std_target", "Changes C# sources location so that each generated C# source is relative to the Haxe source location. If the location is outside the current directory, the value set here will be used")
 		(* see https://github.com/HaxeFoundation/haxe/issues/3759 *)
 		| Unity46LineNumbers -> ("unity46_line_numbers", "Fixes line numbers in generated C# files for Unity 4.6 Mono compiler")
 		| Unsafe -> ("unsafe","Allow unsafe code when targeting C#")

+ 0 - 22
gencommon.ml

@@ -1144,30 +1144,8 @@ let is_relative cwd rel =
 	See that it will write a whole module
 *)
 let generate_modules gen extension source_dir (module_gen : SourceWriter.source_writer->module_def->bool) out_files =
-	let cwd = Common.unique_full_path (Sys.getcwd()) in
 	List.iter (fun md_def ->
 		let source_dir =
-			if Common.defined gen.gcon Define.UnityStdTarget then
-				let file = md_def.m_extra.m_file in
-				let file = if file = "" then "." else file in
-				if is_relative cwd file then
-					let base_path = try
-							let last = Str.search_backward path_regex file (String.length file - 1) in
-							String.sub file 0 last
-						with | Not_found ->
-							"."
-					in
-					match List.rev (fst md_def.m_path) with
-						| "editor" :: _ ->
-							base_path ^ "/" ^ gen.gcon.file ^ "/Editor"
-						| _ ->
-							base_path ^ "/" ^ gen.gcon.file
-				else match List.rev (fst md_def.m_path) with
-					| "editor" :: _ ->
-						Common.defined_value gen.gcon Define.UnityStdTarget ^ "/Editor/" ^ (String.concat "/" (fst md_def.m_path))
-					| _ ->
-						Common.defined_value gen.gcon Define.UnityStdTarget ^ "/Haxe-Std/" ^ (String.concat "/" (fst md_def.m_path))
-			else
 				gen.gcon.file ^ "/" ^ source_dir ^ "/" ^ (String.concat "/" (fst (path_of_md_def md_def)))
 		in
 		let w = SourceWriter.new_source_writer () in

+ 2 - 5
gencs.ml

@@ -3167,9 +3167,6 @@ let configure gen =
 	(* copy resource files *)
 	if Hashtbl.length gen.gcon.resources > 0 then begin
 		let src =
-			if Common.defined gen.gcon Define.UnityStdTarget then
-				Common.defined_value gen.gcon Define.UnityStdTarget ^ "/../Resources"
-			else
 				gen.gcon.file ^ "/src/Resources"
 		in
 		Hashtbl.iter (fun name v ->
@@ -3240,11 +3237,11 @@ let configure gen =
 	mkdir_recursive "" parts;
 	generate_modules gen "cs" "src" module_gen out_files;
 
-	if not (Common.defined gen.gcon Define.KeepOldOutput ||  Common.defined gen.gcon Define.UnityStdTarget) then
+	if not (Common.defined gen.gcon Define.KeepOldOutput) then
 		clean_files (gen.gcon.file ^ "/src") !out_files gen.gcon.verbose;
 
 	dump_descriptor gen ("hxcs_build.txt") path_s module_s;
-	if ( not (Common.defined gen.gcon Define.NoCompilation || Common.defined gen.gcon Define.UnityStdTarget) ) then begin
+	if ( not (Common.defined gen.gcon Define.NoCompilation) ) then begin
 		let old_dir = Sys.getcwd() in
 		Sys.chdir gen.gcon.file;
 		let cmd = "haxelib run hxcs hxcs_build.txt --haxe-version " ^ (string_of_int gen.gcon.version) ^ " --feature-level 1" in