Jump to content


Photo

Ufo2000 Installer


  • Please log in to reply
52 replies to this topic

#1 Cpl. Facehugger

Cpl. Facehugger

    Creative Text Department

  • Xenocide Inactive
  • 3,749 posts

Posted 20 February 2004 - 05:18 PM

I know what it is, but I don't know how to install it! :D
I'm only partially inactive. :P I can still be reached at cpl.facehugger@gmail.com, and via PM. Preferably the former.

*Coming back? Avast! Facehugger, finish your assignments!*

Posted Image

#2 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 23 February 2004 - 12:30 PM

I know what it is, but I don't know how to install it! :D

That's supposed to be simple. Just read INSTALL instructions here: http://lxnt.info:888...k/trunk/INSTALL
This file is also included in UFO2000 distributive. If the instructions there are not clear enough, feel free to ask any questions in this forum. Your feedback will be welcome and will help to make the game even easier to install.
ufo2000 development team
http://ufo2000.sourceforge.net

#3 Cpl. Facehugger

Cpl. Facehugger

    Creative Text Department

  • Xenocide Inactive
  • 3,749 posts

Posted 23 February 2004 - 01:52 PM

Well, I suppose I could understand that. But what I would really like is an install program that lets you browse for the Xcom UFO folder, and then the program does the rest. You see, I'm very lazy. :D
I'm only partially inactive. :P I can still be reached at cpl.facehugger@gmail.com, and via PM. Preferably the former.

*Coming back? Avast! Facehugger, finish your assignments!*

Posted Image

#4 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 23 February 2004 - 05:32 PM

i followed the instructions precisely and it still says "i can't find ufo files" <_<

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#5 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 23 February 2004 - 06:16 PM

i followed the instructions precisely and it still says "i can't find ufo files" <_<

Did you use x-com demo or a full version?

By the way, when the game displays error message, it shows a full path to the file it tried to find but failed. Maybe you have extracted original x-com data files to a different directory and the game can't find them? Please provide more details.

PS. Are there any people familiar with NSIS installer? Can you help with making installer for UFO2000?
ufo2000 development team
http://ufo2000.sourceforge.net

#6 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 23 February 2004 - 07:34 PM

i followed the instructions precisely and it still says "i can't find ufo files" <_<

Did you use x-com demo or a full version?

By the way, when the game displays error message, it shows a full path to the file it tried to find but failed. Maybe you have extracted original x-com data files to a different directory and the game can't find them? Please provide more details.

PS. Are there any people familiar with NSIS installer? Can you help with making installer for UFO2000?

moi? a demo? full version all the way!!!
just rechecked and recopied, and now this is what i get. could it be since i copied the files from DOS version?

PPS. NSIS?!? The only ones I've ever used are InstallShield (commercial, paid or free, cracked :P), Installer VISE (free for free programs, used for Quicktime) and Clickteam Install Creator/Maker (fully free, very common).

Attached Thumbnails

  • ufo2000.png

Edited by SupSuper, 23 February 2004 - 07:36 PM.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#7 XcomVic

XcomVic

    I need to pick a department

  • Forum Members
  • PipPipPip
  • 83 posts

Posted 23 February 2004 - 09:16 PM

i got the same error cept for geodata
...just a thought...

#8 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 24 February 2004 - 04:43 AM

I had an error problem too, although I had copied everything. I had to set the 'F_FILECHECK' flag to 0 in ufo2000.ini (under [Flags]). Then everything worked fine :) . Maybe that's the case there too...
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#9 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 24 February 2004 - 09:13 AM

I had an error problem too, although I had copied everything. I had to set the 'F_FILECHECK' flag to 0 in ufo2000.ini (under [Flags]). Then everything worked fine :) . Maybe that's the case there too...

nope, still gives the same error -_-

PPS. could NSIS be Nullsoft Scriptable Install System? if it is, i can give it a shot.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#10 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 24 February 2004 - 03:44 PM

I had an error problem too, although I had copied everything. I had to set the 'F_FILECHECK' flag to 0 in ufo2000.ini (under [Flags]). Then everything worked fine :) . Maybe that's the case there too...

nope, still gives the same error -_-


Data files checking code has changed in the latest version and F_FILECHECK flag does not work anymore. You can open 'init-scripts/filecheck.lua' file and change
["$(xcom)/ufograph/tac01.scr"] = { Crc32 = X("0xBBB1E67F") },
to
["$(xcom)/ufograph/tac01.scr"] = { Crc32 = X("0x00000000") },

This change will disable crc check for this particular file. A fix is already committed to subversion repository but a new binary release will be built somewhat later.

PPS. could NSIS be Nullsoft Scriptable Install System? if it is, i can give it a shot.


As far as I know it is one of the best installers available and it is completely free (no ads or feature limitations). It adds only about 30KB overhead and provides superior compression (LZMA method). If you can make an installer for ufo2000, it will be a good contribution for the project and your name will be added to credits of course :)
ufo2000 development team
http://ufo2000.sourceforge.net

#11 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 24 February 2004 - 05:19 PM

ok, first edition of the installer for the latest version of UFO2000 (publish it only as the .exe and not zipped. i just zip it so the board doesn't screw it up). next edition should have Cpl. Facehugger's feature (you tell it where you have x-com and the installer copies the files for you).
any changes you want, from small to big, or installers for other things, just ask and i'll implement them.

Attached Files


too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#12 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 24 February 2004 - 11:42 PM

ok, first edition of the installer for the latest version of UFO2000 (publish it only as the .exe and not zipped. i just zip it so the board doesn't screw it up). next edition should have Cpl. Facehugger's feature (you tell it where you have x-com and the installer copies the files for you).
any changes you want, from small to big, or installers for other things, just ask and i'll implement them.

Thanks, it works fine. But a nis script instead of the binary would be better. I tried to make new versions release process as simple as possible, so now you can make win32 binary distributive from the game sources just simply typing 'make binary-zip' (mingw gcc compiler should be already installed in your system and a set of the libraries required by the game should be downloaded and installed too). It would be a good idea to add a new target 'win32-installer' to a makefile.

Also, NSIS supports modern user interface and there are some free tools for helping in making good looking installers using it. That's not a critical requirement but if it is not too difficult, could you look at it?

You are right, Cpl. Facehugger's feature would be good. By the way, x-com collector's edition (the latest version of x-com that works in windows) has installer, so it stores some information in the windows registry and so it can be probably located from ufo2000 installer. Another cool feature would be additional checkbox for downloading and installing data files from x-com demo if the user does not have a full version of x-com. It can be done using downloader plugin, some unzip utility (or DLL) will be also required. You can ask: why not include x-com demo data files directly into installer? I just do not know if we can have legal problems in this case, optional download from microprose's ftp at user's request seems ok to me.

Thanks again, making good installers is not so easy as it seems at first sight, so I really do appreciate your work.
ufo2000 development team
http://ufo2000.sourceforge.net

#13 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 25 February 2004 - 01:38 PM

Thanks, it works fine. But a nis script instead of the binary would be better. I tried to make new versions release process as simple as possible, so now you can make win32 binary distributive from the game sources just simply typing 'make binary-zip' (mingw gcc compiler should be already installed in your system and a set of the libraries required by the game should be downloaded and installed too). It would be a good idea to add a new target 'win32-installer' to a makefile.

Also, NSIS supports modern user interface and there are some free tools for helping in making good looking installers using it. That's not a critical requirement but if it is not too difficult, could you look at it?

You are right, Cpl. Facehugger's feature would be good. By the way, x-com collector's edition (the latest version of x-com that works in windows) has installer, so it stores some information in the windows registry and so it can be probably located from ufo2000 installer. Another cool feature would be additional checkbox for downloading and installing data files from x-com demo if the user does not have a full version of x-com. It can be done using downloader plugin, some unzip utility (or DLL) will be also required. You can ask: why not include x-com demo data files directly into installer? I just do not know if we can have legal problems in this case, optional download from microprose's ftp at user's request seems ok to me.

Thanks again, making good installers is not so easy as it seems at first sight, so I really do appreciate your work.

after i make the changes i'll give you the NIS script. what do you mean with "It would be a good idea to add a new target 'win32-installer' to a makefile."? that the script should put the installer makefile in a 'win32-installer' folder?

sure, i have no problems on using the modern interface, i just used the simple one because it's the most common one. i already have a good tool: Venis IX. maybe i'll make it look more xcom-ish by customizing the buttons and stuff ;)

i didn't know that. that truly makes adding the feature much easier. that way the installer can look for any XCOM/XCOMDEMO/TFTD/TFTDDEMO installations and pop up something like "X-Com: UFO Defense was found in C:\XXX. Is this correct?". If it is it copies the files to UFO2000. obviously if the user has the DOS version he would have to do the installation manually (his own fault for not having CE :P ).
Hmmm... "Do you want to download the demo?" would pop up if no X-Com copies were found, although that will probably require much more work so I'll work on it last.
anyways, expect a new installer version soon :)

edit: btw, i got UFO2000 working by reinstalling X-Com Collector's Edition. it probably was the fault of XcomUtil modifying some of the files.

edit2: i can't find any registry entries for x-com/tftd so if u can find them please tell me where they are for me to implement the feature.

Edited by SupSuper, 25 February 2004 - 02:18 PM.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#14 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 25 February 2004 - 06:17 PM

installer with modern ui. NSI file needs the header.bmp file and a ufo2000 build (check comments on NSI file) to compile.
to compile just install NSIS (http://nsis.sourceforge.net/) and compile it (right-click > Compile NSIS Script) ^_^

Attached Files


too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#15 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 28 February 2004 - 01:47 AM

Thanks, it works fine.

The only thing it still needs added is displaying a message that installation is still not complete and the user needs to copy all the necessery x-com data files to a specific directory manually after install. Otherwise we will have many reports about "broken installer" that does not install the game correctly. Another option is to implement Cpl. Facehugger's feature :)

I'm preparing a new release of ufo2000 now and I hope it will be ready on Monday. I have plans for using your new installer for it.
ufo2000 development team
http://ufo2000.sourceforge.net

#16 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 28 February 2004 - 08:06 AM

well, i haven't found out how to implement custom dialogs (specially ones which ask you for the directory of X game) and it doesn't seem that x-com/tftd add registry settings, so for now i'll add a note in the finish screen.

edit: here's the installer with the note. use it on your next release and don't forget to put that it was made by me, eh? ;)

Attached Files


Edited by SupSuper, 28 February 2004 - 10:32 AM.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#17 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 29 February 2004 - 11:47 PM

well, i haven't found out how to implement custom dialogs (specially ones which ask you for the directory of X game) and it doesn't seem that x-com/tftd add registry settings, so for now i'll add a note in the finish screen.

You can try to make your own plugin which performs recursive search for x-com data files on hard drive. There are lots of plugins made for NSIS and they come with sources (all these sources are installed with NSIS).
Another small problem is that NSIS downloader plugin supports only HTTP and x-com demo is available on FTP. We need to locate a mirror of this demo on HTTP or or mirror it ourselves.

here's the installer with the note. use it on your next release and don't forget to put that it was made by me, eh? ;)

Sure, everyone who contributed anything valuable is credited. :)
And if I ever forget to add anybody to credits, just remind me.
ufo2000 development team
http://ufo2000.sourceforge.net

#18 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 02 March 2004 - 04:03 AM

been messing around with plugins (they're real handy) so i'm making a majorly improved version of the installer. improved as in, it's got the custom page where you put down x-com folders, it can download and install x-com demo, etc.
btw could u host the x-com demo on an HTTP server (maybe on http://ufo2000.sourceforge.net ) and without any setups or self-extracters, just a zipped demo (so it's easier for the installer to "install" it)?

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#19 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 02 March 2004 - 07:37 AM

Anyways, here's v1.2 of the installer with some major improvements and what I officially call "Cpl. Facehugger's feature" :P
As usual, the installer is only the ufo2000.exe, all the other files are for compiling the ufo2000.nsi. i guess i can add NSIS to my "Installers I can make" list ;)
Now all that's missing is the Download X-Com Demo section which will be done as soon as you host it somewhere.

edit: btw, why doesn't the Muton skin in UFO2000 have an image in the equip screen? you could just get it from the ufopedia, no?

Attached Files


Edited by SupSuper, 02 March 2004 - 07:38 AM.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#20 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 02 March 2004 - 10:55 AM

btw could u host the x-com demo on an HTTP server (maybe on http://ufo2000.sourceforge.net ) and without any setups or self-extracters, just a zipped demo (so it's easier for the installer to "install" it)?


I found a link for http download for x-com demo: http://freelancer.ag...mo/xcomdemo.zip

To make things completely easier we could add all the x-com demo data files to the installer :)

But as I said before, this probably can cause legal problems. As x-com demo does not have license agreement included and it is already mirrored on some web sites, we decided that distributing this demo in unmodified form will not cause any problems. Executable file inside of this demo archive is just an ordinary zip sfx archive, it can be unzipped just fine by any unzip utility, so the required data files are just under two layers of zip compression.
ufo2000 development team
http://ufo2000.sourceforge.net

#21 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 04 March 2004 - 06:55 PM

ok, fully featured (and tested) installer. any other improvements i might do to it is improve it's UI (make it look more x-com-ish) or make the components screen be more useful. like, actually having optional components to reduce the space the game occupies on the hard disk (but you would have to tell me if the game has any optional files so it can be splitted into components). that way i could also add installation types (Typical, Compact, Custom, Typical + X-Com Demo).
also updated installer with latest ufo2000 release. btw, it uses the zipdll.dll plugin, get it from the nsis website.
anyways, if you want any other type of changes, just ask. i don't find it easy, but i don't find it hard either :P

Attached Files


Edited by SupSuper, 04 March 2004 - 07:21 PM.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#22 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 05 March 2004 - 11:45 AM

A new version of installer is very good, I liked it.

The only problem I have detected so far is a problem with long file names of install directory and downloading x-com demo. For example if I try to install the game to C:\Program Files\UFO2000, I get x-com demo extracted to C:\PROGRAM\UFO2000\XCOMDEMO, so the game can't find the needed data files and start.

Looks like the problems is with relying on XCOM.EXE to do the job properly (it is a dos executable and it does not support long file names):
ExecWait '"$TEMP\XCOM.EXE" -d "$INSTDIR"'

Another suggestion is to add the following line to nsi-file. It will set compressor to lzma which will reduce the size of installer (but making installer will take longer): SetCompressor lzma

About installation types. I think the most valuable resource is network bandwidth but not the size of the game installed on disk. So I don't think additional sections will be very useful (it is possible not to install the files from newmaps directory, but this will not save much space, anyway, having more options in the installer will not harm if you implement this).

A good thing to add is an optional download of ATeX soundtrack for battlescape (implement it just like downloading x-com demo). But maybe it is worth making two versions of installer, one with the soundtrack and one without it (UFO: AI way). Anyway, the this decision will be more clear after we hear at least some user's feedback.

PS. I'm going to make some fixes to the game on this weekend. Probably it will be proper elevators support. So a new version of your installer will be used soon in the game :)
ufo2000 development team
http://ufo2000.sourceforge.net

#23 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 06 March 2004 - 10:05 AM

my internet connection went crazy, so i couldn't give you the fixed installer yesterday. anyways, here it is. fixed the bug with x-com demo (by making the XCOM.EXE installing to C:\ and the installer moving it to proper place), changed compression, did some tweaking and fixed some bugs with uninstaller :)

Attached Files


too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#24 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 07 March 2004 - 01:54 AM

Thanks, great work done!

Unfortunately my Windows XP died in a horrible way yesterday and does not boot :(
Now I have only Linux running on my computer. So my plans for this weekend are somewhat ruined and looks like I will have to reinstall Windows and other software.

Anyway, a new version of your installer will be added to the game as soon as I fix this problem, thanks for your help again :)

Edit: I have added a topic 'For new UFO2000 developers' http://www.xcomufo.c...?showtopic=3877 with the information about compiling the game and making installer. The sources of the game contain a modified previous version of your installer to make building new installers automated. I will update nsi-script in the game sources to the latest version myself but I thought this information is interesting for you (it is better to make next versions of nsi-script work with the sources of the game out of box if you have plans of improving installer).

Edited by Serge, 07 March 2004 - 02:42 AM.

ufo2000 development team
http://ufo2000.sourceforge.net

#25 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 24 March 2004 - 12:44 PM

The latest version of UFO2000 now uses the last version of your ufo2000.nis script for building installer with some fixes.

It is very good, but there is always available a room for improvement :)

First, it does have ability to download tftd demo (it can be downloaded from http://freelancer.ag.ru/demo/terror.zip)

Second, it depends on unofficial NSIS zip decompression plugin, which is also too heavyweight (160KB because of use of extra relatively heavyweight C++ library).
It makes a bit harder to use instructions from http://www.xcomufo.c...?showtopic=3877 as having plain NSIS is not enough to build an installer, extra step for downloading zipdll plugin is required.
You can look at ZLIB library: http://www.gzip.org/zlib/
It has minizip example which is full featured unzip utility and it is only 40KB when compiled. But do not use 1.2.1 version of ZLIB, looks like it has a bug which prevents from correct decompression of x-com demo distributive, use 1.1.4 instead.

Also, the installer should be as easy to use, as possible. It would be a good feature if it suggested to scan all hard disks and find x-com and tftd installations automatically. If there is no original games found on hard disk, it is time to suggest the user to download x-com demo from internet. It is better to have installer as intuitive to user as possible.

This functionality can be provided by writing our own NSIS plugin with the sources included into UFO2000 sources tree. We will get the following advantages: no dependency on external unofficial plugin, reduced size of plugin (and also the size of installer), external functionality convenient for users (automatic detection of original x-com location).

I do not complain, but I really do think that this all can improve the installer a lot. And these ideas for improvements are inspired by current installer implementation, it is very hard to make a perfect installer from scratch. So having a current version of installer is a big step forward.

It is better to base next versions of install script on a version added to the sources repository in order not to do extra work: http://lxnt.info:888...unk/ufo2000.nsi

What do you think?
ufo2000 development team
http://ufo2000.sourceforge.net

#26 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 04 April 2004 - 06:27 AM

wow, i hadn't noticed this. i've been slacking off :P
let's see...
- ok, an option to download tftd demo. easy to do.
- hmmm... i'll look into that minizip utility.
- the only problems i can see with making the installer search for the game are:
-- it would probably take plenty of time taking in account today's hdd sizes.
-- ufo/tftd have plenty of versions/names/possible modifications. for example, ufo can go from v1.0 to v1.4 or it can be CE, and any of these versions can be named UFO.EXE, Enemy Unknown.exe, UFO Defense.exe (both filename or game title), and any of them can be modified by XcomUtil. so i wouldn't call it an easy task. also, i think UFO2000 doesn't work with ufo/tftd if it has been modified by Xcomutil (thus why i had to put a fresh install for it to work) so you might look into supporting that since many people use ufo/tftd with xcomutil.
- hmmm... i like the polished up script on ufo2000's server, you did some nifty changes so i'll use that one from now on. i see you changed the uninstaller so it will fully remove the UFO2000 folder... i hope the user doesn't keep any "lots of work to make or find" maps to find them disappearing when uninstalling ufo2000 ;)

and... a random thought. what's UFO2000's icon supposed to be? i never figured it out, and i'm very picky about icons :P

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#27 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 05 April 2004 - 10:38 AM

wow, i hadn't noticed this. i've been slacking off :P
let's see...
- ok, an option to download tftd demo. easy to do.

good

- hmmm... i'll look into that minizip utility.


here are direct links to zlib and minizip:
http://www.libpng.or...src/zlib114.zip
http://www.winimage....ll/unzip100.zip

- the only problems i can see with making the installer search for the game are:
-- it would probably take plenty of time taking in account today's hdd sizes.
-- ufo/tftd have plenty of versions/names/possible modifications. for example, ufo can go from v1.0 to v1.4 or it can be CE, and any of these versions can be named UFO.EXE, Enemy Unknown.exe, UFO Defense.exe (both filename or game title), and any of them can be modified by XcomUtil. so i wouldn't call it an easy task. also, i think UFO2000 doesn't work with ufo/tftd if it has been modified by Xcomutil (thus why i had to put a fresh install for it to work) so you might look into supporting that since many people use ufo/tftd with xcomutil.

But the files are also usually larger (avi and mp3 :) ), so the number of files did not increase so much. In fact we do not need to search for x-com executable, we need a set of data files from a number of directories. So when searching hard drive we enter a directory with 'geodata', 'ufograph', 'units', ... subdirectories, there is a good chance that we have found either x-com or tftd. UFO2000 checks crc32 of some data files and it can be used in this search function too (look at 'init-scripts/filecheck.lua')

- hmmm... i like the polished up script on ufo2000's server, you did some nifty changes so i'll use that one from now on. i see you changed the uninstaller so it will fully remove the UFO2000 folder... i hope the user doesn't keep any "lots of work to make or find" maps to find them disappearing when uninstalling ufo2000 ;)

A good observation. Installer is supposed to support version upgrades, so the last version can be unaware of the files left by previous installs, so I thought cleaning everything is a solution. Adding a notice in uninstaller about all files going to be deleted and a suggestion to save everything valuable can probably help.

and... a random thought. what's UFO2000's icon supposed to be? i never figured it out, and i'm very picky about icons :P

Don't know, this icon was used long before I have joined the project. But looks like it is UFO flying in the sky.
ufo2000 development team
http://ufo2000.sourceforge.net

#28 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 24 June 2004 - 05:19 PM

yay, school's over so i finally have time to work on the ufo2000 installer. for starters i've added the option to download tftd demo and did some tweaks like stopping multiple instances of the installer and adding the GNU license agreement in a License page (other games do that so i thought UFO2000 should too).
i'm thinking about the "making our own plugins" for NSIS to search for UFO/TFTD or to make a smaller ZIP file, but i've been looking around and... well, it's really not my kind of thing so maybe you could get someone else to do those plugins or i'll just work without them.
i've been exploring around the NSIS archive and i found a script which can search for files without need for any plugins, you just need to tell it where to start searching and what file to look for. thus, we come to how do you want the whole thing to work? i mean, what file(s) does it search for? does it ask the user if it wants to search for the game, or just add a Search option to the Select X-Com Folder page? does the installer ask where to search for the game in (most likely)? etc, etc. i need all sorts of details on that :)

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#29 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 25 June 2004 - 10:40 AM

Excellent.

Including the license text and an option to download and install tftd demo data files would be a good improvement, should be not too difficult to do and is immediately useful.

Ideally UFO2000 installer should be intuitive and easy to use. Probably it is better to make it look like a wizard which will guide the user through all the needed steps.

The installer can do two things: install or upgrade.

When installing the game, it can give the user 3 options:
  • specify x-com and tftd data files location
  • automatically search for x-com and tftd data files
  • download and install data files from x-com and tftd demos
It would be very good to have the possibility to verify if the specified data files are valid (using crc32 checksums provided in 'init-scripts/filecheck.lua'), the same code can be used when searching for data files (when we find a directory with the subdiractories ''ufodata", "geograph" and so on, it is a good chance that we have found either x-com or tftd). The installer should not proceed further until it has a valid set of data files available! The last option that should work everywhere are the data files from x-com demo.

When upgrading the game to a new version, we can explicitly tell about this to the user (otherwise many people would try uninstall old and then install new version, losing configured options and team settings). There is no need to install x-com data files in this case (they should be already installed) and this step can be skipped.

Plugin for NSIS that checks if the directory contains data files from x-com, tftd or neither of them is fairly easy to make (I can make it myself if you are not very good with C/C++).
ufo2000 development team
http://ufo2000.sourceforge.net

#30 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 25 June 2004 - 06:32 PM

Including the license text and an option to download and install tftd demo data files would be a good improvement, should be not too difficult to do and is immediately useful.

And I've implemented it :)

Ideally UFO2000 installer should be intuitive and easy to use. Probably it is better to make it look like a wizard which will guide the user through all the needed steps.

The installer can do two things: install or upgrade.

When installing the game, it can give the user 3 options:

  • specify x-com and tftd data files location




  • automatically search for x-com and tftd data files




  • download and install data files from x-com and tftd demos

something like this perhaps (see attachment)?
don't worry about text, i just couldn't come up with anything :P

It would be very good to have the possibility to verify if the specified data files are valid (using crc32 checksums provided in 'init-scripts/filecheck.lua'), the same code can be used when searching for data files (when we find a directory with the subdiractories ''ufodata", "geograph" and so on, it is a good chance that we have found either x-com or tftd). The installer should not proceed further until it has a valid set of data files available! The last option that should work everywhere are the data files from x-com demo.

right, then until you make the crc-check plugin i'll just make the script for a folder with "ufodata", "geograph", etc.

When upgrading the game to a new version, we can explicitly tell about this to the user (otherwise many people would try uninstall old and then install new version, losing configured options and team settings). There is no need to install x-com data files in this case (they should be already installed) and this step can be skipped.

i thought the installer automatically upgraded. i installed a recent version of ufo2000 on my old one and it didn't remove my settings.
still, we can always make the installer store version number in registry. that way it could later check if a older (or newer) version of UFO2000 is already installed and upgrade accordingly.

Plugin for NSIS that checks if the directory contains data files from x-com, tftd or neither of them is fairly easy to make (I can make it myself if you are not very good with C/C++).

i'm just good with code-like stuff (such as NSIS script) not much of a programmer, so you better do it ;)

Attached Thumbnails

  • options.gif

Edited by SupSuper, 25 June 2004 - 06:36 PM.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#31 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 26 June 2004 - 11:14 AM

When upgrading the game to a new version, we can explicitly tell about this to the user (otherwise many people would try uninstall old and then install new version, losing configured options and team settings). There is no need to install x-com data files in this case (they should be already installed) and this step can be skipped.

i thought the installer automatically upgraded. i installed a recent version of ufo2000 on my old one and it didn't remove my settings.
still, we can always make the installer store version number in registry. that way it could later check if a older (or newer) version of UFO2000 is already installed and upgrade accordingly.

Right, it is true. It currently upgrades just fine, but maybe the installer should tell the user about this and do not ask for downloading x-com demo files.

Plugin for NSIS that checks if the directory contains data files from x-com, tftd or neither of them is fairly easy to make (I can make it myself if you are not very good with C/C++).

i'm just good with code-like stuff (such as NSIS script) not much of a programmer, so you better do it ;)

OK, I'll make this plugin and will notify you when it is ready.
Until it is ready (I don't know when I can find time for making it), you can try to experiment with these install/upgrade features of the installer and get a final working version with the license and tftd demo download option. It would still be an improvement over the current version of installer.
ufo2000 development team
http://ufo2000.sourceforge.net

#32 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 28 June 2004 - 04:39 PM

after a long day's work i've got the installer done. it can search for x-com, tftd or demo in your computer, download tftd demo, show license agreement, hide certain pages when upgrading and lots of other tweaks. heck, it just doesn't make coffee :P
zipped are the nsi script and all the ini files for the new InstallOptions dialogs. didn't include a build because it's quite big to upload and you can make it yourself.
also, another plugin is needed: Dialogs.dll - for the Browse Folder window in the search page (you can get the plugin here). and if you want to test out the new pages you have to either uninstall ufo2000 or comment out the code that skips said pages when ufo2000 is installed. oh, and feel free to edit the text on the custom pages if you find it necessary, my english isn't too good.
btw, there's a bug which i can't figure out why it happens: no matter what you select on the new Download X-Com Demo page, the installer nevers downloads any of the demos. maybe you could find out why it doesn't work, otherwise i'll ask on the NSIS Forums.

Attached Files


Edited by SupSuper, 28 June 2004 - 04:45 PM.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#33 Twilight Owl

Twilight Owl

    Project Member: UFO 2000

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 28 June 2004 - 05:10 PM

i have a suggestion (a bit late, i think, but better late then never :))
maybe you can place links to additional resources (new maps, new music, etc.) at the end of the installer? or even make an option to download them (links can be taken from the wiki pages)?
Sorry for my English :)

Posted Image
UFO2000 team
[programmer, map maker]

#34 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 29 June 2004 - 04:58 AM

i have a suggestion (a bit late, i think, but better late then never :))
maybe you can place links to additional resources (new maps, new music, etc.) at the end of the installer? or even make an option to download them (links can be taken from the wiki pages)?

i don't think you can add links to text in NSIS. i could add options, but IMHO it could become big and i think it's just putting too much into the installer. i mean, if ppl want extras they can go get them on the website. installer just provides a fully-functional UFO2000 for windows, extras are usually something separate.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#35 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 30 June 2004 - 12:03 PM

I tried to make a new installer using this new script, but looks like it is not working as expected :(
New search x-com data files options are not available even though I did uninstall a previous version of UFO2000. I did not have time playing with it more right now and will try to make another attempt to make it work a bit later.

By the way, do you have the latest development sources of the game and mingw compiler installed?
Can you try to experiment with making installers for the latest development versions?
ufo2000 development team
http://ufo2000.sourceforge.net

#36 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 30 June 2004 - 12:52 PM

I tried to make a new installer using this new script, but looks like it is not working as expected :(
New search x-com data files options are not available even though I did uninstall a previous version of UFO2000. I did not have time playing with it more right now and will try to make another attempt to make it work a bit later.

By the way, do you have the latest development sources of the game and mingw compiler installed?
Can you try to experiment with making installers for the latest development versions?

Well I did some tweaks to the script. Now you just need to choose a different folder than the one you have UFO2000 installed on (basically rename the default folder) for the new pages to pop up. I also added a Cancel button to the "X-Com was found here: C:\XXX. Is this correct?" dialog(s).

No I don't. Where can I get the source and compiler?

Attached Files


too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#37 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 01 July 2004 - 02:45 AM

No I don't. Where can I get the source and compiler?

It is explained here: http://www.xcomufo.c...?showtopic=3877
But if you have any problems or questions, just ask.
ufo2000 development team
http://ufo2000.sourceforge.net

#38 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 02 July 2004 - 09:16 AM

ok, i got the source and all of the files/programs needed as instructed in the thread, but i can't compile it. you say to just run 'make' from the ufo2000 sources directory but all i get is a message saying "make is an invalid command"

btw here's the nsis-plugins.zip with the new plugin needed to compile the installer, just so you put it up along with the new script.

Attached Files


too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#39 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 03 July 2004 - 01:00 AM

ok, i got the source and all of the files/programs needed as instructed in the thread, but i can't compile it. you say to just run 'make' from the ufo2000 sources directory but all i get is a message saying "make is an invalid command"


Mingw and MSYS bin directories must be in your PATH environment variable. Installing these tools in Win2K/XP should do this automatically, installing in Win98 can probably require editing autoexec.bat

btw here's the nsis-plugins.zip with the new plugin needed to compile the installer, just so you put it up along with the new script.


Thanks, I'll check this.
ufo2000 development team
http://ufo2000.sourceforge.net

#40 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 03 July 2004 - 02:32 PM

Mingw and MSYS bin directories must be in your PATH environment variable. Installing these tools in Win2K/XP should do this automatically, installing in Win98 can probably require editing autoexec.bat

well i have WinXP and they weren't added, so now i put them in and it works :)
however, whenever i use 'make win32-installer' i get the error "svn: Inconsistent line endings in source stream" :wacko:

also, with the help of the NSIS forums, i fixed the demo bug and done some tweaking to the NSIS script so it should fully work now :)

Attached Files


Edited by SupSuper, 03 July 2004 - 02:37 PM.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#41 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 13 July 2004 - 02:38 PM

Sorry for a long delay with the answer. Looks like I still have the same problems (see post #35) :(
Don't know if the installer is not built correctly or it just does not work on my system.
Can you make an installer and put it for download, so I can see how it should work?
Also probably it can be just one of ini-files missing or a wrong directory structure or something.

As for "svn: Inconsistent line endings in source stream", it is just mixed DOS and UNIX line endings in ufo2000.nsi file (CRLF and LF). Just convert all the line endings to CRLF and it will work. Also it can complain to empty newmusic directory - just put some dummy file into it and do 'svn add dummyfile', it is better to apply the same 'svn add' command to all the new nsis ini files but I'm not sure if it is really required. Two files were renamed (geodata.default.dat and armoury.default.set to geodata.default.lua and armoury.default.lua respectively).

The final goal is to put this new nsi script to the repository and use it for building new installers using it. If you manage to build a correct installer in a working copy with ufo2000 sources, can you put all these files for download somewhere?
ufo2000 development team
http://ufo2000.sourceforge.net

#42 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 14 July 2004 - 06:11 PM

Sorry for a long delay with the answer. Looks like I still have the same problems  (see post #35) :(
Don't know if the installer is not built correctly or it just does not work on my system.
Can you make an installer and put it for download, so I can see how it should work?
Also probably it can be just one of ini-files missing or a wrong directory structure or something.

As for "svn: Inconsistent line endings in source stream", it is just mixed DOS and UNIX line endings in ufo2000.nsi file (CRLF and LF). Just convert all the line endings to CRLF and it will work. Also it can complain to empty newmusic directory - just put some dummy file into it and do 'svn add dummyfile', it is better to apply the same 'svn add' command to all the new nsis ini files but I'm not sure if it is really required. Two files were renamed (geodata.default.dat and armoury.default.set to geodata.default.lua and armoury.default.lua respectively).

The final goal is to put this new nsi script to the repository and use it for building new installers using it. If you manage to build a correct installer in a working copy with ufo2000 sources, can you put all these files for download somewhere?

<{POST_SNAPBACK}>

yeah i'll make a installer with the version i've got (until i can compile the installer with the latest one) and put it up somewhere.

what are CRLF and LF line endings? and yes i noticed files were renamed and yes it complains about blank folder i'll put something in it.

yeah sure, no problem.

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#43 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 16 July 2004 - 09:32 AM

what are CRLF and LF line endings? and yes i noticed files were renamed and yes it
complains about blank folder i'll put something in it.

Unix and DOS(Windows) use different character sequences to separate lines in a text file. DOS uses two characters (ASCII codes 13 and 10), Unix uses only a single character (ASCII code 10). There are tools to convert files from one format to another (search for dos2unix and unix2dos utils). Anyway, I have attached a line endings corrected version of your last ufo2000.nsi file.

I have also added empty readme.txt file into newmusic subdirectory on repository (along with some other improvements, see changelog). If you did not subscribe to ufo2000 mailing list yet, I recommend you to do this as notifications about source repository commits are posted there and you can be always aware about what and when has changed in the sources of the game.

You can update your working copy to the latest revision by running svn update in the directory with ufo2000 sources.

Attached Files


ufo2000 development team
http://ufo2000.sourceforge.net

#44 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 16 July 2004 - 06:34 PM

ummm... now that i updated ("svn update") the files i always get lots of errors when trying to make anything.

Attached Thumbnails

  • zoiks.GIF

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#45 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 17 July 2004 - 07:04 AM

ummm... now that i updated ("svn update") the files i always get lots of errors when trying to make anything.

Don't know what happened :huh?: It should work fine.
Did you install any other compilers? Probably when you type 'make' it could run make utility from some other compiler tools. Please try running 'make --version', if it is a correct gnu make utility from msys, it should output something like this:
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-msys
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
	Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-make@gnu.org>.

Can you run svn status makefile? If it is indicated as modified (file is listed with letter M before file name), do svn revert makefile to restore it to the correct state.

Also you can try to run MSYS console (it has an icon looking like big blue letter M) and compile the game from it. Start it, type 'cd C:\SupFiles\ufo2000src', and then 'make'.
ufo2000 development team
http://ufo2000.sourceforge.net

#46 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 17 July 2004 - 07:57 AM

ummm... now that i updated ("svn update") the files i always get lots of errors when trying to make anything.

Don't know what happened :huh?: It should work fine.
Did you install any other compilers? Probably when you type 'make' it could run make utility from some other compiler tools.

<{POST_SNAPBACK}>

you're right, it was running 'make' from Borland Delphi (recently installed) so i just reordered the paths of both compilers so the MSYS one was used.
now the only problem i get is that the compiler doesn't find 'makensis' (make: makensis: Command not found) . i've tried adding NSIS's folder (which contains makensis.exe) to the PATH variable in Windows but it still doesn't work.
i tried compiling it manually (as in compiling it with NSIS instead of using the 'make win32-installer' command) but i get errors with the %VERSION_ID% bit (which, if i guess, it's a variable that the compiler creates with the version of ufo2000)

too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#47 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 17 July 2004 - 08:08 AM

now the only problem i get is that the compiler doesn't find 'makensis' (make: makensis: Command not found) . i've tried adding NSIS's folder (which contains makensis.exe) to the PATH variable in Windows but it still doesn't work.

PATH variable change takes effect only when you restart application, so try closing the console and then start it again. I do not see any other reason why it can't find makensis.exe

i tried compiling it manually (as in compiling it with NSIS instead of using the 'make win32-installer' command) but i get errors with the %VERSION_ID% bit (which, if i guess, it's a variable that the compiler creates with the version of ufo2000)

Right, when building the installer, this string is substituted with the correct version string. You can manually search & replace it with something appropriate when manually compiling the installer.
ufo2000 development team
http://ufo2000.sourceforge.net

#48 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 17 July 2004 - 10:20 AM

now the only problem i get is that the compiler doesn't find 'makensis' (make: makensis: Command not found) . i've tried adding NSIS's folder (which contains makensis.exe) to the PATH variable in Windows but it still doesn't work.

PATH variable change takes effect only when you restart application, so try closing the console and then start it again. I do not see any other reason why it can't find makensis.exe

<{POST_SNAPBACK}>

thanks, that fixed it :)
new and all fixed up NSIS script (and needed INIs) are attached to this post (try building with this one, you shouldn't run into any trouble with the new stuff now). also, you can get the latest build of the installer here (the webpage is just to bypass lycos's external linking message)

Attached Files


too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image


#49 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 18 July 2004 - 07:26 AM

new and all fixed up NSIS script (and needed INIs) are attached to this post (try building with this one, you shouldn't run into any trouble with the new stuff now). also, you can get the latest build of the installer


Well, everything is much better now. At least now I can build the installer and see the select option screen (just like the installer binary that you have put for download works). Now it contains all the needed features and is a big improvement over previous version.

Now about the problems. First, looks like you have downgraded ZIPDLL plugin from version 1.2.2a to 1.2 (and changed ZIPDLL_EXTRACT to MUI_ZIPDLL_...), probably it is better to use the latest version. One of the major problems that I have noticed is that it does not copy data files to ufo2000 directory. So the user selects correct directory, finishes installation, tries to run the game and oops - it does not run :(

Well, I have updated nsis-plugins.zip and added your *.ini files to the repository as they do not break the old version of installer. But ufo2000.nsi needs some more work and testing.

By the way, you can submit your changes to the installer script as patches, just run svn diff > patchfile.diff in ufo2000 sources directory and send patchfile.diff to me (to serge@lxnt.info). That is a bit easier.
ufo2000 development team
http://ufo2000.sourceforge.net

#50 SupSuper

SupSuper

    Programming Department

  • Xenocide Programming Department
  • 2,418 posts

Posted 18 July 2004 - 11:07 AM

heh the minute i got a mail with this:
"Log: Initial set of files needed to build new verison of installer
(new ufo2000.nsi is still on hold until SupSuper fixes some
really bad bugs)"
i thought "really bad bugs?!?". i had to go check.

updated my copy of the ZipDLL plugin and i changed the macro to MUI_ZIPDLL_... because that's the way it should be used with the Modern UI (as it seems).
also, the files not being copied was a minor bug (easy to fix). i had just forgot to change the script to copy the files from the new variables $XCOM_FOLDER, $TFTD_FOLDER, etc. instead of the old ones :P so it works fine now. so here's the latest (hopefully final) script (just remove the .txt bit)

and... mailed you the patchfile.diff :)

Attached Files


too bad, now you will never know the ancient secrets of supsupers long gone avatar ;)

Posted Image