prepared niminst for win64 target
This commit is contained in:
parent
4a9e07a47c
commit
8f66c99f07
3 changed files with 50 additions and 14 deletions
|
|
@ -53,7 +53,7 @@ when defined(windows):
|
||||||
elif defined(macosx):
|
elif defined(macosx):
|
||||||
const LIB_CAIRO* = "libcairo.dylib"
|
const LIB_CAIRO* = "libcairo.dylib"
|
||||||
else:
|
else:
|
||||||
const LIB_CAIRO* = "libcairo.so"
|
const LIB_CAIRO* = "libcairo.so(|.2)"
|
||||||
|
|
||||||
type
|
type
|
||||||
PByte = cstring
|
PByte = cstring
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,43 @@ SET LINK_FLAGS=?{c.linker.flags}
|
||||||
|
|
||||||
REM call the compiler:
|
REM call the compiler:
|
||||||
|
|
||||||
# var linkCmd = ""
|
IF EXIST %SystemRoot%\SysWOW64 GOTO :Win64
|
||||||
# for ff in items(c.cfiles[1][1]):
|
|
||||||
# let f = ff.replace('/', '\\')
|
ECHO Building for Win32
|
||||||
|
|
||||||
|
# block win32:
|
||||||
|
# var linkCmd = ""
|
||||||
|
# for ff in items(c.cfiles[1][1]):
|
||||||
|
# let f = ff.replace('/', '\\')
|
||||||
ECHO %CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
|
ECHO %CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||||
%CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
|
%CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||||
# linkCmd.add(" " & changeFileExt(f, "o"))
|
# linkCmd.add(" " & changeFileExt(f, "o"))
|
||||||
# end for
|
# end for
|
||||||
|
|
||||||
ECHO %LINKER% %LINK_FLAGS% -o ?{firstBinPath(c)\toLower(c.name)}.exe ?linkCmd
|
ECHO %LINKER% %LINK_FLAGS% -o ?{firstBinPath(c)\toLower(c.name)}.exe ?linkCmd
|
||||||
%LINKER% %LINK_FLAGS% -o ?{firstBinPath(c)\toLower(c.name)}.exe ?linkCmd
|
%LINKER% %LINK_FLAGS% -o ?{firstBinPath(c)\toLower(c.name)}.exe ?linkCmd
|
||||||
|
|
||||||
|
# end block
|
||||||
|
|
||||||
|
GOTO :end
|
||||||
|
|
||||||
|
:Win64
|
||||||
|
ECHO Building for Win64
|
||||||
|
|
||||||
|
# block win64:
|
||||||
|
# var linkCmd = ""
|
||||||
|
# for ff in items(c.cfiles[1][2]):
|
||||||
|
# let f = ff.replace('/', '\\')
|
||||||
|
ECHO %CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||||
|
%CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||||
|
# linkCmd.add(" " & changeFileExt(f, "o"))
|
||||||
|
# end for
|
||||||
|
|
||||||
|
ECHO %LINKER% %LINK_FLAGS% -o ?{firstBinPath(c)\toLower(c.name)}.exe ?linkCmd
|
||||||
|
%LINKER% %LINK_FLAGS% -o ?{firstBinPath(c)\toLower(c.name)}.exe ?linkCmd
|
||||||
|
|
||||||
|
# end block
|
||||||
|
|
||||||
|
:end
|
||||||
|
|
||||||
ECHO SUCCESS
|
ECHO SUCCESS
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# The Nimrod Installation Generator
|
||||||
|
# (c) Copyright 2012 Dominik Picheta
|
||||||
|
#
|
||||||
|
# See the file "copying.txt", included in this
|
||||||
|
# distribution, for details about the copyright.
|
||||||
|
#
|
||||||
|
|
||||||
import osproc, times, os, strutils
|
import osproc, times, os, strutils
|
||||||
|
|
||||||
# http://www.debian.org/doc/manuals/maint-guide/
|
# http://www.debian.org/doc/manuals/maint-guide/
|
||||||
|
|
@ -13,8 +22,9 @@ type
|
||||||
buildDepends*, pkgDepends*, shortDesc*: string
|
buildDepends*, pkgDepends*, shortDesc*: string
|
||||||
licenses*: seq[tuple[files, license: string]]
|
licenses*: seq[tuple[files, license: string]]
|
||||||
|
|
||||||
template addN(r: string): expr =
|
template addN(r: string) =
|
||||||
result.add(r & "\n")
|
result.add(r)
|
||||||
|
result.add("\n")
|
||||||
|
|
||||||
proc createControl(pkgName, maintainer, shortDesc, desc: string,
|
proc createControl(pkgName, maintainer, shortDesc, desc: string,
|
||||||
buildDepends, pkgDepends: string = ""): string =
|
buildDepends, pkgDepends: string = ""): string =
|
||||||
|
|
@ -132,9 +142,9 @@ proc assertSuccess(exitCode: int) =
|
||||||
doAssert(exitCode == QuitSuccess)
|
doAssert(exitCode == QuitSuccess)
|
||||||
|
|
||||||
proc prepDeb*(packName, version, mtnName, mtnEmail, shortDesc, desc: string,
|
proc prepDeb*(packName, version, mtnName, mtnEmail, shortDesc, desc: string,
|
||||||
licenses: seq[tuple[files, license: string]], binaries,
|
licenses: seq[tuple[files, license: string]], binaries,
|
||||||
config, docs, lib: seq[string],
|
config, docs, lib: seq[string],
|
||||||
buildDepends, pkgDepends = "") =
|
buildDepends, pkgDepends = "") =
|
||||||
## binaries/config/docs/lib: files relative to nimrod's root, that need to
|
## binaries/config/docs/lib: files relative to nimrod's root, that need to
|
||||||
## be installed.
|
## be installed.
|
||||||
|
|
||||||
|
|
@ -223,5 +233,3 @@ when isMainModule:
|
||||||
@["bin/nimrod"], @["config/*"], @["doc/*"], @["lib/*"],
|
@["bin/nimrod"], @["config/*"], @["doc/*"], @["lib/*"],
|
||||||
"gcc (>= 4:4.3.2)", "gcc (>= 4:4.3.2)")
|
"gcc (>= 4:4.3.2)", "gcc (>= 4:4.3.2)")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue