SvenP Posted February 1, 2006 Share Posted February 1, 2006 The only way i found so far to create custom vop ops from sourcecode is to use an inline vop put that into a subnet and create an hda from it. Is there some other way to create vop ops from source ? Sven Quote Link to comment Share on other sites More sharing options...
sibarrick Posted February 1, 2006 Share Posted February 1, 2006 Sure, file menu -> new operator type Create the type you want then paste the code into the vex tab. Or compile it straight into an otl with vcc using the -l and -L switches Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 1, 2006 Share Posted February 1, 2006 Hey Sven, If you're using Linux, then copy the following into a file called "Makefile" (no extensions) and put it in the same directory where you're writing your .vfl sources. Then type "make" to make all your shaders (into otls) or "make clobber" to un-make things. # This is where the otls will be placed. Feel free to change it OTLDIR = ./otls # This should have all locations where include files are (if any) VEXINC = -I. -I./include # these are just examples for syntax # This should have any special defines (if any) VEXDEF = -DSHADER -Dush_vex # these are just examples for syntax #----------------------------------------------------------------------------- # You should be able to leave what follows alone #----------------------------------------------------------------------------- MAKEDEPEND = cpp -M VFLSRCS = $(wildcard *.vfl) OTLS = $(VFLSRCS:%.vfl=$(OTLDIR)/%.otl) .PHONY: all clobber tell all: $(OTLS) $(OTLDIR)/%.otl : %.vfl @mkdir -p $(OTLDIR) @echo Building Dependencies for $< ... @$(SHELL) -ec '$(MAKEDEPEND) $(VEXINC) $(VEXDEF) -MT $@ $< \ | sed -e '\''s/\($*\)\.otl[ :]*/$*.otl $*.d : /g'\'' > $*.d; \ [ -s $*.d ] || rm -f $*.d' @echo Compiling and building OTL from $< ... vcc $(VEXINC) $(VEXDEF) -L $@ $< -include $(VFLSRCS:.vfl=.d) clobber: @/bin/rm -f $(OTLS) ./*.d tell: @echo VFLSRCS = $(VFLSRCS) @echo OTLS = $(OTLS) It's just a quickie make file to make your life easier, but if you're using Windoze... well... dunno. Maybe a kind soul can post a similar thing for Windows users (?) Does gnuMake work in windows? or would you need the whole MSVisual-blah-blah just to run make? HTH. <EDIT> Oooops... I just realized that the TAB characters might not survive if you just copy-paste the code above (TABs are important in Makefiles). So here it is as a file: Makefile.zip </EDIT> Quote Link to comment Share on other sites More sharing options...
SvenP Posted February 1, 2006 Author Share Posted February 1, 2006 Thank you Quote Link to comment Share on other sites More sharing options...
edward Posted February 2, 2006 Share Posted February 2, 2006 Yes, we use GNU Make on Windows all ths time. Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 2, 2006 Share Posted February 2, 2006 Yes, we use GNU Make on Windows all ths time. 24355[/snapback] Ah, thanks Ed. That's good to know. So I got curious and googled around a bit and noticed there are a few native ports of some unix tools, and then there's cygwin... do you use cygwin to get the whole environment, or go with the native port of some of the bits and pieces? I also noticed MinGW, and djgpp, and... it gets a little confusing in windows land The little makefile snippet above for example, would need cpp and sed (+some shell)... or just use something else to scan for dependencies I guess...(?) Let's say you're writing Houdini plugins (non-UI dso/dll), and you're developing on Linux (traditional text editor+makefiles, etc), what would you recommend as a good toolset for porting to Windows in the least painful way possible? In this case you'd have to use MSVC, so the open question for me is: could you run the MS compiler from a cygwin/make environment? (or would you even want to?) Or is it a case of just biting the bullet and manually turning all your build scripts into MSVC "projects"? Or use some third-party cross-platform build system? Or... Mario Clueless-In-Windows Marengo. P.S. uhmmm.... I just went waaaaay off topic didn't I... sorry Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted February 2, 2006 Share Posted February 2, 2006 In this case you'd have to use MSVC, so the open question for me is: could you run the MS compiler from a cygwin/make environment? (or would you even want to?)Or is it a case of just biting the bullet and manually turning all your build scripts into MSVC "projects"? Or use some third-party cross-platform build system? Or... 24375[/snapback] By using hcustom in a WIN environment I have no need to create MSVC "projects", I just use the IDE for the "language sensitive" editor, all compilations occur via tcsh(CygWIN) and hcustom. Works fine. I'd rather stay in *NIX land but you know the drill ... --Mark Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 2, 2006 Share Posted February 2, 2006 By using hcustom in a WIN environment I have no need to create MSVC "projects", I just use the IDE for the "language sensitive" editor, all compilations occur via tcsh(CygWIN) and hcustom. Works fine. 24380[/snapback] Thanks Mark. Yup. That's definitely painless But let's say things get more complicated and your plugins need to make use of other libraries you've written, which in turn need to be compiled/built in a way that's compatible with Houdini, etc. IOW: say you need something more controllable than hcustom... what do people like to do then? Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted February 2, 2006 Share Posted February 2, 2006 Thanks Mark.Yup. That's definitely painless But let's say things get more complicated and your plugins need to make use of other libraries you've written, which in turn need to be compiled/built in a way that's compatible with Houdini, etc. IOW: say you need something more controllable than hcustom... what do people like to do then? 24382[/snapback] You can always roll your own makefile, I think Brian (from Martian Labs) posted something about that on odforce or you can pass the libs/include dirs to hcustom via the usual "-L", "-l" and "-I" switches (but you probably already know that!). --Mark Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 2, 2006 Share Posted February 2, 2006 You can always roll your own makefile, I think Brian (from Martian Labs) posted something about that on odforce or you can pass the libs/include dirs to hcustom via the usual "-L", "-l" and "-I" switches (but you probably already know that!). --Mark 24383[/snapback] Yes, that's my question. I already roll my own make files in Linux and build things that way. But "rolling your own makefiles" in windows likely takes a different approach and toolset, and so my question: what's the least painful way to move a Linux-centric compile/build system to windows? I'll look around for Brian's post. Thanks. [Edit] Found it here. And yes, it looks like it's possible going the cygwin route. Thank you Mark and Brian! [/Edit] Quote Link to comment Share on other sites More sharing options...
edward Posted February 2, 2006 Share Posted February 2, 2006 It's all done for you already. Just include $HT/makefiles/Makefile.gnu Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted February 2, 2006 Share Posted February 2, 2006 It's all done for you already. Just include $HT/makefiles/Makefile.gnu 24390[/snapback] Whoah! I've never looked there before ... Thanks Edward! --Mark Quote Link to comment Share on other sites More sharing options...
sibarrick Posted February 2, 2006 Share Posted February 2, 2006 Whats all this talk of windows anyhow? You coming over to the dark side or just suffering from a head cold? Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 2, 2006 Share Posted February 2, 2006 It's all done for you already. Just include $HT/makefiles/Makefile.gnu 24390[/snapback] Cool. I've been using something like that in Linux, but I wasn't sure if it would work under Windows... I'm assuming you mean "do that in a cygwin environment". Thanks Ed. Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 2, 2006 Share Posted February 2, 2006 Whats all this talk of windows anyhow? You coming over to the dark side or just suffering from a head cold? 24393[/snapback] Must be a head cold Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.