forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add object creator to releases (CleverRaven#68173)
* Optional code needs to be commented out now * Add object creator to releases * Add object creator sources to astyle * Change object creator source dir Co-authored-by: andrei <[email protected]> * Add the help->about option * Object creator now built in devcontainer Both the windows and linux versions are now built in the devcontainer. The windows version was already built in the devcontainer. I changed the linux version to be built inside the devcontainer too because an error shows up when opening the binary when it was compiled using github actions directly. * Add qt5 libs install to dockerfile * Add QT license file --------- Co-authored-by: andrei <[email protected]>
- Loading branch information
Showing
8 changed files
with
298 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,13 @@ jobs: | |
ext: zip | ||
content: application/zip | ||
sound: 1 | ||
- name: Windows Object Creator x64 | ||
mxe: x86_64 | ||
artifact: windows-objectcreator-x64 | ||
android: none | ||
os: ubuntu-latest | ||
ext: zip | ||
content: application/zip | ||
- name: Linux Tiles x64 | ||
os: ubuntu-20.04 | ||
mxe: none | ||
|
@@ -105,6 +112,13 @@ jobs: | |
artifact: linux-curses-x64 | ||
ext: tar.gz | ||
content: application/gzip | ||
- name: Linux object creator x64 | ||
os: ubuntu-20.04 | ||
mxe: none | ||
android: none | ||
artifact: linux-objectcreator-x64 | ||
ext: tar.gz | ||
content: application/gzip | ||
- name: macOS Curses Universal Binary (x64 and arm64) | ||
os: macos-12 | ||
mxe: none | ||
|
@@ -172,11 +186,11 @@ jobs: | |
run: | | ||
vcpkg integrate install --vcpkg-root '${{ runner.workspace }}\b\vcpkg' | ||
- name: Install dependencies (windows mxe) | ||
if: matrix.mxe != 'none' | ||
if: matrix.mxe != 'none' && matrix.artifact != 'windows-objectcreator-x64' | ||
run: | | ||
sudo apt install gettext | ||
- name: Install MXE | ||
if: matrix.mxe != 'none' | ||
if: matrix.mxe != 'none' && matrix.artifact != 'windows-objectcreator-x64' | ||
run: | | ||
curl -L -o mxe-${{ matrix.mxe }}.tar.xz https://github.com/BrettDong/MXE-GCC/releases/download/mxe-sdl-2-0-20/mxe-${{ matrix.mxe }}.tar.xz | ||
curl -L -o mxe-${{ matrix.mxe }}.tar.xz.sha256 https://github.com/BrettDong/MXE-GCC/releases/download/mxe-sdl-2-0-20/mxe-${{ matrix.mxe }}.tar.xz.sha256 | ||
|
@@ -222,12 +236,47 @@ jobs: | |
run: | | ||
lang/compile_mo.sh all | ||
- name: Build CDDA (linux) | ||
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' | ||
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' && matrix.artifact != 'linux-objectcreator-x64' | ||
run: | | ||
make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist | ||
mv cataclysmdda-0.F.tar.gz cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.tar.gz | ||
- name: Login to GitHub Container Registry | ||
if: matrix.artifact == 'windows-objectcreator-x64' || matrix.artifact == 'linux-objectcreator-x64' | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build object creator (windows) | ||
if: matrix.artifact == 'windows-objectcreator-x64' | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/cleverRaven/cataclysm-dda/cataclysm-dda-devcontainer | ||
cacheFrom: ghcr.io/cleverRaven/cataclysm-dda/cataclysm-dda-devcontainer | ||
push: always | ||
runCmd: | | ||
git config --global --add safe.directory /workspaces/Cataclysm-DDA | ||
make object_creator.exe CROSS="/opt/mxe/usr/bin/x86_64-w64-mingw32.static-" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 PREFIX=output PCH=0 MXE_TARGETS='x86_64-w64-mingw32.static' -j4 | ||
- name: Build object creator (linux) | ||
if: matrix.artifact == 'linux-objectcreator-x64' | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/cleverRaven/cataclysm-dda/cataclysm-dda-devcontainer | ||
cacheFrom: ghcr.io/cleverRaven/cataclysm-dda/cataclysm-dda-devcontainer | ||
push: never | ||
runCmd: | | ||
git config --global --add safe.directory /workspaces/Cataclysm-DDA | ||
make -j$((`nproc`+0)) TILES=1 LINTJSON=0 RELEASE=1 object_creator | ||
- name: zip Object Creator (windows) | ||
if: matrix.artifact == 'windows-objectcreator-x64' | ||
run: | | ||
zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.${{ matrix.ext }} ./object_creator/object_creator.exe ./object_creator/qt-license.txt | ||
- name: tar Object Creator (linux) | ||
if: matrix.artifact == 'linux-objectcreator-x64' | ||
run: | | ||
tar -czf cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.${{ matrix.ext }} ./object_creator/object_creator ./object_creator/qt-license.txt | ||
- name: Build CDDA (windows mxe) | ||
if: matrix.mxe != 'none' | ||
if: matrix.mxe != 'none' && matrix.artifact != 'windows-objectcreator-x64' | ||
env: | ||
PLATFORM: /opt/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static.gcc12- | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,32 @@ The devcontainer was introduced in [#65748](https://github.com/CleverRaven/Catac | |
3. Add Cleverraven as the remote upstream with git remote add upstream [email protected]:CleverRaven/Cataclysm-DDA.git | ||
4. Open the folder where you cloned your repository in Visual Studio Code via the UI or by navigating to the directory in a terminal and typing Code | ||
5. Visual Studio Code will show a pup-up in the bottom right with recommended extentions. Install those. | ||
6. Now restart visual studio code. When prompted, click "Reopen in container": | ||
6. If you don't plan to compile the object creator, open the Dockerfile in the VSCode file browser and scroll down to find this section: | ||
 | ||
|
||
comment out that part so it looks like this: | ||
 | ||
|
||
If you don't plan to cross-compile the game, scroll down to find this section: | ||
|
||
 | ||
|
||
comment out that part (select it and press ctrl+/ in vscode) so it looks like this: | ||
 | ||
|
||
Next, scroll down to find this section: | ||
 | ||
|
||
comment that part out (select it and press ctrl+/ in vscode) so it looks like this: | ||
|
||
 | ||
|
||
|
||
7. Now restart visual studio code. When prompted, click "Reopen in container": | ||
|
||
 | ||
|
||
6.1 Linux only: You may see this message: | ||
7.1 Linux only: You may see this message: | ||
|
||
 | ||
|
||
|
@@ -32,12 +53,12 @@ The devcontainer was introduced in [#65748](https://github.com/CleverRaven/Catac | |
After that, log out of your account and log back in so the permissions are updated. If that doesn't work, reboot your computer. | ||
|
||
|
||
7. Allow the container to build and for VSCode to Reopen. If everything goes well, you will see the container running: | ||
8. Allow the container to build and for VSCode to Reopen. If everything goes well, you will see the container running: | ||
|
||
 | ||
|
||
|
||
8. Select the makefile extension on the bottom left and choose your desired configuration. Press the "Play" button to build the project | ||
9. Select the makefile extension on the bottom left and choose your desired configuration. Press the "Play" button to build the project | ||
|
||
 | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.