diff --git a/Dockerfile b/Dockerfile index 86ade9e..487bf90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 ftp_password=dfdf@dfdf.com >> ~/.wgetrc +#RUN echo ftp_user=anonymous > ~/.wgetrc +#RUN echo ftp_password=dfdf@dfdf.com >> ~/.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 diff --git a/Makefile b/Makefile index 51781a9..324be8f 100644 --- a/Makefile +++ b/Makefile @@ -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 $@ diff --git a/README.md b/README.md index d5a7333..df0ee0f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -66,7 +66,6 @@ package installed: - curl - wget - unzip - - dos2unix and then: ``` @@ -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. diff --git a/sgdk/Makefile b/sgdk/Makefile index 0c8563f..233b812 100644 --- a/sgdk/Makefile +++ b/sgdk/Makefile @@ -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 diff --git a/sgdk/files/sgdk_v1.40.diff b/sgdk/files/sgdk_v1.40.diff index 6bf3b59..224d274 100644 --- a/sgdk/files/sgdk_v1.40.diff +++ b/sgdk/files/sgdk_v1.40.diff @@ -12,7 +12,7 @@ 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() @@ -20,7 +20,7 @@ index 5623e70..5c4e75f 100644 // 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));