Skip to content

Commit

Permalink
[Build] Fix the Dockerfile (DS-Homebrew#412)
Browse files Browse the repository at this point in the history
* Build: Fix docker build and gl2d linking

* Use older devkitarm base

* add back libnds.7z

* use prebuilt tar

* Update PR Template to say provided dkp
  • Loading branch information
chyyran authored and RocketRobz committed Feb 16, 2019
1 parent 78eeb3d commit 16a08dc
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ _Tell us where have you tested it._

***
#### Pull Request status
- [ ] This PR has been tested using latest devkitPro, devkitARM, and EasyGL2D.
- [ ] This PR has been tested using the provided devkitPro, devkitARM, and EasyGL2D.

_(Do not edit after this point)_
- [ ] This PR is fully documented.
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ Building this app by yourself requires devkitPRO with devkitARM and [RocketRobz

TWiLight Menu++ comes included with a Docker image for easy building without having to manually set up the required version of devkitARM.

## Building with Docker for Windows users.
You can compile TWiLight Menu++ with Docker using the provided PowerShell (`.ps1`) scripts. First, install Docker at http://docker.com or through your package manager of choice.

You can compile TWiLight Menu++ with Docker using the provided PowerShell (`.ps1`) scripts. First, install docker at http://docker.com, and [configured Shared Drives](https://blogs.msdn.microsoft.com/stevelasker/2016/06/14/configuring-docker-for-windows-volumes/) for the drive where TWiLight Menu++ is cloned.

Then run `compile_docker.ps1` in a PowerShell window. The script accepts `make` arguments as well, for example `.\compile_docker.ps1 clean`. Note that Docker compilation is not compatible with native Windows compilation. You should run `.\compile_docker.ps1 clean` to clean the artifacts before attempting to build with Docker.
Then run `compile_docker.ps1` or `compile_docker.sh`. The script accepts `make` arguments as well, for example `.\compile_docker.ps1 clean`.

To build all artifacts, run `.\compile_docker.ps1 package`.

## Notes about Docker builds for Windows users

Note that Docker compilation is not compatible with native compilation (if on Windows). You should run `.\compile_docker.ps1 clean` to clean the artifacts before attempting to build with Docker.

If a notification appears


# Credits
## Main Developers
- [RocketRobz](https://github.com/RocketRobz): Lead Developer, implementing the auto-reset power button function used in NTR-mode, and LED functions, to nds-bootstrap.
Expand Down
4 changes: 2 additions & 2 deletions booter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ VERSION := $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
TARGET := booter
BUILD := build
SOURCES := source source/graphics
INCLUDES := include
INCLUDES := include source source/graphics
DATA := data
GRAPHICS := gfx

Expand All @@ -50,7 +50,7 @@ LDFLAGS = -specs=ds_arm9.specs -g -Wl,--gc-sections $(ARCH) -Wl,-Map,$(notdir $*
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lgl2d -lnds9
LIBS := -lfat -lnds9


#---------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions booter/arm9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include $(DEVKITARM)/ds_rules
TARGET := booter
BUILD := build
SOURCES := source source/graphics
INCLUDES := include
INCLUDES := include source
DATA := ../data
GRAPHICS := ../gfx
MUSIC := ../music
Expand All @@ -44,7 +44,7 @@ LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lgl2d -lnds9
LIBS := -lfat -lnds9


#---------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions booter/compile_docker.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if (!$?) {
}

#check for dsimenuplusplus image
docker image inspect dsimenuplusplus >$null 2>&1
docker image inspect twilightmenu >$null 2>&1

if (!$?) {
# build the image if it doesn't exist.
docker build -t dsimenuplusplus --label dsimenuplusplus ../docker
docker build -t twilightmenu --label twilightmenu ../docker
}

docker run --rm -t -i -v "$pwd\:/data" dsimenuplusplus make @args
docker run --rm -t -i -v "$pwd\:/data" twilightmenu make @args

if($args.Count -eq 0 -and $?) {
Copy-Item "booter.nds" "../7zfile/BOOT.NDS"
Expand Down
6 changes: 3 additions & 3 deletions compile_docker.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ if (!$?) {
}

#check for TWiLightMenu image
docker image inspect TWiLightMenu >$null 2>&1
docker image inspect twilightmenu >$null 2>&1

if (!$?) {
# build the image if it doesn't exist.
docker build -t TWiLightMenu --label TWiLightMenu ./docker
docker build -t twilightmenu --label twilightmenu ./docker
}

docker run --rm -t -i -v "$pwd\:/data" TWiLightMenu make @args
docker run --rm -t -i -v "$pwd\:/data" twilightmenu make @args
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM devkitpro/devkitarm:20180613
# ADD libnds.tar /devkitpro
ADD libnds.tar /opt/devkitpro
RUN \
apt-get update && \
apt-get install -y python && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*
# git clone https://github.com/RocketRobz/libnds /temp/libnds && \
# cd /temp/libnds && \
# make install
WORKDIR /data
Binary file added docker/libnds.tar
Binary file not shown.
2 changes: 1 addition & 1 deletion mainmenu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LDFLAGS = -specs=ds_arm9.specs -g -Wl,--gc-sections $(ARCH) -Wl,-Map,$(notdir $*
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lgl2d -lnds9
LIBS := -lfat -lnds9


#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion mainmenu/arm9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lmm9 -lgl2d -lnds9
LIBS := -lfat -lmm9 -lnds9


#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion romsel_dsimenutheme/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LDFLAGS = -specs=ds_arm9.specs -g -Wl,--gc-sections $(ARCH) -Wl,-Map,$(notdir $*
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lgl2d -lnds9
LIBS := -lfat -lnds9


#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion romsel_dsimenutheme/arm9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lmm9 -lgl2d -lnds9
LIBS := -lfat -lmm9 -lnds9


#---------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions romsel_dsimenutheme/compile_docker.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if (!$?) {
}

#check for TWiLightMenu image
docker image inspect TWiLightMenu >$null 2>&1
docker image inspect twilightmenu >$null 2>&1

if (!$?) {
# build the image if it doesn't exist.
docker build -t TWiLightMenu --label TWiLightMenu ../docker
docker build -t twilightmenu --label twilightmenu ../docker
}

docker run --rm -t -i -v "$pwd\:/data" TWiLightMenu make @args
docker run --rm -t -i -v "$pwd\:/data" twilightmenu make @args

if($args.Count -eq 0 -and $?) {
Copy-Item "romsel_dsimenutheme.nds" "../7zfile/_nds/TWiLightMenu/dsimenu.srldr"
Expand Down
2 changes: 1 addition & 1 deletion romsel_r4theme/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LDFLAGS = -specs=ds_arm9.specs -g -Wl,--gc-sections $(ARCH) -Wl,-Map,$(notdir $*
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lgl2d -lnds9
LIBS := -lfat -lnds9


#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion romsel_r4theme/arm9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lmm9 -lgl2d -lnds9
LIBS := -lfat -lmm9 -lnds9


#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion settings/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LDFLAGS = -specs=ds_arm9.specs -g -Wl,--gc-sections $(ARCH) -Wl,-Map,$(notdir $*
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lgl2d -lnds9
LIBS := -lfat -lnds9


#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion settings/arm9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lmm9 -lgl2d -lnds9
LIBS := -lfat -lmm9 -lnds9


#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion title/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LDFLAGS = -specs=ds_arm9.specs -g -Wl,--gc-sections $(ARCH) -Wl,-Map,$(notdir $*
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lgl2d -lnds9
LIBS := -lfat -lnds9


#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion title/arm9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS := -lfat -lmm9 -lgl2d -lnds9
LIBS := -lfat -lmm9 -lnds9


#---------------------------------------------------------------------------------
Expand Down

0 comments on commit 16a08dc

Please sign in to comment.