Jump to content
rcmaehl

Setting up CI for autoit scripts?

Recommended Posts

Hi all,

I'm attempting to setup CI on github for several of my projects. I've encountered a few issues I've been able to solve (namely tools exiting before they're complete), but my current issue is that I can't seem to get #AutoIt3Wrapper headers to be parsed. Unlike AU3Check and Aut2exe, using the same parameters SciTE shows being used does not seem to work. I'm wondering if I'm doing something wrong? Any advice on the matter is appreciated, and my CI yml is below.

name: lili

on: 
 push:
   paths-ignore:
     - '.github/**'
     - '!.github/workflows/**'
     - '*.md'

jobs:
  build:

    runs-on: windows-latest
    steps:
    - name: Install Autoit
      run: |
           Invoke-WebRequest -Uri https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe -OutFile autoit-v3-setup.exe
           ./autoit-v3-setup.exe /S
    - name: Checkout repo
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           git clone https://github.com/rcmaehl/LinuxLiveUSBCreator
           cd LinuxLiveUSBCreator
           Move-Item * ..
    - name: Install Autoit Code Stripper
      run: |
           Invoke-WebRequest -Uri https://www.autoitscript.com/autoit3/scite/download/Au3Stripper.zip -OutFile Au3Stripper.zip
           Expand-Archive -Force .\Au3Stripper.zip C:\"Program Files (x86)"\AutoIt3\Aut2Exe\
    - name: Wrap Code
      run: |
           cd C:\"Program Files (x86)"\AutoIt3
           ./AutoIt3.exe "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "C:\Program Files (x86)\AutoIt3\Aut2Exe\sources\LiLi\LiLi USB Creator.au3"
           Start-Sleep -s 10
    - name: Compile
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           cd LinuxLiveUSBCreator
           $ver= git rev-list --count HEAD
           cd ..
           mkdir build
           ./Aut2exe.exe /in "sources\LiLi\LiLi USB Creator.au3" /out build\LiLiUSBCreator-2.10alpha$ver.exe /nopack /icon tools\img\lili.ico /comp 4 /x64
           Start-Sleep -s 10
           Move-Item tools build
    - name: Upload
      uses: actions/upload-artifact@v2
      with:
       name: LinuxLiveUSBCreator
       path: C:\Program Files (x86)\AutoIt3\Aut2Exe\build
       if-no-files-found: error

TIA!


My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Share this post


Link to post
Share on other sites
Posted (edited)
1 minute ago, TheDcoder said:

Cool, GitHub now has Windows VMs for CI?

Yep

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Share this post


Link to post
Share on other sites

Very nice. Sorry for going a bit off-topic, another interesting thing is that LiveLinuxUSB is the reason why I discovered AutoIt, I have no idea where I would be now if it weren't for it :wacko:

Thanks for forking the project and improving it :)

As for your actual question, tagging @Jos so that he can advice you on AutoIt3Wrapper.


EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Share this post


Link to post
Share on other sites
Just now, TheDcoder said:

Very nice. Sorry for going a bit off-topic, another interesting thing is that LiveLinuxUSB is the reason why I discovered AutoIt, I have no idea where I would be now if it weren't for it :wacko:

Thanks for forking the project and improving it :)

As for your actual question, tagging @Jos so that he can advice you on AutoIt3Wrapper.

Yeah I remember using LiLi wayyyyy back in the day because it was really easy persistent storage. Sad to see the original dev got busy, but it's understandable. Regardless, some of the original translators saw the thread on r/Linux so hopefully I'll have a 2.10 with updated translations out within a month or so. The original dev's coding style is quite a bit different than how I would code and I'm still getting used to it.


My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Share this post


Link to post
Share on other sites
23 minutes ago, rcmaehl said:

Yeah I remember using LiLi wayyyyy back in the day because it was really easy persistent storage.

That's cool, I never used that feature personally... I was just trying out various Linux distros.

1 hour ago, rcmaehl said:

The original dev's coding style is quite a bit different than how I would code and I'm still getting used to it.

Yeah, he also doesn't use the usual Hungarian notation to denote the type of the variable :tv_horror:


EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Share this post


Link to post
Share on other sites
Posted (edited)
4 hours ago, rcmaehl said:

I can't seem to get #AutoIt3Wrapper headers to be parsed. Unlike AU3Check and Aut2exe, using the same parameters SciTE shows being used does not seem to work.

Not sure I understand the question as I only see the input (CI)  which I guess I can interpret, but have no idea what you mean with "headers to be parsed". 
Could you explain please and maybe add the log of "what you do see" ?

... and arn't you missing the download for AutoIt3Wrapper from that Script?  (Maybe you could start explaining what that CI exactly should accomplish for this noob when it comes to Github CI's) 

Jos 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Posted (edited)
5 hours ago, Jos said:

... and arn't you missing the download for AutoIt3Wrapper from that Script?  (Maybe you could start explaining what that CI exactly should accomplish for this noob when it comes to Github CI's) 

Jos 

I'm not seeing in under https://www.autoitscript.com/site/autoit/downloads/ or https://www.autoitscript.com/site/autoit-script-editor/downloads/ so I thought it came by default. I must have installed it a while ago on my own system without realizing. Let me see if I can add that

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Share this post


Link to post
Share on other sites
5 hours ago, Jos said:

(Maybe you could start explaining what that CI exactly should accomplish for this noob when it comes to Github CI's) 

It's just basically a task which is done for each commit/revision to the code, people use it to run syntax checks, build errors etc. These checks are ran in a VM in the cloud, GitHub provides this feature for free (for public repositories).

10 minutes ago, rcmaehl said:

I'm not seeing

It's included in the full version of the SciTE4AutoIt3 editor I think :)


EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Share this post


Link to post
Share on other sites
Posted (edited)

I was able to get it to work. I didn't realize running the wrapper actually compiled the script instead of having to manually run Aut2Exe. I'll post my new CI yml in case anyone else ever experiences this issue (Yes, the sleeps ARE needed).

name: lili

on: 
 push:
   paths-ignore:
     - '.github/**'
     - '!.github/workflows/**'
     - '*.md'

jobs:
  build:

    runs-on: windows-latest
    steps:
    - name: Install Autoit
      run: |
           Invoke-WebRequest -Uri https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe -OutFile autoit-v3-setup.exe
           ./autoit-v3-setup.exe /S
           Start-Sleep -s 10
    - name: Checkout repo
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           git clone https://github.com/rcmaehl/LinuxLiveUSBCreator
    - name: Install Full Editor tools
      run: |
           Invoke-WebRequest -Uri https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe -OutFile SciTE4AutoIt3.exe
           ./SciTE4AutoIt3.exe /S
           Start-Sleep -s 10 
    - name: Wrap Code
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe\LinuxLiveUSBCreator\sources\LiLi\
           ../../../../AutoIt3.exe "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "C:\Program Files (x86)\AutoIt3\Aut2Exe\LinuxLiveUSBCreator\sources\LiLi\LiLi USB Creator.au3"
           Start-Sleep -s 10
    - name: Rename and Aggregate Files
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           mkdir build
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe\LinuxLiveUSBCreator
           $ver= git rev-list --count HEAD
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe\LinuxLiveUSBCreator\Sources\LiLi
           Move-Item "LiLi USB Creator.exe" C:\"Program Files (x86)"\AutoIt3\Aut2Exe\build
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           Move-Item LinuxLiveUSBCreator\tools build
           cd build
           Rename-Item -Path "LiLi USB Creator.exe" -NewName LiLiUSBCreator-2.10alpha$ver.exe
    - name: Upload
      uses: actions/upload-artifact@v2
      with:
       name: LinuxLiveUSBCreator
       path: C:\Program Files (x86)\AutoIt3\Aut2Exe\build
       if-no-files-found: error

 

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Share this post


Link to post
Share on other sites

Hello, I'm the guy who made initial CI and I think using chocolatey to install autoit3 could be better, would look much cleaner. Has anyone here worked with autoit3 installing from chocolatey?

I don't use Windows so every change that was needed to do was (almost) a blind guess and I'm honestly surprised that it works (more or less). Rcmaehl has been a big help with his Windows expertise (and it's his project after all).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...