Portable?

support for the ARM toolchain
Post Reply
xcv
Posts: 4
Joined: Sat Oct 09, 2010 1:34 pm

Portable?

Post by xcv » Tue Nov 16, 2010 4:42 pm

Hello to everyone, I'm new int this forum and I like to program in my free time. I use linux and in my computer and I have the compiling environment ok, but sometimes I am o windows computers where I would like to be able to compile, so, my question is: Can I have a portable MinGW + devkitPro on my pendrive or something like that? If it is possible, how do I install it? I have looked it up in google but I haven't found anything.

Thank you for your attention :)

ritz
Posts: 24
Joined: Thu Jun 04, 2009 3:17 pm
Location: Canada

Re: Portable?

Post by ritz » Fri Nov 19, 2010 5:12 pm

1. Download the newest devkitProUpdater on sourceforge
2. Run it, choose "devkitARM" instead of "Full" (you may even want to go in there and uncheck gba and mirko stuff) and choose your USB drive letter instead of the C: drive (e.g. E:\devkitPro). This should download and then install everything onto your USB drive.
3. I noticed the Makefile you posted above seems to be from an older devkitPro download. I would suggest you start with the newest version. So, from the libnds examples, copy the examples\nds\templates\arm9 folder to someplace on your USB drive and rename the folder to whatever you want (e.g. E:\myDSproject\). Now, if you need to, make your custom changes to E:\myDSproject\Makefile
4. Inside E:\myDSproject\ folder, make a new text file and rename it to something like "devkitProCmdLine.bat" and paste this into it:

Code: Select all

@echo off

set DL=%~D0%
set DKPHOME=devkitPro
set DEVKITPRO=/%DL:~0,1%/%DKPHOME%
set DEVKITARM=%DEVKITPRO%/devkitARM
set PATH=%DL%\%DKPHOME%\msys\bin;%PATH%

cmd
At a basic functioning level, that should be it.

Let's test it. Go to some random windows box (without admin rights), plug in your USB drive and double click "devkitProCmdLine.bat"
You should now have a command prompt with the appropriate environment variables set. Try typing "make".

xcv
Posts: 4
Joined: Sat Oct 09, 2010 1:34 pm

Re: Portable?

Post by xcv » Fri Nov 19, 2010 10:38 pm

Thanks, it worked perfectly, I just have some simple doubts and it will be over:

When compiling, it prompts some warnings of the libnds, specially from videoGL.h and something about arithmetic operations with NULL... can I avoid them or use the same version than in my box easily in order to avoid different builds? How can I do it?

Can I place the .bat anywhere, e.g. in USB drive's root folder? Would it work? I suppose I just would have to cd to the project folder, but I am not sure...

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Portable?

Post by WinterMute » Sun Nov 21, 2010 2:01 am

Ritz's bat file assumes that you have the devkitPro folder in the root of your drive and uses only the drive letter the bat file was started from so, yes, you can put the bat file anywhere.

What I would tend to do though is, rather than stop at a coomand line, is launch Programmer's Notepad, like this.

Code: Select all

@echo off

set DL=%~D0%
set DKPHOME=%DL%\devkitPro
set DEVKITPRO=/%DL:~0,1%/devkitPro
set DEVKITARM=%DEVKITPRO%/devkitARM
set PATH=%DEVKITPRO%\msys\bin;%PATH%
"%DKPHOME%\Programmers Notepad\pn.exe"
From there you can load a project file and compile as normal.

You can also pass a project file to pn.exe from the bat file and have it ready to go :-

Code: Select all

"%DKPHOME%\Programmers Notepad\pn.exe" %DL%\projects\nds\mygame\mygame.pnproj
PN2 provided with the devkitPro installer is the portable version. You should be able to click Tools->make or press ALT+1 to build your project ( caveat, you need one of the source files from your project open in the editor for this to work)

It's much more convenient to see the error output in your editor & be able to double click the errors.

What are the warnings you get? You should be using the latest versions of the tools and libraries & keeping your project up to date - bugs get fixed and tools are improved.
Help keep devkitPro toolchains free, Donate today

Personal Blog

xcv
Posts: 4
Joined: Sat Oct 09, 2010 1:34 pm

Re: Portable?

Post by xcv » Sun Nov 21, 2010 12:34 pm

I'm sorry but I didn't install programmer's notepad because I am used to SciTE, but since it has a command line, would it work if I ran SciTE in the .bat?

The warnings I get are that there are arithmetic operations with NULL in glCallList. I commented line 657 and 661 (sassert) and it doesn't display any warning now:
___
657| //sassert(list != NULL,"glCallList received a null display list pointer");
661| //sassert(count != NULL,"glCallList received a display list of size 0");

Only one more thing... will it work on win7 without admin permissions too???

Thank you for your attention :)

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Portable?

Post by WinterMute » Mon Nov 22, 2010 6:06 pm

From what I can see it looks like SciTE doesn't have project management so it might be difficult. Programmer's Notepad is based on Scintilla too so it shouldn't be hugely different.

The warning has been fixed in SVN, I'm about to roll a new libnds release.

This should work fine on win7 with no admin permissions.
Help keep devkitPro toolchains free, Donate today

Personal Blog

xcv
Posts: 4
Joined: Sat Oct 09, 2010 1:34 pm

Re: Portable?

Post by xcv » Tue Nov 23, 2010 4:16 pm

Ok I will install it and do what you said.

Today I used a win7 and yes, it worked very well :D

Thank you a lot, this post can be closed!

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests