mirror of
https://github.com/encounter/cpp3ds.git
synced 2026-03-30 11:04:22 -07:00
Use newer Docker build environment
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
export CC=gcc-6
|
||||
export CXX=g++-6
|
||||
export DEVKITPRO=${HOME}/devkitPro
|
||||
export DEVKITARM=${DEVKITPRO}/devkitARM
|
||||
export PATH=${DEVKITARM}/bin/:${PATH}
|
||||
export CTRULIB=${DEVKITPRO}/libctru
|
||||
export PORTLIBS=${DEVKITPRO}/portlibs/armv6k
|
||||
g++-6 -v
|
||||
# Install devkitARM
|
||||
if [ "$APPVEYOR" = "True" ]; then
|
||||
appveyor DownloadFile http://sourceforge.net/projects/devkitpro/files/devkitARM/devkitARM_r44/devkitARM_r44-win32.exe
|
||||
7z x devkitARM_r44-win32.exe -o$DEVKITPRO
|
||||
else
|
||||
wget https://sourceforge.net/projects/devkitpro/files/devkitARM/devkitARM_r45/devkitARM_r45-x86_64-linux.tar.bz2
|
||||
mkdir $DEVKITPRO
|
||||
tar -xaf devkitARM_r45-x86_64-linux.tar.bz2 -C $DEVKITPRO
|
||||
fi
|
||||
|
||||
# Download portlibs used by cpp3ds
|
||||
wget https://github.com/cpp3ds/3ds_portlibs/releases/download/r1/portlibs-3ds-r1.tar.xz
|
||||
tar -xaf portlibs-3ds-r1.tar.xz
|
||||
ln -s $(pwd)/portlibs $DEVKITPRO/portlibs
|
||||
|
||||
# Download latest 3ds-tools
|
||||
wget https://github.com/cpp3ds/3ds-tools/releases/download/r4/3ds-tools-linux-r4.tar.gz
|
||||
tar -xaf 3ds-tools-linux-r4.tar.gz
|
||||
cp 3ds-tools/* $DEVKITARM/bin
|
||||
|
||||
# Get latest ctrulib
|
||||
git clone https://github.com/smealum/ctrulib.git
|
||||
cd ctrulib/libctru && make -j4 install && cd -
|
||||
|
||||
# Build citro3d
|
||||
git clone https://github.com/fincs/citro3d.git
|
||||
cd citro3d && make -j4 install && cd -
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_RANLIB=/usr/bin/gcc-ranlib-6 -DCMAKE_AR=/usr/bin/gcc-ar-6 -DBUILD_EMULATOR=ON -DENABLE_OGG=ON -DBUILD_EXAMPLES=OFF ..
|
||||
make -j4 cpp3ds-emu VERBOSE=1
|
||||
nm src/emu3ds/CMakeFiles/cpp3ds-emu.dir/Graphics/Texture.cpp.o | c++filt | grep basic_string
|
||||
nm lib/libcpp3ds-emu.a | c++filt | grep saveToFile
|
||||
cd ..
|
||||
mkdir -p $CPP3DS/bin/
|
||||
cp $DEVKITARM/bin/makerom $CPP3DS/bin/
|
||||
cp $DEVKITARM/bin/3dsxtool $CPP3DS/bin/
|
||||
cp $DEVKITARM/bin/bannertool $CPP3DS/bin/
|
||||
cp $DEVKITARM/bin/nihstro-assemble $CPP3DS/bin/
|
||||
cp -r $PORTLIBS/lib/ $CPP3DS
|
||||
cp -r $PORTLIBS/include/ $CPP3DS
|
||||
tar -cJvf $1 cpp3ds
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
mkdir -p cpp3ds/bin/
|
||||
cp $DEVKITARM/bin/makerom cpp3ds/bin/
|
||||
cp $DEVKITARM/bin/3dsxtool cpp3ds/bin/
|
||||
cp $DEVKITARM/bin/bannertool cpp3ds/bin/
|
||||
cp $DEVKITARM/bin/nihstro-assemble cpp3ds/bin/
|
||||
cp -r $PORTLIBS/lib/ cpp3ds/
|
||||
cp -r $PORTLIBS/include/ cpp3ds/
|
||||
cp -r build/lib/ cpp3ds/
|
||||
cp -r include/ cpp3ds/
|
||||
cp -r cmake/ cpp3ds/
|
||||
cp -r scripts/ cpp3ds/
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
export RELEASE_FILENAME=cpp3ds-$TRAVIS_OS_NAME-$TRAVIS_TAG.tar.xz
|
||||
tar -cJvf $RELEASE_FILENAME cpp3ds
|
||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
echo "No OSX support yet"
|
||||
else
|
||||
export RELEASE_FILENAME=cpp3ds-windows-$APPVEYOR_REPO_TAG_NAME.tar.xz
|
||||
7z a $RELEASE_FILENAME cpp3ds
|
||||
fi
|
||||
+6
-21
@@ -4,31 +4,16 @@ os:
|
||||
language: cpp
|
||||
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- ubuntu-sdk-team
|
||||
packages:
|
||||
- gcc-6
|
||||
- g++-6
|
||||
- libvorbis-dev
|
||||
- libglew-dev
|
||||
- qt5-default
|
||||
- libopenal-dev
|
||||
- libgtest-dev
|
||||
- libsfml-dev
|
||||
|
||||
before_install:
|
||||
- source .build-deps.sh
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
- source .build.sh
|
||||
- docker build -t cpp3ds .
|
||||
|
||||
before_deploy:
|
||||
- source .deploy-prepare.sh
|
||||
- export RELEASE_FILENAME=cpp3ds-$TRAVIS_OS_NAME-$TRAVIS_TAG.tar.xz
|
||||
- docker run --rm -v "$PWD":/usr/build -w /opt cpp3ds sh /usr/build/.build.sh /usr/build/$RELEASE_FILENAME
|
||||
- sudo chmod 777 $RELEASE_FILENAME
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
FROM thecruel/devkitarm-3ds:latest
|
||||
MAINTAINER Thomas Edvalson "machin3@gmail.com"
|
||||
|
||||
ENV CPP3DS /opt/cpp3ds
|
||||
|
||||
COPY . /usr/src/cpp3ds
|
||||
WORKDIR /usr/src
|
||||
|
||||
RUN apt-get update && apt-get -y install \
|
||||
libsfml-dev \
|
||||
libglew-dev \
|
||||
qt5-default \
|
||||
libopenal-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
libfreetype6-dev \
|
||||
libvorbis-dev
|
||||
|
||||
RUN apt-get -y clean
|
||||
|
||||
RUN wget -q https://github.com/cpp3ds/3ds_portlibs/releases/download/r3/portlibs-3ds-r3.tar.xz -O portlibs.tar.xz && \
|
||||
tar -xaf portlibs.tar.xz && \
|
||||
rm portlibs.tar.xz && \
|
||||
ln -s $(pwd)/portlibs $DEVKITPRO/portlibs && \
|
||||
ln -s $DEVKITPRO/portlibs/3ds $DEVKITPRO/portlibs/armv6k
|
||||
|
||||
RUN wget -q https://github.com/cpp3ds/3ds-tools/releases/download/r4/3ds-tools-linux-r4.tar.gz -O tools.tar.gz && \
|
||||
tar -xaf tools.tar.gz && \
|
||||
cp 3ds-tools/* $DEVKITARM/bin && \
|
||||
rm tools.tar.gz
|
||||
|
||||
WORKDIR /usr/src/cpp3ds
|
||||
RUN mkdir build && \
|
||||
cd build && \
|
||||
cmake -DBUILD_EMULATOR=ON -DENABLE_OGG=ON -DBUILD_EXAMPLES=OFF .. && \
|
||||
make -j4 && \
|
||||
cd .. && \
|
||||
mkdir $CPP3DS && \
|
||||
cp -r build/lib $CPP3DS && \
|
||||
cp -r include $CPP3DS && \
|
||||
cp -r cmake $CPP3DS && \
|
||||
cp -r scripts $CPP3DS && \
|
||||
cd .. && \
|
||||
rm -r cpp3ds
|
||||
@@ -24,5 +24,5 @@ add_executable(${PROJECT_NAME}-emu ${SOURCE_FILES} ${EMU_SOURCE_FILES})
|
||||
target_link_libraries(${PROJECT_NAME}-emu ${CPP3DS_EMU_LIBS} Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
|
||||
set_target_properties(${PROJECT_NAME}-emu PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${CPP3DS_EMU_FLAGS} -std=c++11")
|
||||
set_target_properties(${PROJECT_NAME}-emu PROPERTIES COMPILE_DEFINITIONS "EMULATION;_GLIBCXX_USE_CXX11_ABI=1")
|
||||
set_target_properties(${PROJECT_NAME}-emu PROPERTIES COMPILE_DEFINITIONS "EMULATION")
|
||||
set_target_properties(${PROJECT_NAME}-emu PROPERTIES LINK_FLAGS "${CMAKE_CXX_FLAGS} ${CPP3DS_EMU_FLAGS} -Wl,--wrap=main")
|
||||
|
||||
@@ -145,7 +145,7 @@ add_library(cpp3ds-emu STATIC
|
||||
${RESOURCE_HEADER}
|
||||
${RESOURCE_OUTPUT}
|
||||
)
|
||||
set_target_properties(cpp3ds-emu PROPERTIES COMPILE_DEFINITIONS "EMULATION;_GLIBCXX_USE_CXX11_ABI=1")
|
||||
set_target_properties(cpp3ds-emu PROPERTIES COMPILE_DEFINITIONS "EMULATION")
|
||||
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${CPP3DS_EMU_FLAGS}")
|
||||
|
||||
add_custom_target(ui ALL DEPENDS ${ui_header})
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include <iostream>
|
||||
#define _GLIBCXX_USE_CXX11_ABI 1
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <cpp3ds/Emulator/Emulator.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user