Giel van Schijndel schreef:
> Dennis Schridde schreef:
>
>> Am Mittwoch, 27. Dezember 2006 04:27 schrieb Giel van Schijndel:
>>
>>
>>> ${DEVDIR} is a commandline passed variable, it is taken from DEVDIR in
>>> makerules/config.mk
>>> The reason I use ${DEVDIR} is because those files (or its sources for
>>> that matter) aren't contained in the repository (refers to the
>>> WZ-devpackage directory).
>>>
>>> The places where ../ is used is where the file is to be found in the
>>> repository or compiled from it.
>>>
>>> And yes it is indeed possible to pass variables to makensis just use
>>> "/Dvarname=value". Make sure to include it in quotes as shown though
>>> because it otherwise can't deal with spaces at all. Then inside the
>>> script refer to that value like this: ${varname}.
>>>
>>> As for version info you could use this (except the current comment that
>>> is): VIProductVersion "9.9.9.9" ; Version number provided here
>>> has to be in n.n.n.n format where n is any unsigned integer
>>> VIAddVersionKey "CompanyName" "Warzone Resurrection Project"
>>> VIAddVersionKey "FileDescription" "Warzone 2100 Installer"
>>> VIAddVersionKey "FileVersion" "TRUNK"
>>> VIAddVersionKey "InternalName" "Warzone 2100"
>>> VIAddVersionKey "LegalCopyright" "© 2006 Warzone Resurrection
>>> Project"
>>> VIAddVersionKey "ProductName" "Warzone 2100"
>>> VIAddVersionKey "ProductVersion" "TRUNK"
>>> VIAddVersionKey "Comments" "LALALALALALALA"
>>>
>>>
>> What do you think about this?
>> http://nsis.sourceforge.net/Version_Info_manipulations_on_compile-time
>>
>> He seems to produce an .rc from an allready compiled .exe, but we allready
>> got
>> the .rc, so we could skip all that reshacker stuff. I still don't exactly
>> know how it works, though. :(
>>
> Looks very promising, I'll look into it.
Now it doesn't look as promising as I initially thought it did.
Yes, it does extract the .rc from the .exe using ResHacker this only to
do some string processing to retrieve the version number.
The second part is used to retrieve a .res file from the .exe (windres
produces a .res also if you want by compiling a .rc file).
So both of these two things we could do without using ResHacker.
What it does then however is using ResHacker to produce the EXE header
(contains all the windows resource stuff). And besides that this is a
truly unreliable way of incorporating your version information into the
final executable. It also depends on an external tool not part of NSIS
while NSIS itself can do the job, i.e. using all those VIAddVersionKey
statements, and as such adding more complexity to the required toolchain
needlessly.
So my vote goes for simply using the VIAddVersionKey statement in
combination with the command line definitions ${VERSION} and ${VERSIONNUM}.
PS I notice that the last patch doesn't yet fully comply with the
VIProductVersion statement (which requires a string in x.x.x.x format as
parameter). So attached one should fix this as well.
--
Giel
Index: makerules/config.mk.tmpl
===================================================================
--- makerules/config.mk.tmpl (revision 576)
+++ makerules/config.mk.tmpl (working copy)
@@ -1,5 +1,7 @@
# Version of Warzone you are compiling
-#VERSION=\"0.0.0\"
+#VERSION=0.0.0
+# Version in x.x.x.x format
+#VERSIONNUM=0.0.0.0
# Platform you are running
#PLATFORM=windows
Index: makerules/configure.mk
===================================================================
--- makerules/configure.mk (revision 576)
+++ makerules/configure.mk (working copy)
@@ -48,7 +48,7 @@
# Setup paths and static values
-CFLAGS+=-m32 -DVERSION=$(VERSION) -DYY_STATIC -I.. -I../.. -I$(DEVDIR)/include
+CFLAGS+=-m32 -DVERSION=\"$(VERSION)\" -DYY_STATIC -I.. -I../..
-I$(DEVDIR)/include
LDFLAGS+=-L$(DEVDIR)/lib
Index: nsis/Makefile.raw
===================================================================
--- nsis/Makefile.raw (revision 576)
+++ nsis/Makefile.raw (working copy)
@@ -8,7 +8,7 @@
all: $(SETUPFILE)
$(SETUPFILE): warzone2100.nsi ../src/warzone2100.exe ../data/warzone.wz
../data/mp.wz ../data/grim.wz
- makensis "/DVERSION=$(VERSION)" "/DVERSIONNUM=$(VERSION)"
"/DLIBDIR=$(DEVDIR)\lib" "/DSRCDIR=..\src" "/DDATADIR=..\data" "/DMISCDIR=.." $<
+ makensis "/DVERSION=$(VERSION)" "/DVERSIONNUM=$(VERSIONNUM)"
"/DLIBDIR=$(DEVDIR)\lib" "/DSRCDIR=..\src" "/DDATADIR=..\data" "/DMISCDIR=.." $<
clean:
$(RM) $(SETUPFILE)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Warzone-dev mailing list [email protected] https://mail.gna.org/listinfo/warzone-dev
