Henry Rich wrote: > I will settle for running the user's profile, as long as I can > load the 'standalone' script after the profile has run. In other > words, I want to use PM to package my app so that I don't have > to worry about what addons are in the user's machine. I still want > the full IDE so I can easily troubleshoot the expected crashes in > the early days. > > The problem is that the addons in the script have requires that > fail when the 'standalone' script is loaded. > > I think that all I need is to disable load and require when my > 'standalone' script is loaded. The script will have all the > code I need, and I just need to make sure that requires in the > addons don't cause errors during the load. > > Is there any way to stick a line into the front of the > 'standalone' script that will disable load and require? > I could do it in a short ijs script, if there is any way to > force that script to be put into the standalone script ahead > of the libraries.
If the addons are included in the PM source, then you will not need load or require, so you could add into the first PM source file definitions that will disable them. Also, it is often the case that the target file built by PM is not exactly what you want, but can be fixed with a post-build script. This will read in the PM target, do any fixes, such as prefixing new definitions, then write out the final target. Most likely the best solution for you is the latter - write a post-build script that reads in the PM target, and comments out any lines with load or require. This means that you can load the script in the IDE without changing the default load and require verbs. > I'm not sure what I did that made my ARGV set to <'undefined' when > I was testing, but that is no longer a problem. Perhaps you started J with no profile and no other parameters, then loaded your script. In this case, ARGV will be 'undefined'. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
