Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directly upload Mac / Windows executables. #93

Merged
merged 27 commits into from
Oct 9, 2021

Commits on Oct 5, 2021

  1. Add bin task to Gradle.

    This creates a binary in build/KoLmafia/bin/KoLmafia.
    
    This change also adds a pruneBin task which is always run. I tried to
    figure out how to set up inputs / outputs, but jpackage insists on
    creating the output directory itself and will generate an error if
    said directory already exists.
    
    Follow-up changes will involve tinkering with a build matrix and
    looking at the resulting artifacts.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    7689203 View commit details
    Browse the repository at this point in the history
  2. Copy-paste build to run ./gradlew bin.

    I'm not actually sure what the resulting files will look like on
    Windows / Mac, so here's to hoping I can actually see the artifacts
    before trying to publish them.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    08aa16c View commit details
    Browse the repository at this point in the history
  3. Run build for the jpackage branch.

    This will allow for more experimentation without pushing to main.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    13fa65c View commit details
    Browse the repository at this point in the history
  4. List created artifacts.

    Hopefully Mac artifacts end in dmg, and Windows artifacts end in
    exe. But maybe not...
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    1685926 View commit details
    Browse the repository at this point in the history
  5. Inspect parent directory.

    Apparently Mac didn't create build/KoLmafia/bin.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    09c6e49 View commit details
    Browse the repository at this point in the history
  6. Install binaries into dist/.

    Still not seeing the output of Mac builds, although I now see:
    
    - Linux: ${dist}/KoLmafia/bin/KoLmafia
    - Windows: ${dist}/KoLmafia/KoLmafia.exe
    
    Perhaps if I'm lucky, Mac is directly in ${dist}/KoLmafia.dmg?
    
    If I'm unlucky, it won't be present at all. :(
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    16b7a19 View commit details
    Browse the repository at this point in the history
  7. Move files back into build/.

    This caused a nasty bit of infinite recursion. Whoops.
    
    Let's instead move things into build/bin.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    288ec30 View commit details
    Browse the repository at this point in the history
  8. Upload all artifacts, then download them.

    This allows us to get all of the artifacts in one single container so
    we can theoretically publish them all at once later.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    f0d3f9a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d80c89e View commit details
    Browse the repository at this point in the history
  10. Bundle artifacts as zips.

    We actually need everything in the generated directory, not just the
    runner binary.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    dc41fee View commit details
    Browse the repository at this point in the history
  11. M-x untabify

    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    7632aec View commit details
    Browse the repository at this point in the history
  12. Move code into build/releases, stop using wildcard.

    This attempted to save maybe one level of directory nesting, which I
    don't think actually matters in practice.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    9fcaf5c View commit details
    Browse the repository at this point in the history
  13. Stitch everything together.

    This splits the existing daily job into two targets: jar and
    release. `release` in turn depends on both `jar` and `bin`.
    
    'bin' generates files Windows.zip, Linux.zip, and macOS.zip.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    c3d27f4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    17b1c2f View commit details
    Browse the repository at this point in the history
  15. Use jpackage-gradle-plugin instead of exec task.

    It doesn't feel appreciably different, but maybe it's more readable.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    8f440ae View commit details
    Browse the repository at this point in the history
  16. Improve portability of jpackage task.

    Mac creates the directory `build/releases/KoLmafia.app`, whereas Linux
    / Windows create `build/releases/KoLmafia`. jpackage will create all
    prerequisite directories, so it's fine with either deleting the inner
    directory, or its parent.
    heeheehee-kolmafia committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    c78f9a0 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2021

  1. Configuration menu
    Copy the full SHA
    8737dfa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    54a72b3 View commit details
    Browse the repository at this point in the history
  3. Add Windows icon for binary release.

    This uses the existing martini glass that was the KoLmelion icon once
    upon a time.
    heeheehee-kolmafia committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    f33d2c8 View commit details
    Browse the repository at this point in the history
  4. Directly upload Mac, Windows executables.

    Currently, we're generating macOS.zip, Windows.zip which each only
    contain a single file.
    
    This change also cleans up jarbundler / jsmooth utils now that we're
    using + relying on jpackage for creating platform-specific builds.
    
    We also reuse the Windows icon for Linux (and rename it to get rid of
    the legacy KoLmelion name), which is copied into util/linux to preempt
    confusion along the lines of "why are we using this windows/ file in
    the linux build".
    heeheehee-kolmafia committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    16a22f9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3ce4f7f View commit details
    Browse the repository at this point in the history
  6. Merge remote-tracking branch 'origin/jpackage' into jpackage

    # Conflicts:
    #	.github/workflows/build.yml
    #	build.gradle
    BadHorseMonkey committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    dab1b26 View commit details
    Browse the repository at this point in the history
  7. Try to target deb or rpm on Linux if available.

    This detects the existence of commands in the $PATH using the Bash
    `which` command.
    
    This also bumps our required version to Java 11 because I didn't want
    to pollute the build output, or roll my own NullOutputStream.
    heeheehee-kolmafia committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    0b273fb View commit details
    Browse the repository at this point in the history
  8. Add revision info to appName, appVersion.

    This might be redundant, but it seemed okay in Linux.
    
    This change also replaces instances of " with ' for strings that
    didn't use templating.
    heeheehee-kolmafia committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    ae73f15 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2021

  1. Configuration menu
    Copy the full SHA
    3fddcae View commit details
    Browse the repository at this point in the history
  2. This change adds the Windows DirChooser, Shortcut, and useCWDasROOT f…

    …lag and also the Mac switches from pkg to dmg.
    BadHorseMonkey committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    37540e8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    33c6a29 View commit details
    Browse the repository at this point in the history