ubisoft / Sharpmake

Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.
Apache License 2.0
922 stars 168 forks source link

Unity(JUMBO) build support #307

Closed Say-Y closed 9 months ago

Say-Y commented 10 months ago

I'm familiar with Jumbo build, so I think it would be nice to have this feature integrated.

https://github.com/ubisoft/Sharpmake/pull/305 Apply modifications

jspelletier commented 9 months ago

Could modify one of the existing sample to add jumbo build support in one of the configuration at least?

sylvainfortin commented 9 months ago

Hi @Say-Y. Since you are adding a new sample, could you add it to SamplesDef.json. Once added to this file, it will be automatically be added to CI along other samples. See https://github.com/ubisoft/Sharpmake/blob/main/docs/Samples.md.

Say-Y commented 9 months ago

Hi @jspelletier , I added a few header and cpp files. (test1.h, test1.cpp, test2.h, test2.cpp)

Hi @sylvainfortin , 'JumboBuild' was added by referring to the 'HelloWorld' part of the 'SamplesDef.json' file. also removed JumboBuild's 'reference' folder. And I don't need to worry about 'UpdateSamplesOutput.bat'?

jspelletier commented 9 months ago

Hi @jspelletier , I added a few header and cpp files. (test1.h, test1.cpp, test2.h, test2.cpp)

Hi @sylvainfortin , 'JumboBuild' was added by referring to the 'HelloWorld' part of the 'SamplesDef.json' file. also removed JumboBuild's 'reference' folder. And I don't need to worry about 'UpdateSamplesOutput.bat'?

UpdateSamplesOutput.bat is used to generate the reference files

Say-Y commented 9 months ago

Hi @jspelletier , I added a few header and cpp files. (test1.h, test1.cpp, test2.h, test2.cpp) Hi @sylvainfortin , 'JumboBuild' was added by referring to the 'HelloWorld' part of the 'SamplesDef.json' file. also removed JumboBuild's 'reference' folder. And I don't need to worry about 'UpdateSamplesOutput.bat'?

UpdateSamplesOutput.bat is used to generate the reference files

Should I also edit that file?

if not "%ERRORLEVEL_BACKUP%" == "0" goto error
call :UpdateRef samples JumboBuild                  JumboBuild.sharpmake.cs                    reference         JumboBuild
Say-Y commented 9 months ago

I have applied your request. thank you

jspelletier commented 9 months ago

I ran the CI. CI failed because you need to run the .bat to create the reference files. They need to be added to your PR.

Say-Y commented 9 months ago

I have confirmed that UpdateSamplesOutput.bat fails without the following settings

AddTargets(new Target(
        Platform.win32 | Platform.win64,
        DevEnv.vs2019,
        Optimization.Debug | Optimization.Release
));

After the change, I confirmed that regression_test.py passed.