Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Using custom installer instead of zip import

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using custom installer instead of zip import

    Hi guys,
    I'm wondering about the correct technique for creating an installer app to place DLL product into Ninja. (as opposed to the standard import of zip approach)

    I've built one that places the .X64 DLL and the .86 DLL and the .cs file from the Ninja exported zip file into the bin/Custom folder.
    Ninja seems to include them in its assembly when next launched and be able to run the product ok.
    BUT, when I next try to compile anything I get problems. See attached error message pic.

    Any advice would be greatly appreciated.
    saltminer
    Attached Files

    #2
    Hi Saltminer, seems a folder issue to me? Looks like it created another custom subfolder in your routine?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      To reiterate; the installer places files only in the Custom folder. When starting next, Ninja can successfully use these indicators which says to me they are in the assembly ok.
      BUT, if I compile something I get a whole list of errors - based from the .cs file in the Custom folder that Ninja generated at the time of export. Every indicator has an error that says "such and such is method but is used like a type". In the editor it is clear that Ninja expects this file to reside in a place other than where it does - in a Custom folder inside the Custom folder. None of that is in my programming or in the installer app.

      If i use the normal zip import of these same files then there is no problems, so I am requesting advice on the use of installer apps to place these files in Ninja. Is putting them straight into the Custom folder all that is required? Is there something else to do, or a better place to put them? (Are the "Incoming" or "Import" folders relevant, for example?)

      UPDATE:
      Just did a test where I placed the two DLL files in the Custom folder and the .cs file in a new folder named "Custom" inside the bin/Custom folder, essentially matching what that error message directory is. Restart Ninja. IT NOW WORKS. What's going on?
      This is nothing to do with my programming, and as you know within the average indicator there is no need to be doing anything regarding these sub folders of Ninja. It seems the import process that Ninja uses when using the Import NinjaScript is different from the process when it is starting up and discovering new DLLs in the Custom folder.

      Any and all explanation and advice will be appreciated. :-)
      Thanks,
      saltminer

      Comment


        #4
        Sorry I'm not sure I follow you - the installer should do the exact same thing you would when manually installing the files. That is placing the dll's and the cs into the bin > custom folder. I am not sure where you would get the duplicate custom subfolder from, however the other folders you see would not be used in the process and would not be relevant.

        You can readily test that with the manually exported zip you have - if you copy the contents to bin > custom and restart (so dll's are loaded up) it should work - what you then might need to do is adding in a reference in the editor.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by saltminer View Post
          To reiterate; the installer places files only in the Custom folder. When starting next, Ninja can successfully use these indicators which says to me they are in the assembly ok.
          BUT, if I compile something I get a whole list of errors - based from the .cs file in the Custom folder that Ninja generated at the time of export. Every indicator has an error that says "such and such is method but is used like a type". In the editor it is clear that Ninja expects this file to reside in a place other than where it does - in a Custom folder inside the Custom folder. None of that is in my programming or in the installer app.

          If i use the normal zip import of these same files then there is no problems, so I am requesting advice on the use of installer apps to place these files in Ninja. Is putting them straight into the Custom folder all that is required? Is there something else to do, or a better place to put them? (Are the "Incoming" or "Import" folders relevant, for example?)

          UPDATE:
          Just did a test where I placed the two DLL files in the Custom folder and the .cs file in a new folder named "Custom" inside the bin/Custom folder, essentially matching what that error message directory is. Restart Ninja. IT NOW WORKS. What's going on?
          This is nothing to do with my programming, and as you know within the average indicator there is no need to be doing anything regarding these sub folders of Ninja. It seems the import process that Ninja uses when using the Import NinjaScript is different from the process when it is starting up and discovering new DLLs in the Custom folder.

          Any and all explanation and advice will be appreciated. :-)
          Thanks,
          saltminer
          Does your custom installer also write the reference that should be in the Editor window?

          Comment


            #6
            There is no difference if I manually move the files into the Custom folder or if the installer app does it. I still have the same result ; the indicators work but the next time I compile something it errors, needing the .cs file in Custom/Custom folder (which of course doesn't exist).
            Please note the .cs file errors are within the NinjaScript Generated code, not my own code.

            If I then manually add a Reference in the editor the problem goes away.

            So, how can a Reference be added programmatically by the installer app? I tried plonking a AdditionalReferences.txt in the Custom folder but it didn't do anything.

            saltminer

            Comment


              #7
              saltminer, the AdditionalReferences txt would only be triggered when you do a manual import of the zip file and is also only needed for any additional references that your file would need. The default reference would always be added by the import process itself.

              What you could potentially look into is modifying the config.xml file by the installer engine, the references are listed here under <References>. I need to stress though this is a very sensitive file and we would not officially support any custom changes in that area.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by frslvr, 04-11-2024, 07:26 AM
              8 responses
              111 views
              1 like
              Last Post NinjaTrader_BrandonH  
              Started by stafe, 04-15-2024, 08:34 PM
              10 responses
              44 views
              0 likes
              Last Post stafe
              by stafe
               
              Started by rocketman7, Today, 09:41 AM
              3 responses
              8 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by traderqz, Today, 09:44 AM
              2 responses
              5 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by rocketman7, Today, 02:12 AM
              7 responses
              31 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X