Skip to content

Commit

Permalink
Fix sample and Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kubilus1 committed Aug 3, 2019
1 parent 106ca30 commit 007a60a
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 14 deletions.
44 changes: 37 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,45 @@
FROM ubuntu:18.04
FROM ubuntu:bionic as build

WORKDIR /tmp
ENV DEBIAN_FRONTEND noninteractive

ENV GENDEV /opt/gendev

RUN apt-get update && \
apt-get install -y build-essential wget unzip unrar-free texinfo git openjdk-8-jdk dos2unix && \
apt-get install -y \
build-essential \
wget \
unzip \
unrar-free \
texinfo \
git \
openjdk-8-jdk-headless && \
apt-get clean

# To download gcc 6.3 with wget. We must provide a password with '@' in.
RUN echo ftp_user=anonymous > ~/.wgetrc
RUN echo [email protected] >> ~/.wgetrc
#RUN echo ftp_user=anonymous > ~/.wgetrc
#RUN echo [email protected] >> ~/.wgetrc

#RUN bash -c "git clone https://github.com/kubilus1/gendev.git && cd gendev && make && rm -rf /tmp/*"
WORKDIR /work
COPY tools /work/tools/
COPY Makefile /work/
COPY sgdk /work/sgdk/
COPY toolchain /work/toolchain/
RUN make
RUN make install

FROM ubuntu:bionic
RUN apt-get update && \
apt-get install -y \
openjdk-8-jre-headless \
build-essential \
make && \
apt-get clean

ENV GENDEV /opt/gendev
COPY --from=build /opt/gendev $GENDEV
ENV PATH $GENDEV/bin:$PATH

RUN bash -c "git clone https://github.com/kubilus1/gendev.git && cd gendev && make && rm -rf /tmp/*"
WORKDIR /src

CMD /bin/bash
ENTRYPOINT make -f $GENDEV/sgdk/mkfiles/makefile.gen
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ tools_clean:
sgdk_samples:
cd sgdk && $(MAKE) sample_clean samples

install:
$(GENDEV):
if [ -w /opt ]; then \
mkdir -p $(GENDEV); \
else \
$(SUDO) mkdir -p $@; \
$(SUDO) chown $(ORIG_USER):$(ORIG_USER) $@; \
fi

install: $(GENDEV)
echo "export GENDEV=$(GENDEV)" > ~/.gendev
echo "export PATH=\$$GENDEV/bin:\$$PATH" >> ~/.gendev
#$(SUDO) chmod 777 $@
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ PROJECT STRUCTURE
TOOLCHAIN BUILDING
==================

The toolchain is now setup with Travis-CI for continuous integration. This
The toolchain is now setup with CircleCI for continuous integration. This
should ease porting and allow better validation of incoming patches.

You may decide to build the full toolchain by making sure you have the following
Expand All @@ -66,7 +66,6 @@ package installed:
- curl
- wget
- unzip
- dos2unix

and then:
```
Expand All @@ -75,7 +74,7 @@ $ make
```
... and wait about 45 minutes or so.

The .travis-ci.yml script is a good place to look to see how the individual
The .circleci/config.yml script is a good place to look to see how the individual
build stages are executed.


Expand Down
1 change: 0 additions & 1 deletion sgdk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ prep: $(SGDKDIR)

$(SGDKDIR):
git clone -b '$(SGDKVER)' --single-branch --depth 1 https://github.com/Stephane-D/SGDK.git
#cd $(SGDKDIR) && find . -regextype posix-extended -regex '.*make(lib|file).*' -exec dos2unix {} \;

$(SGDKDIR)/libmd.a: prep
cp -rf ../tools/files/applib/lib $(SGDKDIR)/tools/appack
Expand Down
4 changes: 2 additions & 2 deletions sgdk/files/sgdk_v1.40.diff
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ index f12594d..d240b3f 100644
SRC_C+= $(wildcard $(SRC)/*.c)
SRC_S= $(wildcard *.s)
diff --git a/sample/xgmplayer/src/main.c b/sample/xgmplayer/src/main.c
index 5623e70..5c4e75f 100644
index 5623e70..f23590b 100644
--- a/sample/xgmplayer/src/main.c
+++ b/sample/xgmplayer/src/main.c
@@ -285,7 +285,7 @@ int main()
initBGScroll();

// init Sprite engine
- SPR_initEx(20, 80, 64);
+ SPR_initEx(80, 64);
+ SPR_initEx(0, 0);

// prepare sprites for panning
YMPanSprites[0] = SPR_addSprite(&left_right, 32 + 0, 203, TILE_ATTR(PAL0, TRUE, FALSE, FALSE));
Expand Down

0 comments on commit 007a60a

Please sign in to comment.