[Vm-dev] Squeak.rc FILEVERSIONVALUES
Eliot Miranda
eliot.miranda at gmail.com
Wed Sep 19 20:56:06 UTC 2018
Hi Ben,
On Wed, Sep 19, 2018 at 6:17 AM Ben Coman <btc at openinworld.com> wrote:
>
> I tried to build via "build.win32x86/squeak.cog.spur/mvm" but got an error
> with the resource file...
> ```
> i686-w64-mingw32-windres \
> --include-dir ../../platforms/win32/misc \
> -D_WIN32 \
> -DFILEVERSIONVALUES=,,, '-DFILEVERSIONSTRING=\"...\\0\"' \
> -i Squeak.rc \
> -o builddbg/vm/Squeak.res
> ==>
> i686-w64-mingw32-windres: Squeak.rc:7: syntax error
> make[1]: *** [../common/Makefile:296: Squeak.res] Error 1
>
It should look something like this:
Aeolus.oscogvm$ grep FILEVERSIONVALUES build.win32x86/squeak.cog.spur/LOGF
i686-w64-mingw32-windres --include-dir ../../platforms/win32/misc -D_WIN32
-DFILEVERSIONVALUES=2018,8,25,1913
'-DFILEVERSIONSTRING=\"2018.8.25.1913\\0\"' -i Squeak.rc -o
build/vm/Squeak.res
i686-w64-mingw32-windres --include-dir ../../platforms/win32/misc -D_WIN32
-DFILEVERSIONVALUES=2018,8,25,1913
'-DFILEVERSIONSTRING=\"2018.8.25.1913\\0\"' -i build/vm/Squeak.res -o
build/vm/resource.o
where the values are the checkin date of the VM sources as produced by a
compiled program. Here's the rule in common/Makefile.tools:
RCFLAGS:= --include-dir $(PLATDIR)/win32/misc -D_WIN32
-DFILEVERSIONVALUES=$(SVNMAJOR),$(SVNMINOR),$(SVNREV),$(SVNBUILD)
'-DFILEVERSIONSTRING=\"$(SVNMAJOR).$(SVNMINOR).$(SVNREV).$(SVNBUILD)\\0\"'
And here's the rules for them:
SVNMAJOR := $(shell sed -e "s/^static.*GitRawRevisionString.*Rev:
\([0-9][0-9][0-9][0-9]\).*/\\1/p" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h
| sed -e 's/^0*//')
SVNMINOR := $(shell sed -e "s/^static.*GitRawRevisionString.*Rev:
[0-9][0-9][0-9][0-9]\([0-9][0-9]\).*/\\1/p" -e "s/^0*//" -e d
$(PLATDIR)/Cross/vm/sqSCCSVersion.h | sed -e 's/^0*//')
So what I suspect has happened is that you've checked out the sources but
not yet run scripts/updateSCCSVersions which has to be run before compiling
for the first time. [This is IMO a bug with git, which will not embed any
version control info in files on checkin or checkout; one has to use
triggers, which means no info on the first checkout :-( ).
If you /can/ instead of just running scripts/updateSCCSVersions you might
add a rule that will run scripts/updateSCCSVersions if SVNMAJOR ends up
being empty. I'll then adapt that on the Mac builds.
Apologies. This is covered in README.md, but that's hardly a satisfactory
answer.
```
>
> I see a reference at the top of [1] to this for Pharo but no direct
> resolution is mentioned.
> [1] http://forum.world.st/Compiling-the-windows-32-bits-vm-td5072691.html
>
> [Squeak.rc:7](
> https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/build.win32x86/squeak.cog.spur/Squeak.rc#L7)
> is...
> ```
> FILEVERSION FILEVERSIONVALUES
> ```
> and the value ",,," supplied for FILEVERSIONVALUES on the command line
> seems invalid.
>
>
> I see Pharo has hardcoded the value...
> https://www.diffchecker.com/O36vXV5b
>
> https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/build.win32x86/pharo.cog.spur/Pharo.rc#L7
> ```
> FILEVERSION 5,0,0,0
> ```
>
> and if I do the same in Squeak.rc the build completes.
> So should I submit a PR for that, or does anyone know how the command line
> "FILEVERSIONVALUES"
> is supposed to be supplied a proper value? Searching the repo doesn't
> give any hints...
>
> https://github.com/OpenSmalltalk/opensmalltalk-vm/search?q=FILEVERSIONVALUES
>
>
> cheers -ben
>
--
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180919/f1c62d7c/attachment.html>
More information about the Vm-dev
mailing list