After some messing about I can get a project running in the player using the command prompt by entering the following commands...
c:\gideros\tools\gdrbridge.exe setip 127.0.0.1
c:\gideros\giderosplayer.exe
c:\gideros\tools\gdrbridge.exe isconnected
c:\gideros\tools\gdrbridge.exe play c:\gideros\woah\woah.gproj |
Now this works fine when I am typing manually the commands one by one at a command prompt. If however, I save the above commands as a .bat file, when I execute the bat file, it freezes directly after the player is started. On closing the player, the script continues and the other commands are executed.
The issue is that because the player is now closed... the project is not run.
Can anyone help me figure out why manually typing works, but the same stuff in a batch file does not?
Just FYI I'm messing about with this in the hope that I can ditch Zerobrane Studio and start using Visual Studio Code (VSC) as my code editor. If I can get the player running code from within VSC then I will also try to create a project editor to add files and such, and create (or hack) a language extension for VSC to have tasty code completion and stuff for Gideros.
Comments
probably when run from batch file it runs too fast, i think in zerobrane gideros code there is a delay e.g. between the lines. there should be some nicer and more dependable solution, though.
Likes: antix
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Edit: seems like ‘start’ command is the answer
Likes: antix
rem note: replace the names below with your own..
rem @echo off
rem start "my title" /B "c:\program files\mycommand.exe"
rem start notes.txt
start "xxx" /B "C:\PORTABLES\tools\Clavier\Clavier.exe"
start "yyy" /B "C:\PORTABLES\tools\SideSlide_v4.79_Portable\SideSlide\SideSlide.exe"
rem @echo on
note: rem is equivalent to --
note2: "xxx" we need a title for the window
note3: /B is for closing the terminal window
Likes: antix
Likes: MoKaLux
Likes: MoKaLux
Hey would it be possible for gdrbridge.exe to have the ability to wait for a specified number of ms before performing the action you wanted it to?
So the command "gdrbridge.exe delay 2000 isconnected" would wait for 2 seconds before performing the "isconnected" action.
My current workaround is to have a separate dos command in the folder that gets called but that's kind of s**t
Likes: keszegh
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Would you be able (if you know) to explain quicjly how debugging works in Gideros? For example when I print something in one of my apps... what happens? Does it get sent to some tcpip listener or something?
@keszegh once you get use to the features of VSC like auto-filling for parenthesis and so forth in VSC, it's really hard to go back to ZBS
Likes: MoKaLux
Typical commands are:
- Sending a file from the studio to the player
- Running the game in the player
- Sending 'print' data from the player to the studio
They are not documented, so one must take a look at Gideros code to understand the format of the packets, but they are generally simple.
I added definitions for the packet type last year here: https://github.com/gideros/gideros/blob/master/libnetwork/libnetwork.h#L11
For actual implementations in Gideros, you should look at desktop player and studio code. For example https://github.com/gideros/gideros/blob/master/player/Sources/glcanvas.cpp#L200 for the function that sends lua 'print' to the studio
Likes: MoKaLux, antix
I don't have anything to share yet as I have just got my launch script working inside VSC. I am finding the task of creating anything for VSC rather challenging to say the least. Whilst there is a lot of documentation, it's really not geared towards a beginner. I'll keep trying for now and post whatever I come up with here
Regarding the studio code.. there doesn't seem to be a folder for it as there is for player, gdrbridge, etc. Is the source for the studio just scattered throughout the repository?
Likes: antix
He While I was trying to decipher how debuggers work with VSC I installe heaps of LUA ones and came across one that already has Gideros support!
https://github.com/devcat-studio/VSCodeLuaDebug
I can;t get the actual debugger working but I can use it to launch a project, print stuff to the VSC debug console, and when an app crashes because of some syntax error or whatnot, it shows what line caused the problem.
For me that is a pretty smart result s I never use real debugging and stepping through code, etc.
I'm slowly getting to grips with language extensions, but just the very basic declarative type, not the full blown language server. If I can make the simple one work, I'll try for the more advanced (and better one).
As it is right now I can actually use VSC for Gideros which is very cool!
Likes: MoKaLux, hgy29
I tested with the Bitmap class and this is the format for adding things like that...
Likes: keszegh, MoKaLux
@hgy29 I'm using http://wiki.giderosmobile.com/gidapiref.php to scrape the docs in JSON format but there is one anomaly that I've come across so far. Exported item 14 is the IO namespace but its interior arrays contain "TexturePack" objects, not "io" objects. Is this an error in the script?
The above seems odd but I can work around it inside Javascript.
it's now: https://wiki.gideros.rocks/gidapi.php (attached to post)
edit: http://wiki.gideros.rocks/gidapiref.php I forgot about this one it looks very nice too
change from xml to txt because of the forum policy
Likes: antix
http://wiki.gideros.rocks/gidapiref.php produces basically the same information as https://wiki.gideros.rocks/gidapi.php but it is in JSON format which is very easy to use.
The XML file is to me pretty much unreadable and requires a LOT of processing to make use of, even though it contains the return values (which is all I'm missing).
Did you use a URL to get the XML? For my purposes I need a URL (like https://wiki.gideros.rocks/gidapi.php) which can be used in an AJAX request to automatically retrieve the data from the wiki.
but it took me something like 30secs to get it (including txt file splitting )
I copied all class from top to bottom then pasted in wiki export.
Likes: antix
Which brings me to say that there is no way to download the wiki (as fa as I know) to be used offline, as a folder of html files.
I should really have a look at how the documents are structured and created I think
I used it to have the whole wiki on my hard drive
I've looked at the Gideros Github repository and the XML files there contain the information I need to be able to generate proper documentation. It would be easier if these were JSON files but I can cope with parsing the XML
I'm not having much luck right now getting my generated docs working with the Lua extension in VSC. I think there's something obvious that I'm not getting right now
Likes: antix
May I ask what documents am I supposed to use? The wiki ones (when exported using your script) contain parameters, but not returns.
Also, if the XML ones on the repository are obsolete then maybe they could be moved to an "obsolete" folder, or removed.
The wiki is the master source for docs, so I’ll try to improve my script to extract return values description. By the way, what kind of output do you expect ?
Likes: antix