Skip to content
Open

V015 #134

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 197 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
name: Create Release

on: push

jobs:
# Maybe this should go after the successful build :P
create-release:
name: Create Release Job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}-testing
draft: true
prerelease: true
# Workaround to preserve the release_url generated above for our next job
- name: Store Release URL
env:
UPLOAD_URL: ${{ toJson( steps.create_release.outputs.upload_url )}}
run: |
echo "$UPLOAD_URL" > release_url.txt
echo "UPLOAD_URL= $UPLOAD_URL"
- name: Upload URL for later use
uses: actions/upload-artifact@v1
with:
name: data
path: release_url.txt

build-and-upload:
name: Build
needs: create-release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest ]
# not working
#os: [ windows-latest ]
steps:
- name: Download Release Data
uses: actions/download-artifact@v1
with:
name: data
- name: Set Release Data in Outputs
id: release_data
shell: bash
run: |
URL=`cat data/release_url.txt | tr -d '"'`
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
echo ::set-output name=URL::$URL
echo "SOURCE_TAG::${GITHUB_REF#refs/tags/}"
echo "URL::$URL"
- uses: actions/checkout@v1
- uses: ilammy/msvc-dev-cmd@v1

- name: Prep MacOSX
if: matrix.os == 'macos-latest'
shell: bash
run: |
export MACOSX_DEPLOYMENT_TARGET=10.14
# see: https://gist.github.com/fabianfett/fd811d7921eb856bb100c5c15565077f
#sudo xcode-select -s /Applications/Xcode_11.app/Contents/Developer
xcode-select -p
brew update

# BREW PACKAGES - Note we only seem to need to get the ones we link against for Mojave
# dylibbundler--0.4.5.mojave.bottle.1.tar.gz
# sdl2--2.0.10.mojave.bottle.1.tar.gz <--
# freetype--2.10.1.mojave.bottle.1.tar.gz <--
# sdl2_image--2.0.5.mojave.bottle.1.tar.gz <--
# pkg-config--0.29.2.mojave.bottle.tar.gz

brew install dylibbundler
brew install pkg-config

curl -L https://bintray.com/homebrew/bottles/download_file?file_path=sdl2-2.0.10.mojave.bottle.tar.gz -o sdl2-2.0.10.mojave.bottle.tar.gz
brew install -f sdl2-2.0.10.mojave.bottle.tar.gz
curl -L https://bintray.com/homebrew/bottles/download_file?file_path=sdl2_image-2.0.5.mojave.bottle.tar.gz -o sdl2_image-2.0.5.mojave.bottle.tar.gz
brew install -f sdl2_image-2.0.5.mojave.bottle.tar.gz
#curl -L https://bintray.com/homebrew/bottles/download_file?file_path=freetype-2.10.1.mojave.bottle.tar.gz -o freetype-2.10.1.mojave.bottle.tar.gz
#brew install -f freetype-2.10.1.mojave.bottle.tar.gz

# - name: Prep windows
# if: matrix.os == 'windows-latest'
# shell: bash
# run: |
# pacman -S re2c mingw-w64-i686-cmake mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_image mingw-w64-i686-freetype

- name: Prep Ubuntu
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
sudo apt-get -y update
#sudo apt-get -y upgrade
sudo apt-get -y install libpcap0.8-dev libfreetype6-dev libsdl2-dev libsdl2-image-dev

- name: Build windows
if: matrix.os == 'windows-latest'
run: |
mkdir build
cd build
cmake ..
dir
msbuild ALL_BUILD.vcxproj

- name: Build MacOS/Ubuntu
if: matrix.os != 'windows-latest'
shell: bash
run: |
echo "${{ matrix.os }} BUILD"
mkdir build ; cd build
cmake ..
make
pwd ; ls -al

# - name: Package NonWindows
# if: matrix.os != 'windows-latest'
# run: |
# zip --junk-paths merlin32.zip Source/merlin32 README.md
- name: Set VERSION
id: version
run: |
VERSION=`cat build/src/version.txt`
echo ::set-output name=VERSION::$VERSION
echo "VERSION::$VERSION"

- name: Package MacOS
if: matrix.os == 'macos-latest'
run: cd build ; sh ../scripts/package-osx.sh

- name: Package Ubuntu
if: matrix.os == 'ubuntu-latest'
env:
PACKAGE_NAME: gsplus-ubuntu
run: |
mkdir -p $PACKAGE_NAME
mkdir -p $PACKAGE_NAME/doc
cp build/src/GSplus $PACKAGE_NAME/gsplus
cp build/src/to_pro $PACKAGE_NAME/to_pro
cp src/assets/config.txt $PACKAGE_NAME
cp LICENSE.txt $PACKAGE_NAME/doc/
cp doc/gsplusmanual.pdf $PACKAGE_NAME/doc/
cp doc/README.txt $PACKAGE_NAME/doc/
tar -cvjf $PACKAGE_NAME.tar.bz2 $PACKAGE_NAME

- name: Package .deb
if: matrix.os == 'ubuntu-latest'
env:
PACKAGE_NAME: gsplus_${{ steps.version.outputs.VERSION }}-0
run: |
#PACKAGE_NAME: gsplus_$VERSION-0
mkdir -p $PACKAGE_NAME/usr/local/bin
mkdir -p $PACKAGE_NAME/DEBIAN
cp build/src/GSplus $PACKAGE_NAME/usr/local/bin/gsplus
cp build/src/assets/control $PACKAGE_NAME/DEBIAN
dpkg-deb --build $PACKAGE_NAME
ls -al
pwd

- name: Upload Release Asset MacOSX
if: matrix.os == 'macos-latest'
#id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_data.outputs.URL }}
asset_path: ./build/GSplus-Install.dmg
asset_name: ${{ format('gsplus-macos-{0}.dmg', steps.version.outputs.VERSION ) }}
asset_content_type: application/x-apple-diskimage

- name: Upload Release Asset Ubuntu
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_data.outputs.URL }}
asset_path: ./gsplus-ubuntu.tar.bz2
asset_name: ${{ format('gsplus-ubuntu-{0}.tar.bz2', steps.version.outputs.VERSION ) }}
asset_content_type: application/x-bzip2

- name: Upload Release Asset .deb
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_data.outputs.URL }}
asset_path: ${{ format('./gsplus_{0}-0.deb', steps.version.outputs.VERSION ) }}
asset_name: ${{ format('gsplus_{0}-0.deb', steps.version.outputs.VERSION ) }}
asset_content_type: application/vnd.debian.binary-package
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ images/
screens/

# build tools that are often kept/tested locally as well as on the ci machines
build/
yoursway-create-dmg/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cmake/sdl2"]
path = cmake/sdl2
url = https://gitlab.com/aminosbh/sdl2-cmake-modules.git
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.10)

# set the project name and version
project(gsplus VERSION 0.15)

add_subdirectory(src)



2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
Copyright (C) 2016 - 2018 Dagen Brock
Copyright (C) 2016 - 2020 Dagen Brock
Copyright (C) 2010 - 2014 GSport contributors
Copyright (C) 2003 Kent Dickey

Expand Down
33 changes: 0 additions & 33 deletions assets/Info.plist

This file was deleted.

1 change: 1 addition & 0 deletions cmake/sdl2
Submodule sdl2 added at ad006a
4 changes: 4 additions & 0 deletions doc/Developer-QuickStart-MacOSX.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ git clone git@github.com:digarok/gsplus.git
cd gsplus/src
ln -s vars_osx_sdl2 vars
make clean ; make


# Packaging
brew install dylibbundler
20 changes: 0 additions & 20 deletions make_dist_mac.sh

This file was deleted.

21 changes: 0 additions & 21 deletions make_dmg_mac.sh

This file was deleted.

49 changes: 49 additions & 0 deletions scripts/package-osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/sh
# run me from `build` subdirectory

# Create package directory and put any remaining files in place
PDIR=package-osx
rm -rf $PDIR #start empty
mkdir $PDIR
cp -r ../build/src/GSplus.app $PDIR

DDIR=$PDIR/GSplus.app

mkdir -p $PDIR/license
cp ../LICENSE.txt $PDIR/license
cp ../COPYRIGHT.txt $PDIR/license
cp ../doc/gsplusmanual.pdf $PDIR
cp ../doc/README.txt $PDIR

# Bundle dynamic libraries
dylibbundler -od -b -x $DDIR/Contents/MacOS/gsplus -d $DDIR/Contents/libs/





# taken out DMG CI/CD for now as it requires keychain/UI interaction :(
#exit

# Make DMG
git clone https://github.com/digarok/create-dmg.git
cd create-dmg

test -f GSplus-Install.dmg && rm GSplus-Install.dmg
./create-dmg \
--volname "GSplus" \
--volicon "../../assets/gsp-dmg-icons.icns" \
--background "../../assets/gsback.png" \
--window-pos 200 120 \
--window-size 710 600 \
--icon-size 64 \
--icon GSplus.app 250 210 \
--hide-extension GSplus.app \
--app-drop-link 440 210 \
--icon README.txt 225 350 \
--icon gsplusmanual.pdf 350 350 \
--icon license 470 350 \
--skip-jenkins \
GSplus-Install.dmg \
../package-osx/
mv GSplus-Install.dmg ..
Loading