Git Product home page Git Product logo

Comments (14)

FlightControl-User avatar FlightControl-User commented on July 30, 2024

There are solutions for automatic file synchronization. I am using goodsync as a sync tool.
It copies the *.lua files automatically from my MOOSE package to the Scripts\Moose directory in the program files folder.

The embedded file is indeed a PIA, that is why i started with dynamic loading in the first place :-) Believe me, i've searched for all the options, and had to do some lua tricks to make the dynamic loader work ...

FC

from moose.

FlightControl-User avatar FlightControl-User commented on July 30, 2024

But i am hearing you... You suggest to emphasize the "embedded" loading as the only option...
I think you're right. I should emphasize this more in the documentation.

Embedded loading first, and only for those who are developing (and extending) Moose, dynamic loading is used, which is a more advanced loading method.

Also, maybe indeed we can setup a process to automatically copy the Moose_Embedded.lua file into a mission file before publishing... I think this can be easily done with a zip tool installed.

from moose.

glyphoglossus avatar glyphoglossus commented on July 30, 2024

This sounds good.

Also, I think even when developing, we should definitely test with the embedded files. So the workflow is: edit MOOSE Lua, generate embedded file, and then the mission files load the embedded file. That way, we are testing the actual file that 99% of people (non MOOSE developers) will use. With good file syncrhonization and scripts, this should all be in the background. Eventually, do away with dynamic loading (two ways of using MOOSE makes maintenance/debugging etc. tricky)

from moose.

glyphoglossus avatar glyphoglossus commented on July 30, 2024

I should note that I am currently having a lot of difficulty in getting even a simple mission to work with embedded MOOSE. Dynamic is no problem. But "Do Script File" with "MOOSE/Loaders/Moose_Load_Embedded.lua" does not work. Directly "Do Script File" with "MOOSE/Embedded/Moose_Embedded.lua" also does not work. "Do Script File" with "MOOSE/Loaders/Moose_Load_Dynamic.lua" works fine. Still trying to figure this out.

from moose.

FlightControl-User avatar FlightControl-User commented on July 30, 2024

I should note that I am currently having a lot of difficulty in getting even a simple mission to work with embedded MOOSE. Dynamic is no problem. But "Do Script File" with "MOOSE/Loaders/Moose_Load_Embedded.lua" does not work. Directly "Do Script File" with "MOOSE/Embedded/Moose_Embedded.lua" also does not work. "Do Script File" with "MOOSE/Loaders/Moose_Load_Dynamic.lua" works fine. Still trying to figure this out.

I'll check it too... Haven't tested it.

from moose.

glyphoglossus avatar glyphoglossus commented on July 30, 2024

Again, got my accounts mixed up! Sorry. Above is me again ....

[Edit: removed above post and reproducing here]

Also, maybe indeed we can setup a process to automatically copy the Moose_Embedded.lua file into a mission file before publishing... I think this can be easily done with a zip tool installed.

If this can be automated, along with auto-generation of the Moose_Embedded file, then the dynamic loading can be deprecated.

But even if not, as I suggest above, I think a workflow in which following any editing of the MOOSE library, the library gets "compiled" into single embedded file, and this is the file that is loaded in the mission, would guarantee that all our testing/experimentation/mission-building is done using code/files that will generally be available to most people.

from moose.

FlightControl-User avatar FlightControl-User commented on July 30, 2024

Related to:

But "Do Script File" with "MOOSE/Loaders/Moose_Load_Embedded.lua" does not work. Directly "Do Script File" with "MOOSE/Embedded/Moose_Embedded.lua" also does not work.

I think i found the solution.
Reload the latest Moose_Embedded.lua file from the Moose\Embedded folder.

recheck pls.

from moose.

FlightControl-User avatar FlightControl-User commented on July 30, 2024

Before i forget. Nice to meet you Jeet. You're welcome to join.
Would this automatic including of the moose_embedded.lua file be something you could investigate?
The problem is with your following statement:

and this is the file that is loaded in the mission,

cannot be done when your mission is open. You would have to close your mission, and reload it again after the embedded file got included. That is why i started with dynamic loading...

Once a mission is "finished" or ready for a release, the embedded file could be added. I think indeed that process can be further automated.

from moose.

glyphoglossus avatar glyphoglossus commented on July 30, 2024

Nice to meet you, too!

OK, I do not understand this.

So here is the process:

  1. Go to Mission Editor
  2. create new mission
  3. Create new trigger: ONCE, no condition, ACTION = "Do Script File", with file = "MOOSE/Embedded/Moose_Embedded.lua"
  4. Create new trigger: ONCE, condition = time > 2 (though I have also tried nothing here), ACTION = "Do Script File", with file = "my_mission.lua"
  5. Fly

You are saying the above is wrong?

from moose.

FlightControl-User avatar FlightControl-User commented on July 30, 2024

It is not wrong. it is good, if you want only to use embedded loading, which is fine.
If you can make a trick to get every time ALL the mission file get updated with a new embedded.lua file, once i've changed some moose code, then that would be great.
Even the mission file you currently have open in your mission editor, without having to reload it..

from moose.

glyphoglossus avatar glyphoglossus commented on July 30, 2024

Ah yes, but for some reason, the above does not seem to work for me. Still trying to figure it out!

from moose.

FlightControl-User avatar FlightControl-User commented on July 30, 2024

Jeet, i have completely reworked the loading method and have implemented a tool that can replace the MOOSE version in a batch of DCSW mission files residing in a couple of directories.
Now the embedded is the standard method. Dynamic is still supported, but not anymore documented. It is for developer purposes only.

Have a look at the main site here:
http://flightcontrol-master.github.io/MOOSE/

from moose.

glyphoglossus avatar glyphoglossus commented on July 30, 2024

Definitely will be helpful getting people to use this!

from moose.

FlightControl-User avatar FlightControl-User commented on July 30, 2024

Done, now only one file needs to be included, which is Mooe.lua.

from moose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.