Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
Pedro-Beirao committed Aug 10, 2021
2 parents a9958d5 + 43e546f commit c30077b
Show file tree
Hide file tree
Showing 5 changed files with 518 additions and 3 deletions.
158 changes: 158 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: Build Packages

on:
push:
paths-ignore:
- 'docs/**'
- '**.md'
- 'appveyor.yml'
- '.travis.yml'
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
- 'appveyor.yml'
- '.travis.yml'

env:
QT_VERSION: 5.15.2
QTCREATOR_VERSION: 4.15.2
SENTRY_VERSION: 0.4.11
TILED_RELEASE: ${{ startsWith(github.ref, 'refs/tags/v') }}
TILED_SNAPSHOT: ${{ !startsWith(github.ref, 'refs/tags/v') }}

jobs:
windows:
name: Windows (${{ matrix.arch }}-bit)
runs-on: windows-latest

strategy:
matrix:
include:
- arch: 32
openssl_arch: x86
- arch: 64
openssl_arch: x64

env:
TILED_: ${{ needs.version.outputs.version }}
QT_TOOLCHAIN: win${{ matrix.arch }}_mingw81
MINGW_VERSION: 8.1.0
MINGW_COMPONENT: win${{ matrix.arch }}_mingw810
OPENSSL_VERSION: 1.1.1

defaults:
run:
shell: bash

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Qt
run: |
echo "QT_PATH=$(./dist/install-qt.sh --version ${QT_VERSION} --toolchain ${QT_TOOLCHAIN} qtbase qtdeclarative qtscript qtsvg qtimageformats qttools qttranslations)" >> $GITHUB_ENV
echo "MINGW_PATH=$(./dist/install-qt.sh --version ${MINGW_VERSION} ${MINGW_COMPONENT})" >> $GITHUB_ENV
echo "OPENSSL_PATH=$(./dist/install-qt.sh --version ${OPENSSL_VERSION} openssl --arch ${{ matrix.openssl_arch }})" >> $GITHUB_ENV
./dist/install-qt.sh --version ${QTCREATOR_VERSION} qtcreator >> $GITHUB_PATH
- name: Setup Qbs
run: |
qbs setup-toolchains ${MINGW_PATH}/*-w64-mingw32-gcc.exe mingw
qbs setup-qt ${QT_PATH}/qmake.exe qt
qbs config defaultProfile qt
- name: Build Zstandard
run: |
export PATH="${MINGW_PATH}:$PATH"
git clone --depth 1 -b master https://github.com/facebook/zstd.git
pushd zstd/lib
CC=gcc mingw32-make -j2 libzstd.a
popd
- name: Build Tiled
run: |
export TILED_MSI_VERSION=1.4.${GITHUB_RUN_NUMBER}
qbs build config:release projects.Tiled.windowsInstaller:true projects.Tiled.enableZstd:true
mv release/installer*/Tiled-*.msi .
- name: Upload Tiled installer
uses: actions/upload-artifact@v2
with:
name: Tiled-win${{ matrix.arch }}.msi
path: Tiled-*.msi

- name: Upload Tiled archive
uses: actions/upload-artifact@v2
with:
name: Tiled-win${{ matrix.arch }}
path: release/install-root/*

github:
name: Upload to GitHub releases
runs-on: ubuntu-latest
needs: [windows]

if: github.repository == 'mapeditor/tiled' && github.event_name == 'push'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Tiled
draft: true
prerelease: false

- name: Download Windows 64-bit installer
id: download-win64-installer
uses: actions/download-artifact@v2
with:
name: Tiled-win64.msi

- name: Download Windows 32-bit installer
id: download-win32-installer
uses: actions/download-artifact@v2
with:
name: Tiled-win32.msi

- name: Download Linux AppImage
id: download-appimage
uses: actions/download-artifact@v2
with:
name: Tiled-x86_64.AppImage

- name: Download macOS app
id: download-app
uses: actions/download-artifact@v2
with:
name: Tiled-macos.app

- name: Upload Windows 64-bit installer
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Tiled-win64.msi
asset_name: Tiled-p-win64.msi
asset_content_type: applictaion/x-msi

- name: Upload Windows 32-bit installer
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Tiled-win32.msi
asset_name: Tiled-p-win32.msi
asset_content_type: applictaion/x-msi

- name: Checkout repository
uses: actions/checkout@v2

- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: releases
version: 1
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dsda-launcher
This is a launcher for the dsda-doom source port

The binaries for an experimental macOS version are available in [**Releases**](https://github.com/Pedro-Beirao/dsda-launcher/releases)
The binaries for an experimental macOS and windows version are available in [**Releases**](https://github.com/Pedro-Beirao/dsda-launcher/releases)

^ This includes the dsda-doom executable. Just open the launcher and you are good to play

Expand All @@ -15,6 +15,6 @@ This app is crossplatform thanks to the Qt framework

**compileMacOS.md** - Instructions for compiling for MacOS

**compileWindows.md** - Instructions for compiling for Windows (Not tested)
**compileWindows.md** - Instructions for compiling for Windows

**compileLinux.md** - Instructions for compiling for Linux (doesnt exist yet lol, but should be similar to MacOS)
4 changes: 4 additions & 0 deletions compileMacOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Your dsda-launcher folder should look like this:
qmake ..
If you installed Qt with the online installer, careful with qmake not being in the path
// qmake "CONFIG+=deploy" ..
// ^ this will add a "lib" folder to the .app bunndle
```
6. Run make
```
Expand Down
1 change: 0 additions & 1 deletion compileWindows.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Intructions for compiling dsda-launcher for Windows

Not tested yet

___

Expand Down
Loading

0 comments on commit c30077b

Please sign in to comment.