Sixthhokage2 / ohboy

Automatically exported from code.google.com/p/ohboy
GNU General Public License v2.0
0 stars 1 forks source link

Gen_ohboyver.bat generates no file. #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I tried to compile a vanilla build for caanoo in windows, but gen_ohboyver 
failed, so i always got error when compiling (missing ohboy_ver.h)

I've been looking for a solution and i finally got one which worked:
using a small ".com" executable to get date and create the ohboy_ver.h file 
with YYYYMMDD format.

(http://www.huweb.hu/maques/realdate.htm)
It's freeware, so there is no problem in including it here.

I placed the ".com" executable in the same directory as makefile.

Then, i modified the gen_ohboyver.bat file and replaced everything with just 
this two lines:

@echo off
realdate /c /f=$#define OHBOY_VER "CCYYMMDD"$ >ohboy_ver.h

Then i modified the makefile to call gen_ohboyver BEFORE making ohboy.gpe (i 
compile under cygwin):

all: ohboy_ver.h ohboy

ohboy_ver.h:
    ./gen_ohboyver.bat

ohboy: OhBoy.gpe

OhBoy.gpe: $(OBJS)
    $(LD) $(LDFLAGS)...

This solves compiling under windows issues, and also the "windows date format" 
issue.

i attached the executable here:

Original issue reported on code.google.com by hiban1...@gmail.com on 21 Aug 2011 at 9:44

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, and it rewrites the file every time its called, so no need to delete 
ohboy_ver.h each time we want to compile.

Original comment by hiban1...@gmail.com on 21 Aug 2011 at 9:55

GoogleCodeExporter commented 9 years ago
It isn't supposed to create any files, that is the makefile job. If it isn't 
working on your machine I'd like to know why (e.g. the failure you mentioned 
you got).

The batch file works fine for me under Windows and the shell script works fine 
under both Windows and Linux.

RE the freeware tool, I'm reluctant to include that. We've no idea what it does 
internally. If you really want improved header file contents use msys/cygwin 
which most of the cross-compilers were built with and often require.

Original comment by clac...@gmail.com on 21 Aug 2011 at 3:54