Skip to content

Commit

Permalink
Update about dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ExplosBlue committed Jul 24, 2023
1 parent 1556bbf commit 5763616
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 15 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/BuildAndRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,27 @@ permissions:
contents: write

jobs:
setup-env:
runs-on: ubuntu-latest
defaults:
run:
shell: bash

outputs:
timestamp: ${{ steps.timestamp.outputs.TIMESTAMP }}
ck-version: ${{ steps.ck-version.outputs.CK_VERSION }}

steps:
- id: timestamp
run: |
echo "TIMESTAMP=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- id: ck-version
run: |
echo "CK_VERSION=Automated-${{ steps.timestamp.outputs.TIMESTAMP }}" >> "$GITHUB_OUTPUT"
build-windows:
runs-on: windows-2019
needs: [setup-env]
defaults:
run:
shell: cmd
Expand Down Expand Up @@ -57,7 +76,7 @@ jobs:
run: |
mkdir build
cd build
qmake -r ${{ env.SOURCE_DIR }}\CoinKiller.pro
qmake -r ${{ env.SOURCE_DIR }}\CoinKiller.pro CK_VERSION=${{ needs.setup-env.outputs.ck-version }}
${{ runner.temp }}\jom\jom
- name: Deploy
Expand All @@ -79,6 +98,7 @@ jobs:

build-macos:
runs-on: macos-latest
needs: [setup-env]
defaults:
run:
shell: bash
Expand Down Expand Up @@ -109,7 +129,7 @@ jobs:
run: |
mkdir build
cd build
qmake -r ${{ env.SOURCE_DIR }}/CoinKiller.pro QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"
qmake -r ${{ env.SOURCE_DIR }}/CoinKiller.pro QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" CK_VERSION=${{ needs.setup-env.outputs.ck-version }}
make -j1
- name: Deploy
Expand All @@ -126,6 +146,7 @@ jobs:

build-linux:
runs-on: ubuntu-latest
needs: [setup-env]
defaults:
run:
shell: bash
Expand All @@ -152,7 +173,7 @@ jobs:
run: |
mkdir build
cd build
qmake -r ${{ env.SOURCE_DIR }}/CoinKiller.pro
qmake -r ${{ env.SOURCE_DIR }}/CoinKiller.pro CK_VERSION=${{ needs.setup-env.outputs.ck-version }}
make -j$(nproc)
make install INSTALL_ROOT=AppDir
Expand All @@ -173,7 +194,7 @@ jobs:

create-release:
runs-on: ubuntu-latest
needs: [build-windows, build-macos, build-linux]
needs: [setup-env, build-windows, build-macos, build-linux]
defaults:
run:
shell: bash
Expand All @@ -197,26 +218,22 @@ jobs:
name: CoinKiller-Linux
path: ${{ runner.temp }}/CoinKiller-Linux

- name: Create timestamp
run: |
echo "TIMESTAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Zip artifact
working-directory: ${{ runner.temp }}
run: |
7z a CoinKiller-Windows-x86_64-${{ env.TIMESTAMP }}.zip ${{ runner.temp }}/CoinKiller-Windows/* -r
7z a CoinKiller-Windows-x86_64-${{ needs.setup-env.outputs.timestamp }}.zip ${{ runner.temp }}/CoinKiller-Windows/* -r
- name: Rename output Files
run: |
mv ${{ runner.temp }}/CoinKiller-Macos/CoinKiller.dmg ${{ runner.temp }}/CoinKiller-Macos/CoinKiller-MacOS-Universal-${{ env.TIMESTAMP }}.dmg
mv ${{ runner.temp }}/CoinKiller-Linux/CoinKiller-x86_64.AppImage ${{ runner.temp }}/CoinKiller-Linux/CoinKiller-Linux-x86_64-${{ env.TIMESTAMP }}.AppImage
mv ${{ runner.temp }}/CoinKiller-Macos/CoinKiller.dmg ${{ runner.temp }}/CoinKiller-Macos/CoinKiller-MacOS-Universal-${{ needs.setup-env.outputs.timestamp }}.dmg
mv ${{ runner.temp }}/CoinKiller-Linux/CoinKiller-x86_64.AppImage ${{ runner.temp }}/CoinKiller-Linux/CoinKiller-Linux-x86_64-${{ needs.setup-env.outputs.timestamp }}.AppImage
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: Automated-${{ env.TIMESTAMP }}
tag_name: Automated-${{ needs.setup-env.outputs.timestamp }}
generate_release_notes: true
body: Automated release created on ${{ env.TIMESTAMP }}
body: Automated release created on ${{ needs.setup-env.outputs.timestamp }}
files: |
${{ runner.temp }}/*.zip
${{ runner.temp }}/CoinKiller-Macos/*.dmg
Expand Down
6 changes: 6 additions & 0 deletions CoinKiller.pro
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ linux-g++ {
INSTALLS += target
}

isEmpty(CK_VERSION) {
CK_VERSION = Unknown
}

DEFINES += CK_VERSION=\\\"$$CK_VERSION\\\"

SOURCES += main.cpp\
eventeditorwidget.cpp \
mainwindow.cpp \
Expand Down
16 changes: 14 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,20 @@ void MainWindow::setGameLoaded(bool loaded)

void MainWindow::on_actionAbout_triggered()
{
QMessageBox::information(this, tr("About CoinKiller"),
tr("CoinKiller v1.0 -- by StapleButter, RicBent and Explos\n\nhttp://kuribo64.net/\n\nDefault Icons by Icons8\n\nThis is free software, if you paid for it, you got scammed"));
QMessageBox msgBox;
msgBox.setTextFormat(Qt::MarkdownText);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setWindowTitle(tr("About CoinKiller"));
msgBox.setText(tr("# CoinKiller\n\n"
"Version: %1\n\n"
"Github: https://github.com/Arisotura/CoinKiller\n\n"
"## Credits\n"
"StapleButter, RicBent and Explos\n\n"
"Icons from [Icons8](https://icons8.com/)\n\n"
"CoinKiller is free software: "
"you can redistribute it and/or modify it under the terms of the GNU General Public License "
"as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.").arg(CK_VERSION));
msgBox.exec();
}

void MainWindow::loadGame(const QString& path)
Expand Down

0 comments on commit 5763616

Please sign in to comment.