build automation and creating hugin installers for Windows

4 views
Skip to first unread message

Ad Huikeshoven

unread,
Apr 15, 2009, 6:27:13 AM4/15/09
to hugi...@googlegroups.com
The last month I accomplished publishing a fresh hugin installer for Windows Vista/XP every Wednesday, based on the latest revision available in the trunk of Sourceforge. Ten days ago I was in Berlin at c-base and met Siebrand Mazeland (again). He was curious in what I was doing with hugin. He helped me out showing some things you can do with TortoiseSVN I hadn't tried myself. He was curious about the localization of hugin. Siebrand is very involved in betawiki, a project to translate and localize all MediaWiki software amongst other things. I don't know about the various ways to do such a thing, but he quickly noticed hugin uses gettext, which isn't directly compatible with the way betawiki works. Nonetheless, I'm just relaying his message that might the hugin project be interested in having the software localized in over a hundred languages, the people at the betawiki project might be interested to help us out.

When I told Siebrand I did do a weekly build he remarked why don't you write a script for a nightly build? Automate your tasks, free up time to do more useful things. One great thing is the documentation for such a script predates the script itself, thank you Guido Kohlmeyer (and Allard Katan for providing a link). Or, based on the documentation, I wrote the script, including the creation of the installer, following the installer-howto written by Yval Levy, as included in the SDK. The script is a Windows bat file, works with Vista, should work with XP SP2 (not tested). The script assumes usage of the SDK and a complete toolchain being installed plus a SVN (command line) client. Quite a few paths are hardcoded in the bat file, assuming 'standard' places on install, 'standard' the Windows way. These assumptions are asserted before anything is executed. The bat file might need some adaptions to your Windows system, but these should be straightforward to implement. The bat file has .txt as extension, which you should rename to .bat to have this file actually run.

The reason I post this early version of the script is sharing and giving back, a theme much commented on by Yuval Levy. Another reason is that maybe someone knows some way to automatically upload a file to pbwiki.com or another website where files can be shared. Last but not least, I can make my commitment public to publish every week on wednesday a fresh hugin installer for Windows.

Ad Huikeshoven
aka Dedalus
build-hugin-installer.txt

Yuval Levy

unread,
Apr 16, 2009, 12:30:04 AM4/16/09
to hugi...@googlegroups.com
Hi Ad,

Ad Huikeshoven wrote:
> The script is a Windows bat
> file, works with Vista, should work with XP SP2 (not tested). The script
> assumes usage of the SDK and a complete toolchain being installed plus a SVN
> (command line) client. Quite a few paths are hardcoded in the bat file,
> assuming 'standard' places on install


thanks! great and useful script.

Although I don't have many free cycles these days, I just gave it a
quick try.

I only had TortoiseSVN on my machine, so I had to download the SVN
command line client. The official site directs people strongly to the
Collabnet installer that has a different default location than in the
BAT file. I have not found any installer that installs there.

I also changed the default folder for hugin's source code. "hugin" is
too generic IMO. I use hugin.src.trunk, so that I can keep the source
for multiple branches / revisions inside the same SDK.

When I run the script, I get an error:

CMake Error at platforms/windows/installer/CMakeLists.txt:13 (MESSAGE):
Need to set build date (HUGIN_BUILDDATE) manually

it seems to be the following line in the script:

for /f "tokens=2-4 delims=- " %%i IN ('date/t') DO set TODAY=%%k-%%j-%%i

not sure if it is a localization thing. I have no clue of Windows batch
files.


> maybe someone knows some way to automatically upload a file to pbwiki.com or
> another website where files can be shared.

I'd say that this file should become integral part of the next SDK
version. I can upload it to Hugin's SVN repository.

Thanks for your effort

Yuv

Dedalus

unread,
Apr 18, 2009, 6:24:39 AM4/18/09
to hugin and other free panoramic software

> When I run the script, I get an error:
>
> CMake Error at platforms/windows/installer/CMakeLists.txt:13 (MESSAGE):
>    Need to set build date (HUGIN_BUILDDATE) manually
>
> it seems to be the following line in the script:
>
> for /f "tokens=2-4 delims=- " %%i IN ('date/t') DO set TODAY=%%k-%%j-%%i
>
> not sure if it is a localization thing. I have no clue of Windows batch
> files.

You are right. It is a localization thing, sadly. I presumed the
typical output from DATE /T is "Mon 31-09-2000" but this is dependent
on the country code.
On http://www.ss64.com/nt/date.html is a list of diffent country codes
and ways windows formats the date. You can see for yourself how
windows does output date/t on your computer by entering date/t at the
command prompt. In the script line the delimeters are "-" and " "
between elements (tokens) of the output date. In other countries that
might also be an "/" or ".". Now in my country windows outputs "Www dd-
mm-yyyy" so %%i becomes dd, %%j becomes mm and %%k becomes yyyy.
Originally I incorporated the use of the small program doff see
http://www.jfitz.com/dos/index.html#DOFF but I decided not to add
another dependency, underestimating the localization problem. In case
you need further help in correcting the line if you're using this
batch file I do need a sample output of date/t from your computer. All
in all I'm glad to learn some one got the bat file up and running
quickly on his own machine.

Dedalus

Yuval Levy

unread,
Apr 19, 2009, 1:46:21 PM4/19/09
to hugi...@googlegroups.com
Dedalus wrote:
> It is a localization thing, sadly. I presumed the
> typical output from DATE /T is "Mon 31-09-2000" but this is dependent
> on the country code.

why not take the full output of DATE /T as-is?


> In case
> you need further help in correcting the line if you're using this
> batch file I do need a sample output of date/t from your computer.

19/04/2009

I can probably figure out how to change the script but I don't have
time. You'll read in my next posts why :)

Yuv (sleep deprived)

Reply all
Reply to author
Forward
0 new messages