mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-24 20:34:59 +00:00
204 lines
7.2 KiB
YAML
204 lines
7.2 KiB
YAML
name: MultiMC5-Develop
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
- CI
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- develop
|
|
- stable
|
|
- CI
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest]
|
|
|
|
steps:
|
|
- name: Context
|
|
env:
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
run: echo "$GITHUB_CONTEXT"
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Checkout submodules
|
|
run: git submodule update --init
|
|
|
|
- name: Creates QtAccount File
|
|
uses: DamianReeves/write-file-action@v1.0
|
|
if: steps.qt-cached.outputs.cache-hit != 'true'
|
|
with:
|
|
# The path to the file to write
|
|
path: "C:\\Users\\runneradmin\\AppData\\Roaming\\Qt\\qtaccount.ini"
|
|
# The contents of the file
|
|
contents: ${{ secrets.QTACCOUNT }}
|
|
|
|
- name: Cache Qt Installed
|
|
uses: actions/cache@v2.1.5
|
|
id: qt-cached
|
|
with:
|
|
# A list of files, directories, and wildcard patterns to cache and restore
|
|
path: "D:/Qt"
|
|
# An explicit key for restoring and saving the cache
|
|
key: ${{ runner.os }}-qt56-installed-d
|
|
|
|
- name: Cache Qt Installer
|
|
uses: actions/cache@v2.1.5
|
|
if: steps.qt-cached.outputs.cache-hit != 'true'
|
|
id: installer-cached
|
|
with:
|
|
# A list of files, directories, and wildcard patterns to cache and restore
|
|
path: "installer.exe"
|
|
# An explicit key for restoring and saving the cache
|
|
key: ${{ runner.os }}-qt56-installer
|
|
|
|
- name: Download Qt Installer
|
|
if: steps.installer-cached.outputs.cache-hit != 'true' && steps.qt-cached.outputs.cache-hit != 'true'
|
|
run: |
|
|
curl https://download.qt.io/new_archive/qt/5.6/5.6.3/qt-opensource-windows-x86-mingw492-5.6.3.exe --output installer.exe
|
|
|
|
- name: Download Qt non-Interactive Script
|
|
if: steps.qt-cached.outputs.cache-hit != 'true'
|
|
run: |
|
|
curl https://gist.githubusercontent.com/PibePlayer/cf6bd0a9f7e4d51e3e618ceedfba4b94/raw/09cb1415952b914f1567ce935d4618c396aec340/qt-installer-noninteractive.qs --output nonInteractive.qs
|
|
|
|
- name: Install Qt 5.6.3
|
|
if: steps.qt-cached.outputs.cache-hit != 'true'
|
|
shell: cmd
|
|
run: |
|
|
installer.exe -v --script nonInteractive.qs --silent
|
|
|
|
- name: Setup CMake
|
|
#uses: jwlawson/actions-setup-cmake@v1.9
|
|
#with:
|
|
#use-32bit: 'true'
|
|
|
|
run: |
|
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2-windows-i386.zip -o cmake.zip
|
|
unzip cmake.zip
|
|
dir cmake-3.20.2-windows-i386/bin
|
|
|
|
- name: Setup JDK
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'zulu' # See 'Supported distributions' for available options
|
|
java-version: '8'
|
|
architecture: x86
|
|
|
|
- name: Setup zlib
|
|
run: |
|
|
mkdir zlib
|
|
cd zlib
|
|
curl -L https://downloads.sourceforge.net/project/gnuwin32/zlib/1.2.3/zlib-1.2.3-bin.zip -o zlib.zip
|
|
curl -L https://downloads.sourceforge.net/project/gnuwin32/zlib/1.2.3/zlib-1.2.3-lib.zip -o zliblibs.zip
|
|
unzip zlib.zip
|
|
unzip zliblibs.zip
|
|
cd ..
|
|
pwd
|
|
|
|
- name: Setup OpenSSL
|
|
run: |
|
|
mkdir OpenSSL
|
|
cd OpenSSL
|
|
curl -L https://github.com/IndySockets/OpenSSL-Binaries/raw/master/Archive/openssl-1.0.2g-i386-win32.zip -o OpenSSL.zip
|
|
unzip OpenSSL.zip
|
|
cd ..
|
|
pwd
|
|
|
|
- name: Setup PATH
|
|
shell: cmd
|
|
run: |
|
|
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:/Qt/Tools/mingw492_32\bin;
|
|
set PATH=%CD%\zlib;%CD%\zlib\bin;%PATH%
|
|
set PATH=%CD%\OpenSSL;%PATH%
|
|
REM set PATH=%CD%\cmake-3.20.2-windows-i386\bin;%PATH%
|
|
set PATH=C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.292-10\x86\bin;%PATH%
|
|
java -version
|
|
cmake --version
|
|
openssl version
|
|
|
|
#- name: build cache
|
|
# uses: actions/cache@v2.1.5
|
|
# id: build-cached
|
|
# with:
|
|
# A list of files, directories, and wildcard patterns to cache and restore
|
|
# path: "D:/a/MultiMC5-Cracked/MultiMC5-Cracked/build"
|
|
# An explicit key for restoring and saving the cache
|
|
# key: ${{ runner.os }}-MultiMC-build
|
|
|
|
- name: build
|
|
shell: cmd
|
|
if: steps.build-cached.outputs.cache-hit != 'true'
|
|
run: |
|
|
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:/Qt/Tools/mingw492_32\bin;
|
|
set PATH=%CD%\zlib;%CD%\zlib\bin;%CD%\zlib\lib;%CD%\zlib\include;%PATH%
|
|
set PATH=%CD%\OpenSSL;%PATH%
|
|
set PATH=C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.292-10\x86\bin;%PATH%
|
|
set PATH=%CD%\cmake-3.20.2-windows-i386\bin;%PATH%
|
|
echo %PATH%
|
|
set CC=D:\Qt\Tools\mingw492_32\bin\gcc.exe
|
|
set CXX=D:\Qt\Tools\mingw492_32\bin\g++.exe
|
|
mkdir build
|
|
cd build
|
|
copy D:/Qt/Tools/mingw492_32\bin\mingw32-make.exe D:/Qt/Tools/mingw492_32\bin\make.exe
|
|
cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:/MultiMC-Cracked ..\
|
|
|
|
- name: make
|
|
shell: cmd
|
|
run: |
|
|
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:/Qt/Tools/mingw492_32\bin;
|
|
set PATH=%CD%\zlib;%CD%\zlib\bin;%PATH%
|
|
set PATH=%CD%\OpenSSL;%PATH%
|
|
set PATH=C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.292-10\x86\bin;%PATH%
|
|
set PATH=%CD%\cmake-3.20.2-windows-i386\bin;%PATH%
|
|
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;%PATH%
|
|
cd build && dir && mingw32-make -j12
|
|
|
|
- name: install
|
|
shell: cmd
|
|
run: |
|
|
cd build
|
|
mingw32-make install -j4
|
|
|
|
- name: delete x64 dlls
|
|
shell: cmd
|
|
run: |
|
|
del D:/MultiMC-Cracked/api-ms-win-crt-convert-l1-1-0.dll
|
|
del D:/MultiMC-Cracked/api-ms-win-crt-heap-l1-1-0.dll
|
|
del D:/MultiMC-Cracked/api-ms-win-crt-runtime-l1-1-0.dll
|
|
del D:/MultiMC-Cracked/api-ms-win-crt-stdio-l1-1-0.dll
|
|
del D:/MultiMC-Cracked/api-ms-win-crt-string-l1-1-0.dll
|
|
del D:/MultiMC-Cracked/VCRUNTIME140.dll
|
|
REM del D:/MultiMC-Cracked/libssp-0.dll
|
|
del D:/MultiMC-Cracked/zlib1.dll
|
|
|
|
- name: Copy missing dlls to install dir
|
|
shell: cmd
|
|
run: |
|
|
cp OpenSSL/ssleay32.dll D:/MultiMC-Cracked/ssleay32.dll
|
|
cp OpenSSL/libeay32.dll D:/MultiMC-Cracked/libeay32.dll
|
|
cp zlib/bin/zlib1.dll D:/MultiMC-Cracked/zlib1.dll
|
|
|
|
- name: Generate build number
|
|
id: buildnumber
|
|
uses: einaregilsson/build-number@v3
|
|
with:
|
|
token: ${{secrets.github_token}}
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v2.2.3
|
|
with:
|
|
# Artifact name
|
|
name: MultiMC5-Cracked-Portable-win32-${{ steps.buildnumber.outputs.build_number }}
|
|
# A file, directory or wildcard pattern that describes what to upload
|
|
path: "D:/MultiMC-Cracked"
|