wckdspn
Topic Author
Posts: 67
Joined: 18 Aug 2012, 23:14

Prebuild step

03 Apr 2014, 20:36

If I wanted to inject operations pre-build (Unity), what do you think the best path would be? Optimally, I would want to make minimal changes to the Noesis code to make updating less painful. An event I could register a callback to would probably be best.
 
User avatar
jsantos
Site Admin
Posts: 4186
Joined: 20 Jan 2012, 17:18
Contact:

Re: Prebuild step

04 Apr 2014, 02:20

What kind of prebuild steps do you need?

If the callbacks are generic enough we could add them officially.
 
wckdspn
Topic Author
Posts: 67
Joined: 18 Aug 2012, 23:14

Re: Prebuild step

04 Apr 2014, 02:49

In this particular case, I really only want to do P4 checkouts on files before the build starts (because otherwise they might be read only and they would choke). To implement that, I really just need an event before the build occur, or before the file write occurs with a list of files (the latter is a bit closer to the rest of the build system, where we build to a temporary directory, check the destination files out, then do the copy).

The list of files as a parameter would be ideal (so it doesn't overreach), but just a trigger that occurs before files are written is sufficient.
 
User avatar
jsantos
Site Admin
Posts: 4186
Joined: 20 Jan 2012, 17:18
Contact:

Re: Prebuild step

04 Apr 2014, 19:30

P4 checkout of files inside the StreamingAssets/ folder? in that case, it is not a good idea having that folder under source control because it can be regenerated (with the exception of the Gui/Core and VGL/Drawing folder but those are going to disappear in v1.2).
 
wckdspn
Topic Author
Posts: 67
Joined: 18 Aug 2012, 23:14

Re: Prebuild step

04 Apr 2014, 19:56

In the current state, we still need to check-in guids.txt, which means anyone who works on UI needs to check it out. There also seems to be an issue in that in the initial library import, the build does not trigger for files and had to be built manually (someone spinning up yesterday ran into that problem). Additionally, in the future if the UI build times increase, given that not everyone works on UI, it's time saving to check in built assets files so they do not need to be rebuilt. At which point it will be critical.

There are also other uses. I'm looking at using the newly open sourced Roslyn project to do source transforms to generate compatible initializer code from the auto-gen code from a WPF project. Since the new versions are tied to XAML changes, it makes sense to trigger it when the XAML file gets built for Unity.
 
User avatar
jsantos
Site Admin
Posts: 4186
Joined: 20 Jan 2012, 17:18
Contact:

Re: Prebuild step

04 Apr 2014, 20:20

guids.txt is probably going to disappear also. Anyway, I understand your point. Thinking about the idea of inserting a callback I see the problem that we do not build xamls files independently. We detect changes using an AssetPostProcessor and invoke an incremental build that detect changes (but this detection happens in the C++ side). I have an idea, what if you create a new AssetPostProcessor with higher priority than us? That way you can detect changes in .xamls before we build them.

By the way, what you are commenting about Roslyn sounds very interesting. One of the things we want to have in the future is auto generated code behind in noesisGUI. Yes, we haven't forget about your tickets. :)

Who is online

Users browsing this forum: Google [Bot] and 2 guests