project-navigation
Personal tools

Author Topic: (log) Actually got new build system to (partially) work on Windows 7  (Read 31346 times)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #45 on: October 23, 2010, 07:06:55 pm »
i will check it - why is the cmd /c needed? - it should be $(shell ...), no? (if needed at all)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #46 on: October 23, 2010, 07:22:12 pm »
i had to add -r to all other pk3 defines to make it work. it feels a lot faster here, too

thanks a lot

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #47 on: October 23, 2010, 07:26:58 pm »
Code: [Select]
ifeq (7z,$(findstring 7z,$(call ZIP)))

is there any special reason that you only check 7z here? and not also 7za?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #48 on: October 23, 2010, 07:44:28 pm »
i've applied it to master without that Windows_NT hack - i would first like to know why it's needed and whether we can maybe work around this hack somehow.

it's tested on mac and linux and works fine there (and finally on more than one core - thanks a lot again)

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #49 on: October 23, 2010, 07:47:02 pm »
> why is the cmd /c needed

7z recursive search will stuck
maybe a / path or winpath c:\... problem

> i had to add -r to all other pk3 defines to make it work.

Hmmm a bug?
On win it worked well
I'll test it tomorrow inside a real Linux VM

>> ifeq (7z,$(findstring 7z,$(call ZIP)))
> is there any special reason that you only check 7z here? and not also 7za
7z accrue in 7z and 7za
first i checked for zip, but 7z a -tzip  ;) url

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #50 on: October 23, 2010, 07:51:38 pm »
i've applied it to master without that Windows_NT hack

OS is an environment var in Win(nt)
Its also present inside of mingw
but no other machine should have it
at least not set to Windows_NT

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #51 on: October 23, 2010, 07:59:53 pm »


define $(BASE_DIR)/0models.pk3
   -r models/*.mdx models/*.md2 models/*.md3 models/*.dpm models/*.obj models/*.jpg models/*.png models/*.tga models/*.anm models/*.tag
endef

is mirrored (bug)
you have to remove on

Offline mikeg

  • Rookie
  • ***
  • Posts: 24
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #52 on: October 23, 2010, 08:42:23 pm »
Hello,

just a small improvement - see attached patch. I also want to get rid of the first tasks, I want to implement a caching function for all tasks in Makefile and friends, which take a long time (file system searches, git check, etc).

Just to explain why I want to do this, please correct me, if I'm not right with that: I use Mingw/Msys to compile on Windows 7. I just type make in msys shell and this is the time it takes for doing nothing:

Code: [Select]
$ time { make; }
make: Nothing to be done for `all'.

real    0m29.291s
user    0m9.715s
sys     0m18.212s

I see there are some time consuming tasks such as find and I love to see that tasks are only done if I want to do it, for example after a make clean. How long does a build on Linux or other machines takes of there is nothing to do?

Best regards

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #53 on: October 23, 2010, 11:41:21 pm »
try make -r

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #54 on: October 23, 2010, 11:44:06 pm »
here the time if nothing must be done.

real   0m1.381s
user   0m1.080s
sys   0m0.070s

Offline mikeg

  • Rookie
  • ***
  • Posts: 24
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #55 on: October 25, 2010, 08:35:56 pm »
try make -r
Thank you, that worked fine. It's still 10 secs, but that seems to be because of my "old" hardware.

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #56 on: October 25, 2010, 11:42:10 pm »
real   0m1.381s
Hmmm. Still quite a lot of time for 'nothing to do' :(
Compared to the 0.00 secs C::B (with it's built-in 'make') needs for that...

Let's face it, the MAKE we are using doesn't seem to be suitable for Windoze systems (unless we ALL are too stupid to use it the right way). Isn't there some alternative (free & compatible) MAKE for Win users ?

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #57 on: October 26, 2010, 05:41:35 am »
Let's face it, the MAKE we are using doesn't seem to be suitable for Windoze systems (unless we ALL are too stupid to use it the right way). Isn't there some alternative (free & compatible) MAKE for Win users ?

I admit I don't know as much as the rest of you about the things in this discussion, but I will say that I've seen plenty of projects for Win32 that use a Windows version of MAKE or something based upon it - some are on SourceForge, but, would SCONS work at all for UFO:AI?  According to my research on it, SCONS was used to build the original GtkRadiant, I'd imagine it would build UFORadiant and then, with some work, the UFO AI game itself.  It's also cross-platform.

Hopefully there is something in that last paragraph that is at least somewhat helpful.

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #58 on: October 26, 2010, 10:42:43 am »
make != make
There is MSYS make.exe
and mingw32-make.exe

MSYS is working well under MinGW
mingw32-make (used by C::B) will skip >any< find call
and thats the reason why its that fast
find: paths must precede expression: \!
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]


I've recompiled MSYS make (very easy task)
and won 10sec by using the --enable-case-insensitive-file-system
but dropped it ...

To be honest
im using a linux VM for testing
its so much faster than MinGW
But you can run more MinGW shells one for "make ufo" another for "make pk3" ....

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #59 on: October 26, 2010, 09:10:05 pm »
mingw32-make (used by C::B) will skip >any< find call
and thats the reason why its that fast
Interesting. What are those find calls used for (in ufoai) if C::B can (safely ?) omit them ?