Giter Club home page Giter Club logo

autohotkey-build's Introduction

AutoHotkey Builder Action

GitHub Action for building AHK scripts with AHK2Exe.

Continous Integration

Consider supporting this project. You can buy me a cup of tea (I don't drink coffee).

  • Bitcoin: bc1qmr5m0z4p0gzqnfrztamrrpmgkw79725dsqdp03
  • Ethereum: 0xb0627eBDb226b4D972661637091573596c5B3B7a

Attention

This action is designed ONLY for running in Windows Environment. It uses Windows binaries and runs in PowerShell. You have been warned!

By the way, AutoHotkey is also only available on Windows. Why do you want to compile your scripts on other platforms?

Synopsis

This action was inspired by implementation of this GitHub Action from @nekocodeX, so the original idea belongs to him/her. I would be very proud if he/she joined the development of this project too.

This action, unlike the original idea, is intended to be more flexible and more fail-safe. And this action is the only one by these parameters in its niche.

The mechanism of this action can be broken down into four main steps:

  1. Downloading required binaries, such as AutoHotkey, AHK2Exe, UPX (if needed). All these binaries are downloaded from their official repositories.
  2. Unpacking binaries and setup environment for successful build. All related files are located in ./._ahk.
  3. Building you AutoHotkey scripts with this environment.
  4. Cleaning up.

Usage example

Let's suppose that your scripts are in the root of your repository. Then after checkout they will be in the current working directory. Also let's suppose that you want to build in ./build. Lets see how we can deal with it:

name: Build

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Build with AHK v1.1.22.01
        uses: nukdokplex/[email protected]
        with:
          version: v1.1.22.01
          x64: true
          x86: true
          compression: upx
          in: ""
          out: build
          icon: "icons"
      - name: Do domething with builded scripts
        shell: pwsh
        run: |
          ls build

Action input parameters

Parameter name Parameter description Required Defaults to
version The version of AutoHotkey to be used (must be the version from the official AutoHotkey repository, e.g. "v1.1.29.01"). false latest
x64 Specifies whether to compile the 64-bit version. false true
x86 Specifies whether to compile the 32-bit version. false false
x64_suffix Specifies suffix for the 64-bit version out file. false _x64
x86_suffix Specifies suffix for the 32-bit version out file. false _x86
compression Specifies which compression method to use. "none" - do not use compression, "upx" - use UPX compression. There is no MPRESS 'cause it's discontinued. Don't try to use it, it won't work. false none
in Specifies a folder with scripts or a single script to be compiled. If you specify a folder, files with the extensions ".ahk", ".ahk2" will be taken. Recursive search in folder is not present. false Current Working Directory
out Specifies the folder for output files. false build
icon Specifies icons. If you pass a single file, it will apply to all scripts. If you pass a folder, an icon with the same name will be used for each script. For example, the script named test.ahk will use the file test.ico in that folder. false

Thanks for making this possible

Many thanks to @nekocodeX for this great idea!

Github Action robinraju/release-downloader for cool action that got rid of the headache about downloading releases from GitHub.

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.