« Return to Thread: How do I build an addon that's in another folder?

How do I build an addon that's in another folder?

by dennisf486 :: Rate this Message:

Reply to Author | View in Thread

I need my addon for Io to be located not in my ~/io/addons folder but in my ~/myproject folder because "myproject" is a git repository, and I need the addon to be part of that git repository, not io's.  I tried putting a symbolic link to the foldering into the io/addons, but that doesn't work because Io's Directory object categorizes the link as a file, not a folder.  I tried modifying Project.io to pull files as well as folders, using 'Directory clone setPath(file path)' to transform the symbolic link's file object into a Directory object of the same name.  (The link is the only file in my addons directory.)  Specifically, I did:

        modulesInFolder := method(name,
                folder := Directory clone setPath(name)
                if(folder exists not, return List clone)
                subfolders := folder directories

<<<< BEGIN UGLY HACK >>>>
                folder files foreach(f, subfolders append(Directory clone setPath(f path)))
<<<< END HACK HERE >>>>

                subfolders selectInPlace(fileNamedOrNil("build.io"))
                subfolders map(f,
                        module := Lobby doString(f fileNamedOrNil("build.io") contents)
                        module folder setPath(f path)
                        module
                )
        )

That actually got Io's build process to at least attempt to build it, but then I had a new problem:  "../../whatever" in the -I../../includes done by the makefile actually get evaluated relative to the real path in ~/myproject/, not the addon's apparent path in ~/io/addons.

Does anyone here work on Io addons that they do NOT keep in io/addons?  How do you build them?

Also, if I have a pre-built copy of Io, specifically the old Win32 build of Io from iolanguage.com, and I make a new add-on, how does the io.exe program load an addon that didn't exist when it started?  I know it has something to do with the addon being a dll, but how does it find the dll?

 « Return to Thread: How do I build an addon that's in another folder?