Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A request stop all after writeProject() #45

Open
xhfzcmt opened this issue Nov 10, 2020 · 3 comments
Open

A request stop all after writeProject() #45

xhfzcmt opened this issue Nov 10, 2020 · 3 comments

Comments

@xhfzcmt
Copy link

xhfzcmt commented Nov 10, 2020

I hope modify csproj that created by "writeProject()".
then call msbuild

CSharpCompiler::compile code may like

this.data = data;
preProcess();
if (!FileSystem.exists("bin"))
	FileSystem.createDirectory("bin");
findCompiler();
writeProject();

if(**manualCompile**) {
  return;
}

Whether to consider supporting?

@kLabz
Copy link
Contributor

kLabz commented Nov 10, 2020

Did you try -D no-compilation and then work with generated cs code?

> haxe --help-defines
no-compilation            : Disable final compilation (for hl,cpp,java,cs)

@xhfzcmt
Copy link
Author

xhfzcmt commented Nov 10, 2020

Did you try -D no-compilation and then work with generated cs code?

> haxe --help-defines
no-compilation            : Disable final compilation (for hl,cpp,java,cs)

tryed. :)

if use UnityEditor.dll
compile fail . nothing will output (no .cs)

hxcs execute step

  1. haxe compile (result is hxcs_build.txt and .cs files)
    2.parse hxcs_build.txt and build project.csproj file.
    3.call native c# compiler with project.csproj
    now fail at first step.

@xhfzcmt
Copy link
Author

xhfzcmt commented Nov 10, 2020

Did you try -D no-compilation and then work with generated cs code?

> haxe --help-defines
no-compilation            : Disable final compilation (for hl,cpp,java,cs)

Just saw us meet, you saw my other question about . Currently if haxe did not fix this problem before. I will try to add UnityEditor Reference after csproject is built. Although this will definitely solve the problem. But a lot of untyped needs to be written in the code.

today 。i solve with 5 step

  1. abort hxcs's work
    Screen Shot 2020-11-10 at 9 12 19 PM

2.Compile only with -net-lib UnityEngine.dll

3.Write haxe code like this
Screen Shot 2020-11-10 at 9 13 46 PM

4.Add reference node in "project.csproj"
Screen Shot 2020-11-10 at 9 31 06 PM

5.CMD > msbuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants