Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image & PS2SDK update #188

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/pr-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
container: h4570/tyra
container: h4570/tyra:latest-ps2sdk # TODO remove tag when ready
steps:
- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM ubuntu:20.04
FROM ubuntu:22.04

# Install necessary packages for PS2DEV, VCLPP and VCL.
RUN apt-get update
Expand Down Expand Up @@ -36,7 +36,7 @@ RUN wget https://github.com/h4570/tyra/raw/master/assets/vcl
# ------------------------------------------------------------------------------

# Start from clean image
FROM ubuntu:20.04
FROM ubuntu:22.04

# Set ENV variables
ENV PS2DEV /usr/local/ps2dev
Expand Down
7 changes: 3 additions & 4 deletions Makefile.base
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AS := $(EE_PREFIX)as
CC := $(EE_PREFIX)gcc
CXX := $(EE_PREFIX)g++
STRIP := $(EE_PREFIX)strip
BIN2S := $(PS2SDK)/bin/bin2s
BIN2C := $(PS2SDK)/bin/bin2c
VCL := vcl
VCLPP := vclpp
DVP := dvp-as
Expand Down Expand Up @@ -76,11 +76,10 @@ $(TARGET): $(OBJECTS) $(VCL_OBJECTS) $(VU_OBJECTS_VCL) $(VU_OBJECTS_VSM) $(IRXEM
$(CXX) -T$(PS2DEV)/ps2sdk/ee/startup/linkfile -o $(TARGETDIR)/$(TARGET) $^ -L$(PS2DEV)/ps2sdk/ee/lib -L$(PS2SDK)/ports/lib $(LINKFLAGS) $(LIBDIRS) $(LIB)
$(STRIP) --strip-all $(TARGETDIR)/$(TARGET)

$(BUILDDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(IRXEMBEDDEDEXT)
$(BUILDDIR)/%.$(SRCEXT): $(SRCDIR)/%.$(IRXEMBEDDEDEXT)
@mkdir -p $(dir $@)
@rm -f [email protected]
$(BIN2S) $(shell head -1 $<) [email protected] $(shell sed -n '2p' $<)
$(AS) $(ASFLAGS) [email protected] -o $@
$(BIN2C) $(shell head -1 $<) $@ $(shell sed -n '2p' $<)

$(BUILDDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT)
@mkdir -p $(dir $@)
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
environment:
TERM: xterm-256color
network_mode: host
image: "h4570/tyra"
image: "h4570/tyra:latest-ps2sdk"
tty: true
container_name: tyra-compiler
volumes:
Expand Down
10 changes: 5 additions & 5 deletions engine/inc/file/file_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#pragma once

#include <string>
#include <limits.h>
#include <syslimits.h>

namespace Tyra {

Expand Down Expand Up @@ -43,10 +41,12 @@ class FileUtils {
const char* getElfPath() const { return elfPath; };

private:
static const int MAX_NAME_LEN = 255;

// Argv name+path & just path
char cwd[NAME_MAX];
char elfName[NAME_MAX];
char elfPath[NAME_MAX - 14];
char cwd[MAX_NAME_LEN];
char elfName[MAX_NAME_LEN];
char elfPath[MAX_NAME_LEN - 14];

void setPathInfo(const char* path);
};
Expand Down
1 change: 1 addition & 0 deletions engine/inc/renderer/3d/pipeline/renderer_3d_pipeline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#pragma once

#include "renderer/core/renderer_core.hpp"
#include <functional>

namespace Tyra {

Expand Down
4 changes: 2 additions & 2 deletions engine/src/file/file_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ void FileUtils::setPathInfo(const char* path) {

std::string FileUtils::getCwd() {
std::string result;
char _cwd[NAME_MAX];
char _cwd[MAX_NAME_LEN];
getcwd(_cwd, sizeof(_cwd));
result = _cwd;
return result;
return result + "/";
}

std::string FileUtils::fromCwd(const std::string& relativePath) {
Expand Down
Loading