project-navigation
Personal tools

Poll

Are you interested in such a script

Yes
9 (100%)
No
0 (0%)
Don't care
0 (0%)

Total Members Voted: 5

Voting closed: August 12, 2009, 04:03:18 pm

Author Topic: make_UfoAI_win32 (all in one win32 build script)  (Read 153155 times)

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
make_UfoAI_win32 (all in one win32 build script)
« on: July 12, 2009, 04:03:18 pm »
no longer maintained



url to wiki

Because of the complicated routine that is needed to build ufoai from source
I've started to script a new all in one package to build ufoai from source.

Planned is a fire and forget executable
Just set up path and switches on the GUI then press start and you're done.
No need to download another tool from the net
or set up mingw path variable or something else.
The script will be splitted in 2 parts
The GUI will be part of the C::B package
and the "working" script is part of SVN
to be easy maintainable.

The scripting language is autoit3
I know it's not one of the new cool ones
but the syntax is easy (very important)
it's fairly powerful
it's well documented
it's free (not opensource)
still supported
there is a big community
and no installation is needed

I've attached a screenshot and the script itself
But before i spend days on this project i want to know if there is some interest
especially from the devs


== 2009.12.08 ==============================================

Its time for the first test
UfoAI.zip

  • download and extract the zip
  • place all files into the correct location
  • run configure_win32.exe make you'r selection and press start
  • wait until finished

place all files into the correct location
This zip contains
.\configure_win32.exe the start stript
.\ufoai represents your ufoai sourcefolder
.\MinGW represents your mingw folder

.)configure_win32.exe can be placed anywhere you want
It will generate an ini file to hold your settings
and the working script itself (this way you dont need to extract it from the exe)

.)ufoai the folder-structure is replicaded from svn
here you find the buildscript

.)Mingw the folder-structure is replicaded from C::B package
added 7za.exe (should already be there)
added 7zan.exe (same as 7za.exe but optimized for P4 SSE2)
added svn 1.6.6 (you should alredy have svn but 1.6.1)
added autoit script interpreter + include files (http://www.autoitscript.com/autoit3/)

run configure_win32.exe make you'r selection and press start
This script merge all infos and push them into the buildscript
First point to the location for C::B MinGW UfoAI and Nsis (use the Button)
then do other selections
ufo2map optimize
  • Core n (slect those cores you want to use)
  • clean (will clean all maps before building)
  • fast (will do much less lightning)
  • P M, P4 2, P4 3, .... (optimize ufo2map for some Processors P4 and SSE2 or Core2Duo and SSSE3 ..
UfoAI optimize
  • debug (will build a debug build)
  • P3 (will optimize for P3 SSE (no -Ox option used))
  • full (build a full installer including radiant ans source)
  • small (build a small installer without maptools and source)
press start
configure_win32.exe will close and the buildscript windows should show up

wait until finished
The hardest part
.....
after the script has finished a log file should appear
and the finished installer show up on your desktop
If an error occure zip and attach the log here (its in your %tmp% folder)


== 2009.12.20 ==============================================

UfoAI.zip

added
  • noNSIS button in configure script
  • support for long filenames
  • "Lockcheck" for svn (dont update)
changed
  • the name of the initial script from make_win32.exe to configure_win32.exe
  • prepare routine for C::B (default.conf.bak stores your config, default.conf is changed during a run)
bug
  • The list inside map_last_build.md5 was appended and not replaced


== 2009.12.30 ==============================================

UfoAI.zip

added
  • Checkbox for source update
  • Checkbox for map compilation (incl. Benchmark)
  • Selection for pk3 or 7z file creation
  • Checkbox for Translation file generation
  • Checkbox for UfoAI compilation
  • Installer checkbox incl. small installer option
  • A lot of GCC options for ufo2map and the whole UfoAI project
  • Help included (select the GUI element to view the help on the edit field)
changed
  • map and ufo2map optimization
  • ufoai optimization
bug
  • a few small bugs removed

No Admin rights need (w2k XP [dont know NT 6.x])
You need to place all files in a folder with appropriate rights for the user
Users FULL acces

Run this as Admin
Code: [Select]
cacls "C:\Program Files (x86)\my ufoai folder" /T /E /G Users:F
replace Users with the name of the group correnspondig to your language
Run this and you'll se the groupname (here Benutzer)
Code: [Select]
cacls "%ProgramFiles%"

C:\Programme VORDEFINIERT\Benutzer:R
             VORDEFINIERT\Benutzer:(OI)(CI)(IO)(Beschr�nkter Zugriff:)
                                               GENERIC_READ
                                               GENERIC_EXECUTE

             VORDEFINIERT\Hauptbenutzer:C
             VORDEFINIERT\Hauptbenutzer:(OI)(CI)(IO)C
             VORDEFINIERT\Administratoren:F
             VORDEFINIERT\Administratoren:(OI)(CI)(IO)F
             NT-AUTORIT�T\SYSTEM:F
             NT-AUTORIT�T\SYSTEM:(OI)(CI)(IO)F
             VORDEFINIERT\Administratoren:F
             ERSTELLER-BESITZER:(OI)(CI)(IO)F
    == 2009.01.17 ==============================================

    I've merged both scripts into one
    You now need only make_UfoAI_win32.exe
    No need to extract a zip ...

make_UfoAI_win32.exe

added
  • version number
  • update routine
  • merged both scripts into one
  • ufo2map source monitoring
  • a MessageBox was added into NSIS if you build a small installer (where to get the source files)
changed
  • 7zan.exe not used any more
  • relative path in md5 files
  • the name of the compiled script changed (the last time)
  • small wiki changes
  • log file is not any more overwritten
  • all md5 fileas are stored in the same directory as make_UfoAI_win32.exe (not on \contrib\scripts any more)
bug
  • removed ufo2map loop bug

I've added 2 new routines
update routine
ufo2map source monitoring

The update routine check by every start if there is a new revision available
If yes the new revision is downloaded into %tmp% and a helper file is called (wait_copy_run.exe)
This helper file wait until the script terminates itself
copy the new revision over your existing one
and run it

The ufo2map source monitoring routine
will help users to stay up2date with there maps (*.bsp) witout cleaning all maps by hand (even if not necessary)
To activate this routine checkbox clean must be unchecked
This routine clean all maps only if a sourcefile of ufo2map.exe has changed (all *.bsp files will be deleted)
if not it will use ufo2map_last_build.md5 to determine which *.map file has changed since the last svn update
and delete the corresponding *.bsp file
In this case only changed maps will be build and the map compilation process is dramatically shorten

I've made a flowchart
map_last_build.md5 ( stores the path, name and md5hash of all *.map files from the last successful mapcompilation )
ufo2map_last_build.md5 ( stores the path, name and md5hash of all *.h *.c files from the last successful mapcompilation )
ufo2map.cbp ( contain all information to build ufo2map.exe [*.h *.c] )



== 2009.02.14 == 0.5.1 =====================================

I've added a routine to "fix" the nsis script from ufoai source
Changed to user privilege for un-install incl. UAC for Vista and 7

Removed a bug that break the update routine
You have to manualy download the script

make_UfoAI_win32.exe

changed
  • installer nsis script of UfoAI modify
bug
  • update routine

== 2009.03.14 == 0.5.3 =====================================

Fixed a bug http://ufoai.ninex.info/forum/index.php?topic=2830.msg34927#msg34927
Autoupdate routine is working now!

added
  • splash screen
bug
  • installer script creating pk0 files

== 2009.03.27 == 0.6.0 =====================================

environment check
Every time you press start, ill check your mingw environment to be sure its up2date
If not you will be questioned to update or not
Nothing will be forced!

make install
You are now able to install UfoAI automatically than to run it from source or manually install it
No, its not a good idea to run the game from the source folder

clean switch
The map compile clean switch
You normally dont need it
A algorithm take care that your maps are up2date

small switch
This was linked to the Installer switch and is now independend
If you only want to build the game and nothing else
this switch is 4 you
The map editing tool (Radiant) is not compiled and not installed

added
  • environment check
  • make install
changed
  • clean switch unchecked by default
  • small switch independent from installer


== 2009.03.28 == 0.6.1 =====================================

changed
  • adopt the new folder structure from svn

== 2009.03.29 == 0.6.2 =====================================

bug
  • install script error (7z switch)

== 2009.03.29 == 0.6.3 =====================================

changed
  • cleanup contrib/scripts/windows

== 2009.05.04 == 0.7.0 =====================================

Next to some smaller changes
you'll get a smarter map compiling process
Its no longer forced to run on only one core
Depending on the maps that needs to be compiled the script determine if it is better to run on one core or all your selected cores
If you use the fast switch for compiling maps, the script will use only one core (only lightning is multithreaded [so there is no gain])
You will find a download checkbox which is disabled
Yes i've started to use map_get but currently its only of little use

added
  • ending sounds are back (they have been converted to ogg)
  • verbose output during map compilation ( added to log too )
  • real clean up (the old script leave some tmp files on the system)
  • a "create" button next to the "make install" button ( if the folder dont exist .... )
  • if you close the script while running you will be asked if you really want to do this
  • revision level (svn)
changed
  • gcc option -O2 -O3 ( they wont break threaded run of ufo2map any more )
  • ufo2map_last_build.md5 is not used ( using -V --version output from ufo2map instead [this will prevent a recompile of all maps without reason {a dev know better if it is necessary or not }])
  • map compilation is not single threaded ( it depends on maps [>750k multi, <100k single, in between depends on cores and amount of <100k maps] )

== 2009.05.15 == 0.7.5 =====================================

I've added ufomodel to create mdx files
Its a fast build process so i spared some time and added it into the ufo2map build proecess
The tool itself is compiled with the same gcc settings as applied for ufo2map
Added the possibility to run a command or script after build completion
Some macro's are added see help
>I've noticed that every time one close the make_UfoAI_win32.exe, even when no compiling was started (not even any change in the setting was made) the app says "My child processes and I are still alive!
Will only show up during "make" no longer under "config"

added
  • run script after build
  • ufomodel
changed
  • close warning
  • litte Gui changes

== 2009.05.22 == 0.7.6 =====================================

.)I've forgotten to clean project folder after compiling ufomodel (fixed)
.)The script now run 7zip with option -mx1 instead of -mx9 to create pk3 files IF switch "Installer" is NOT selected
This should speedup the build process, to the cost of bigger pk3 files

changed
  • cleaining ufomodel C::B files
  • build pk3 files faster if switch "Installer" is deselected

== 2009.05.24 == 0.8.0 =====================================

Added the possibility to compile dev 2.4 or dev 2.3 of Ufoai
If you want to build dev 2.3 you need to get the source too howto
Store the source directly under the MingW folder (the script will look there for it first [easier switching between 2.4<->2.3])

added
  • 2.3 develop version

== 2010.07.03 == 0.9.0 =====================================

Two big things have been added
1) a map download >like< map_get.py
The main difference is that you don't download maps that aren't useful for your build
The serverApp run once in an hour that once a day
I do a md5hash on the original *.map files to determine if a map should be downloaded or compiled than do just download
The server log store hash sums of *.map files and the path of them
If you want to download a map (*.bsp)
the script hash your *.map file and check it against the serverlog *.map hash
If both match, the download of this *.bsp will start
If the download failed or the hash is unequal, you will build the map using ufo2map


2) A routine to build an update than a full installer of UfoAI
It will build a update of your last full build (you need to enable this function first)
A new switch "diff" was added into the GUI (It requiers the "Installer" and "7z" switch too, to work)
First time you build a full installer.
Next time you call it, you will build (differential) updates
A new file to hold all infos was added too, inst_last_build.md5 (release 2.4) and inst_last_build_2.3.md5 (release 2.3)
If you delete this file you will start from the beginning (there is no GUI switch to do this)
The update include all dlls and executables, only files inside of pk3's are removed from the installer if they are the same (the pk3 files are than updated during installation)
This way you can switch between a release or debug build, even include radiant once and next time without radiant.

added
  • instance check of make_UfoAI_win32.exe (only on instance is allowed)
  • some Hardware infos to log (CPU RAM OS)
  • map download
  • Installer update routine
bugs
  • Internal Search
  • GUI

== 2010.12.04 == 0.9.4 =====================================
ufo2map will now use quant 4 to compile maps
SSE is now used if selected
The log file is now not opened after completing compilation, except for an error
MinGW is now silently updated if necessary
A small list of bugs have been fixed

changed
  • -quant 4 for ufo2map
  • make use of SSE during make
  • The log file will not open any more if no error accrued
  • MinGW update
bugs
  • some small bugs

== 2011.01.05 == 0.9.5 =====================================
There was a bug related to mapdownload
The script tried to download outdated maps.
Added a conditional statement to compare ufo2map version level
from server-log and local ufo2map build

bugs
  • map download

== 2011.02.19 == 0.9.6 =====================================
There was a bug related to mapdownload
Added a "macro" ctrl+s to start the build from the config window
Reduced the hight of the config window a bit (as much as possible)
Added the make model switch (*.mdx files)
Deselecting is only useful if you want to build maps only

added
  • make model switch
  • ctrl+s to start the build process (instead of pressing start)
changed
  • smooth progress update
  • size of the config window reduced
bugs
  • map download

== 2011.02.19 == 0.9.7 =====================================
There was a regex bug

bugs
  • regex bug

== 2011.03.26 == 0.9.8 =====================================
I've changed the routine to update mingw

changed
  • mingw update routine
« Last Edit: November 04, 2013, 05:31:18 pm by Muton »

odie

  • Guest
Re: All in one win32 build script
« Reply #1 on: July 12, 2009, 08:46:37 pm »
Hi Muton,

I like the looks of it. :D

Btw, is this a working script already? lol. I would love this, though i can still manage the current few scripts (SVN Update, CB compile, ufo2map compile, possible po compile, pk3 compile, NSIS installer script compile and finally upload). :D

U able to automate all those tasks so far?

PS: U might want to consider asking for the originating SVN directory (aka the directory u downloaded the svn to. :D)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: All in one win32 build script
« Reply #2 on: July 12, 2009, 08:56:13 pm »
we are more trying to get into ./configure and Makefile usage for mingw, too

once we have that working we will remove *.bat files and integrate makefile usage into the c::b project files. it's only one part to maintain and easier for us.

you can of course write the script - it will take a some time to get configure and make done (don't expect this in the next few months)

odie

  • Guest
Re: All in one win32 build script
« Reply #3 on: July 12, 2009, 08:59:43 pm »
we are more trying to get into ./configure and Makefile usage for mingw, too

once we have that working we will remove *.bat files and integrate makefile usage into the c::b project files. it's only one part to maintain and easier for us.

you can of course write the script - it will take a some time to get configure and make done (don't expect this in the next few months)

Ooooo, the getting into minGW part would make CB compilations so much way cooler. :D
Dun rush dun rush, good things can be waited for !! :D

Curious, how will that then be able to differentiate a built that is for clean maps rebuilt / add-on differential maps rebuild, Mattn?

And by the *.bat files, i supposed it will still not pack the pk3 files (aka archives.bat) and NSIS script (which is basically not a DOS batch anyway). Will archives.bat be kept then.?? :D Thanks for attention.



Muton: Good work! :D I would LOVE to see ur script! Lol.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: All in one win32 build script
« Reply #4 on: July 12, 2009, 09:05:09 pm »
pk3 and nsis is all done in makefiles, too

all you have to call is make win32installer - this would result in recompiling, building maps, compiling languages, generating pk3 and creating nsi (and even upload it to sf.net if you want)

odie

  • Guest
Re: All in one win32 build script
« Reply #5 on: July 13, 2009, 07:27:38 am »
pk3 and nsis is all done in makefiles, too

all you have to call is make win32installer - this would result in recompiling, building maps, compiling languages, generating pk3 and creating nsi (and even upload it to sf.net if you want)

hi Mattn,

Could i clarify something pls? This win32installer is still not in place rite?
Or isit not supposed to be a .bat batch file but a function for calling within the CB??

So far, as of 25148, (still rebuilding the maps though), i have not been able to find any files with "win32installer"..... :D

Thanks.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: All in one win32 build script
« Reply #6 on: July 13, 2009, 06:36:24 pm »
it's called wininstaller nowadays and we have that (makefile target) since ..... the beginning (i don't know - for ages already)

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: All in one win32 build script
« Reply #7 on: July 13, 2009, 07:05:44 pm »
> U able to automate all those tasks so far?
I've already done this with a cmd script
but its pure horror
I'll add my optimations too
to speed up ufo2map ...

odie

  • Guest
Re: All in one win32 build script
« Reply #8 on: July 14, 2009, 06:09:14 am »
> U able to automate all those tasks so far?
I've already done this with a cmd script
but its pure horror
I'll add my optimations too
to speed up ufo2map ...

Nods nods,

ok then! I be looking forward to your script then! :D Toodles!

Offline PhilRoi

  • Rookie
  • ***
  • Posts: 50
  • EMT and Soldier
    • View Profile
Re: All in one win32 build script
« Reply #9 on: July 14, 2009, 06:12:44 am »
your all in one going to be able to do language files as well?


also if i am reading things correctly your using 7zan.exe?  which is a version of 7-zip and included in the codeblocks pre-package? according to the 7-zip the file is no longer included in 7-zip and hasn't been since 2003?
also I just got the latest codeblocks package and it does NOT include 7zan.exe,  7za.exe is included and should do the same thing.
« Last Edit: July 14, 2009, 06:41:14 am by PhilRoi »

odie

  • Guest
Re: All in one win32 build script
« Reply #10 on: July 14, 2009, 06:48:20 am »
your all in one going to be able to do language files as well?


also if i am reading things correctly your using 7zan.exe?  which is a version of 7-zip and included in the codeblocks pre-package? according to the 7-zip the file is no longer included in 7-zip and hasn't been since 2003?
also I just got the latest codeblocks package and it does NOT include 7zan.exe,  7za.exe is included and should do the same thing.

Just stick to 7za.exe. Or if u r a cmd person, u can download a dos version of it and use as well.

The pk3 files are packed using 7za.exe

And well, if 7zan.exe is included and not used, many we can remove from svn trunk?

Offline Smight

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: All in one win32 build script
« Reply #11 on: July 14, 2009, 08:11:56 am »
when you make instructions for it please assume we don't know nothing about nothing :)
i hate when someone misses a step and im left with  :-\ putt whatnow into where ??? :'(

Offline PhilRoi

  • Rookie
  • ***
  • Posts: 50
  • EMT and Soldier
    • View Profile
Re: All in one win32 build script
« Reply #12 on: July 14, 2009, 09:47:01 am »
if i am hearing this correctly,  all the needed files will be included in the SVN.  and when complete all you need to do is doubleclick 1 file. and it will update everything, compile everything, and give you a neatly wrapped complete with a ribbon bow packaged installer.


odie

  • Guest
Re: All in one win32 build script
« Reply #13 on: July 14, 2009, 11:07:25 am »
when you make instructions for it please assume we don't know nothing about nothing :)
i hate when someone misses a step and im left with  :-\ putt whatnow into where ??? :'(

Ahem, Smight,

First of all, welcome to the forums. I assume this is ur first post. Pls do watch the proper netiquette here. Thank u. :D

Next, dun worry, Muton does things well, hence, do not make too much assumptions w/o posting the relevant (and in nicer tones) questions pls. lol.

But its a good point brought up nonetheless. Muton, possible to have a simple txt / pdf document for this pls? Like a manual, of course, after everything's ready though. lol. :P

Which brings me to....

if i am hearing this correctly,  all the needed files will be included in the SVN.  and when complete all you need to do is doubleclick 1 file. and it will update everything, compile everything, and give you a neatly wrapped complete with a ribbon bow packaged installer.

Are u making this an open source and including this into the SVN?? If so, u might need to get the dev team's approval. Though i will probably have no qualms abt using this to simplify my life! Lol. (Esp with the ufo2map.exe module). :P

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: All in one win32 build script
« Reply #14 on: July 14, 2009, 07:47:13 pm »
> 7zan.exe

Is selfcompiled from 7zip source
optimized for P4 SSE2
its faster if you compress to 7z than 7za.exe

> when you make instructions for it please assume we don't know nothing about nothing
;) I'll remeber that

>if i am hearing this correctly,  all the needed files will be included in the SVN.
No, dev's made it already clear
They dont want unnecessary files stored on svn

>and when complete all you need to do is doubleclick 1 file ....
yes one double klick and you'r done

>u might need to get the dev team's approval
thats the reason why i've asked for it
i'll store only one textfile on svn
The starting executable and the script interpreter will be stores inside C::B package