IDECommunicator questions

Hi,

I am automating now with Xojo 2018r4 and IDE Communicator included with it.
I got a few problems and would like to know if you have ideas?

How to prevent the Xojo IDE to reveal folder after build?
I have about 100 finder windows open after building 100 project.

CloseWindow script seems not to work. Anyone knows how to close window?
The IDE doesn’t like to have 100 projects open…

I also got two errors logged in Feedback with hangs: <https://xojo.com/issue/55250> <https://xojo.com/issue/55251>

a) There is a preference in the IDE not to do the reveal. Preferences/Build/Reveal App.

b) Close the project after building:

openfile(basePath + "code\\ current/max\\ scheduler.rbp") if BuildApp(16) = "" then return else DoCommand "SaveFile" DoCommand("CloseWindow") end if

a) Thanks. But I like to disable it only for automation. Is that possible?
b) Thanks, But it seems for me that CloseWindow with DoCommand doesn’t work.

remember the setting
turn it off in the script
then restore the setting

How can I automate making the setting?

BuildApp can take two parameters. The build target and a Boolean. The Boolean indicates whether or not to reveal the build.

As for closing, what we do is quit after building each project

QuitIDE(false)

This has the added bonus of making sure the IDE is in a clean state before each build.

@Greg O’Lone: that’s cool.

@Christian Schmitz: what happens if you use the DoCommand(“CloseWindow”)? I use this daily.

Try

CloseProject(False)

Ah, it works CloseProject(False)

But when you run IDE Communicator tool. Than run the next quickly again, you get always error 103.

the second parameter to the build command is to show in finder or not. defaults to true. make it false and it wont show.

warning: this code is from the head so the syntax is off.

I modified the IDEcommunicator to retry the connection if it got the error 103. Sometimes retrying works. I try 5 times and if none of the 5 tries works, I abort out.

I have had some challenges in the automation process. I am at the point that I do the following in a single “run” of a single code base.

  1. stop Xojo and IDEcomunicator if it is running.
  2. start X/Xojo
  3. wait for 30 seconds to allow Xojo w/ plugins to load.
  4. start IDEcomunicator with a BuildAutomotor script to build the app (all the versions Mac/Win/Lin/Pi - x86/x86_64).
  5. stop Xojo and IDECommnicator
  6. copy the “built” over to a different directory.

using the Build( #,false) command allows you to keep the finder (or explorer on windows or whatever its called on your version of linux) opening a window showing the built application.

if you build on linux, Xojo auto-exits once you close the application code window. Mac Xojo will continue to run although all source code windows are closed. Just something to watch out for. I wasnt expecting that and caught me.

maybe those of us that are trying to work out the automation piece of this should get together and share notes. personally my goal is to get rid of the use of Apple-B (Alt-B? on win) so I never ever build an application on my desktop again. I want the CI/CD system to do it for me.

We should do that. I converted the IDE build process to go.cd in 2015 and since then we’ve automated just about every product build that we do. We actually use a build pipeline when we branch for each release to update the other pipelines. :slight_smile:

name the time/place.

I am using (self hosted) GitLab for the git repo and for the CI/CD process. Using GitLab as the CI/CD makes sense to me as it is tightly coupled to itself and I know the two parts will work well with each other. If it turns out that it doesnt work for CI/CD w/ Xojo, I can change to something else.

automation is awesome isnt? :slight_smile:

My immediate reaction is that we should set aside some time at XDC in Miami next month, but I know that not all interested parties are going to be there. I’ll talk with the powers that be, maybe I can get Paul to host something online. Perhaps we could do both.

The software you use doesn’t matter all that much as the primary features are all the same. I picked this one largely because it was actively maintained and sported an easy to use and understand GUI. My only qualm is that it’s written in Java and requires gobs of RAM to run. Now if I just had time to write my own…

I should also mention that Philippe Casgrain is doing a session at XDC on Friday May 3rd at 10am called Modern Continuous Integration with Xojo. Something else that may be of interest to you as he’s recently updated to IDE Communicator v2.

I was going to talk to you and anyone else that is willing, about this there. We should formalize a meetup at some point for XDC.

this will be a good session and I will be there. hopefully we wont wait til friday to talk CI/CD.

many CI/CD platforms are written in java due to a scaling issue. Java based apps tend to scale on the CPUs/Memory better than many (not all!!) other languages that are common in the OSS world. Hence why Jenkins is written in Java. Puppet moved their serverside from Ruby to Java for scaling reasons. And I agree I wish it was written in another language.

one of the reasons I was willing to try GitLab for CI/CD is that its configuration for doing CI/CD is a yaml file (text file in a specific format). and to add/remove CI/CD feature for a repo you add/remove the yaml file from the git repo. So the ease of use is there.

cant wait til the family reunion, err I mean XDC.

Wooooo I got name-dropped in a conversation! Thanks for the vote of confidence, @scott boss !

Yes, I’ll be at XDC 2019 and I have a talk about talking to the IDE via modern means. It’s a follow-up to my previous talks about how we build Lightspeed Onsite, CI, Unit Tests and stuff.

So it’s really about how we moved from an antiquated set of hacks to the most modern that Xojo has to offer, and the lessons we learned along the way. Spoiler alert: it made out build system better and more reliable.

I’m happy to talk CI/CD anytime, but at the conference might be the best venue at this time.

if you want I can drop you name in random threads here. just here to please. :slight_smile:

I think the first “get together” on this will be at XDC. As its a month out and we are all busy getting ready for that. Maybe a discussion after that for those of us that cant make it to XDC.

see all yall in a month!
–sb