Jump to page: 1 2 3
Thread overview
.bat file to help compile easier - dmd/build
Jan 02, 2009
Michael P.
Jan 02, 2009
Daniel de Kok
Jan 02, 2009
Derek Parnell
Jan 03, 2009
Michael P.
Jan 03, 2009
torhu
Jan 03, 2009
Michael P.
Jan 02, 2009
Bill Baxter
Jan 02, 2009
Bill Baxter
Jan 03, 2009
Tim M
Jan 03, 2009
Don
Jan 03, 2009
John Reimer
Jan 04, 2009
Tim M
Jan 04, 2009
Denis Koroskin
Jan 04, 2009
John Reimer
Jan 04, 2009
Daniel Keep
Jan 04, 2009
John Reimer
Jan 04, 2009
John Reimer
Jan 04, 2009
Daniel Keep
Jan 04, 2009
Christopher Wright
Jan 04, 2009
Lutger
Jan 04, 2009
Tim M
Jan 05, 2009
Don
Jan 05, 2009
Sean Kelly
Jan 03, 2009
Bill Baxter
January 02, 2009
Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress:

build mario alleg.lib

Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it after, assuming there is not compiler errors, it takes time.
In a .bat file right now, I have this:

build mario alleg.lib
mario

But, mario will execute even if there are errors found by dmd.
Is there anything that I can use to see if errors were found, and if there isn't, execute it, and if there is, don't execute it?
DMD1.036, Windows XP, Build/Bud 3.04
January 02, 2009
On Fri, 02 Jan 2009 14:17:17 -0500, Michael P. wrote:
> But, mario will execute even if there are errors found by dmd. Is there anything that I can use to see if errors were found, and if there isn't, execute it, and if there is, don't execute it? DMD1.036, Windows XP, Build/Bud 3.04

I haven't seriously used DOS/Windows since halfway the nineties, but didn't there use to be a 'pause' command? That will allow you to view build output, and possibly to use Ctrl + C to stop the batch file.

Or you could also use ERRORLEVEL after running 'build':

IF ERRORLEVEL EQU 0 mario

-- Daniel
January 02, 2009
On Fri, 02 Jan 2009 14:17:17 -0500, Michael P. wrote:

> Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress:
> 
> build mario alleg.lib
> 
> Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it after, assuming there is not compiler errors, it takes time.
> In a .bat file right now, I have this:
> 
> build mario alleg.lib
> mario
> 
> But, mario will execute even if there are errors found by dmd.
> Is there anything that I can use to see if errors were found, and if there isn't, execute it, and if there is, don't execute it?
> DMD1.036, Windows XP, Build/Bud 3.04

If 'mario' always needs the alleg.lib file to compile, you can include that information in the mario.d source file.

eg.

  version(build) { pramga(link, alleg); }

Then you no longer have to keep typing into the Bud command line, instead you just say ...

   build mario

Use the return code from Bud to see if you can run the compiled program ...

   if errorlevel 0 mario


-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
January 02, 2009
On Fri, Jan 2, 2009 at 2:17 PM, Michael P. <baseball.mjp@gmail.com> wrote:
> Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress:
>
> build mario alleg.lib
>
> Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it after, assuming there is not compiler errors, it takes time.
> In a .bat file right now, I have this:
>
> build mario alleg.lib
> mario

build mario alleg.lib && mario
January 02, 2009
On Sat, Jan 3, 2009 at 4:17 AM, Michael P. <baseball.mjp@gmail.com> wrote:
> Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress:
>
> build mario alleg.lib
>
> Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it after, assuming there is not compiler errors, it takes time.
> In a .bat file right now, I have this:
>
> build mario alleg.lib
> mario
>
> But, mario will execute even if there are errors found by dmd.
> Is there anything that I can use to see if errors were found, and if there isn't, execute it, and if there is, don't execute it?
> DMD1.036, Windows XP, Build/Bud 3.04

build mario alleg.lib && mario

Stops after the build if build returns a nonzero exit code.   That bit of the DOS shell is more or less just like a Unix shell.

--bb
January 02, 2009
On Sat, Jan 3, 2009 at 6:35 AM, Bill Baxter <wbaxter@gmail.com> wrote:
> On Sat, Jan 3, 2009 at 4:17 AM, Michael P. <baseball.mjp@gmail.com> wrote:
>> Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress:
>>
>> build mario alleg.lib
>>
>> Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it after, assuming there is not compiler errors, it takes time.
>> In a .bat file right now, I have this:
>>
>> build mario alleg.lib
>> mario
>>
>> But, mario will execute even if there are errors found by dmd.
>> Is there anything that I can use to see if errors were found, and if there isn't, execute it, and if there is, don't execute it?
>> DMD1.036, Windows XP, Build/Bud 3.04
>
> build mario alleg.lib && mario
>
> Stops after the build if build returns a nonzero exit code.   That bit of the DOS shell is more or less just like a Unix shell.


Also, with that one-liner you can just use the up arrow instead of typing it again or going to the trouble of putting it in a .bat file.

--bb
January 02, 2009
On Fri, Jan 2, 2009 at 4:35 PM, Bill Baxter <wbaxter@gmail.com> wrote:
> On Sat, Jan 3, 2009 at 4:17 AM, Michael P. <baseball.mjp@gmail.com> wrote:
>> Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress:
>>
>> build mario alleg.lib
>>
>> Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it after, assuming there is not compiler errors, it takes time.
>> In a .bat file right now, I have this:
>>
>> build mario alleg.lib
>> mario
>>
>> But, mario will execute even if there are errors found by dmd.
>> Is there anything that I can use to see if errors were found, and if there isn't, execute it, and if there is, don't execute it?
>> DMD1.036, Windows XP, Build/Bud 3.04
>
> build mario alleg.lib && mario

I beat youuuu
January 03, 2009
On Sat, 03 Jan 2009 08:17:17 +1300, Michael P. <baseball.mjp@gmail.com> wrote:

> Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress:
>
> build mario alleg.lib
>
> Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it after, assuming there is not compiler errors, it takes time.
> In a .bat file right now, I have this:
>
> build mario alleg.lib
> mario
>
> But, mario will execute even if there are errors found by dmd.
> Is there anything that I can use to see if errors were found, and if there isn't, execute it, and if there is, don't execute it?
> DMD1.036, Windows XP, Build/Bud 3.04


I thought everyone used dsss with d now. http://dsource.org/projects/dsss.
January 03, 2009
On Sat, Jan 3, 2009 at 7:20 AM, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote:
> On Fri, Jan 2, 2009 at 4:35 PM, Bill Baxter <wbaxter@gmail.com> wrote:
>> On Sat, Jan 3, 2009 at 4:17 AM, Michael P. <baseball.mjp@gmail.com> wrote:
>>> Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress:
>>>
>>> build mario alleg.lib
>>>
>>> Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it after, assuming there is not compiler errors, it takes time.
>>> In a .bat file right now, I have this:
>>>
>>> build mario alleg.lib
>>> mario
>>>
>>> But, mario will execute even if there are errors found by dmd.
>>> Is there anything that I can use to see if errors were found, and if there isn't, execute it, and if there is, don't execute it?
>>> DMD1.036, Windows XP, Build/Bud 3.04
>>
>> build mario alleg.lib && mario
>
> I beat youuuu

Ah, didn't notice because gmail hid your response inside a "click here to see quoted message".

--bb
January 03, 2009
On Fri, Jan 2, 2009 at 7:29 PM, Bill Baxter <wbaxter@gmail.com> wrote:
>
> Ah, didn't notice because gmail hid your response inside a "click here to see quoted message".

It does seem to have that bad habit, doesn't it.
« First   ‹ Prev
1 2 3