How to build Delphi project in Linux through makefile? - delphi

I am trying to port an application written in delphi from windows 32 bit to Linux 64 bit.
Using PAServer I can compile and building the application through Rad Studio.
But Here I am using Makefiles to compile and build in order to achieve automation using jenkins.
In windows the makefile is using few executables from Rad Studio like cgrc.exe , dcc32.exe, bcc32.exe and cl.exe to build the application.
So , what could be the suitable alternative or option for those executables to build my application in Linux through makefile (using jenkins).
Any help on this is appreciated.

Related

How to build a Windows driver development kit 7 on 10

I am trying to build a Windows driver for a piece of hardware I am using. The build notes seem dated as they specify using DDK for Win7. I have Windows kit version 10. Are these the same thing just later version? The instructions then state to open a DDK command window environment then use "build -ceZ" in the dir where the files are located. Does v10 have this console and if so where can I find it? Thanks
https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/wdk-and-visual-studio-build-environment
"The Windows Driver Kit (WDK) 8.1 and WDK 8 introduced a major change
to the environment that you use to build a driver. The WDK no longer
uses Build.exe. The WDK build environment for drivers uses MSBuild.exe
and is fully integrated with the Visual Studio development
environment. This means that source files, makefile.inc, makefile.new
and other related build files present in the previous version of the
WDK are no longer used. The WDK now enables you to create, edit,
build, test, and deploy a driver through Visual Studio. The purpose of
this document is to provide information to help users familiar with
previous WDKs in getting started with the WDK 8.1 and WDK 8."
If you want to build the driver as is then you will need to install the Windows 7.1 DDK and build it using its tools.
https://en.wikipedia.org/wiki/Windows_Driver_Kit
https://www.microsoft.com/en-gb/download/details.aspx?id=11800
You are allowed to install different versions of the DDK on the same machine.
You might find it tricky to install DDK 7.1 on Windows 10 though, try and use this to get around any problem install.
https://stackoverflow.com/questions/32091593/cannot-install-windows-sdk-7-1-on-windows-10#:~:text=If%20you%20continue%20with%20Setup,187668%20and%20then%20rerun%20Setup.
Then it's just a case of "choosing the 7.1 ddk environment (32bit or 64bit)" so that it's tools are accessible/used when "building" your driver.
Look in your startmenu at "StartMenu -> Windows Driver Kits -> WDK XXXX -> Build Environments" to find a command prompt to open.
If you can't/don't want to install the DDK 7.1 and a WDK8+ version of your driver project isn't available then it may be possible to convert the driver from using the older "makefile" into new msbuild way of building, but might be fiddly.
https://community.osr.com/discussion/289475/build-exe-to-msbuild-exe-migration-advice
"If you go into VS you should be able to create a WDK driver project.
It will give you a solution with (I think) one C file filled with
everything necessary to make a driver which does nothing. But, most
importantly, it will generate an XML file that MSBuild will accept.
The XML format is not documented. After you have this XML file you
should be able to figure out how to add your files to it by hand, but
you could move the existing driver files to the project using the GUI.
That may be easiest."

'Cannot open program database' problem in Windows docker container

I use ninja as the build tool of cmake, ninja build parallelly. When build in the physical machine, it compiles without any problem, but in a Windows docker container, it reports:
fatal error C1041: cannot open program database 'blabla.pdb'; if multiple CL.EXE write to
the same .PDB file, please use /FS
The compiler is MSVC 2015, but the /FS seems a 2012 or 2013 option, after add /FS to the CXX flags:
The C++ compiler
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe"
is not able to compile a simple test program.
It compiles without problem if I just use one core.
I have searched the web for a long time, but no useful information found.

How do I test the WDK 8.1 scanner file system minifilter driver sample?

I downloaded the WDK 8.1 and samples and using Win 7 Debug Win32 build configuration while building with Visual Studio 2013 for the "Scanner File System Minifilter Driver" sample solution. It successfully built the solution.
The build output 3 files of interest to me:
1) scanner.sys (the scanner file system minifilter driver)
2) scanuser.exe (the user-land executable that talked to the driver)
3) scanner.inf (driver installation file)
I copied the files over to my VMware virtual machine (XP 32-bit, in this case) and installed the driver using the .inf file which put the appropriate registry keys in the registry and put a copy of the .sys file into C:\Windows\System32\drivers. Then I ran "net start scanner" which started the driver successfully.
So far, this all worked fine. However ...
When I ran the scanuser.exe file it says it's not a valid Win32 application.
How do I go about testing this if I can't run the executable?
Are there build options I have to set in order for this to work?
Out of the box, Visual Studio 2013 will not produce executable that will run on Windows XP.
You must change the platform toolset:
In the Property Pages dialog box for the project, under Configuration Properties, General, set the Platform Toolset property to the desired Windows XP toolset. For example, choose Visual Studio 2012 – Windows XP (v110_xp) to create code that is binary compatible with the Microsoft Visual C++ 2012 Redistributable libraries.
In a similar project, I used the Visual Studio 2010 toolset.

msvcbuild - how to compile luajit

i'va just downloaded luajit and trying to compile it. i'm doing everything as it says here
to compile it i should execute msvcbuild from VS .NET Command Promt. so i installed VS 2010 and started VS 2010 Command Promt
and when i try to execute nsvcbuild it says "no such program and bla-bla-bla".
first i thought that there was no environment path. so i decided to find file msvcbuild.exe inside Program Files folder. and there is no such file.
what am i doing wrong and what should i do to compile luajit?
any help appriciated!
Required steps to build using Visual Studio 2010:
open VS 2010 command prompt window
set up appropriate VS environment: e.g. vcvarsall.bat x64 (for 64-bit) or vcvarsall.bat x86 (for 32-bit)
go to luajit src directory: e.g. cd \projects\luajit\src
start the build: msvcbuild.bat

Packaging F# program for Mono

I am currently learning F# and preparing to write my first program. I will be using Visual Studio 10 in Windows 7 to write the code, because the F# support for MonoDevelop is a few versions behind.
My normal day-to-day development environment is Mac Os X 10.7. I have Mono and MonoDevelop installed. After I finish writing my masterpiece, how do I package it for running on Os X? What DLLs do I need to send to other Windows users so that they can run my .exe file? How do they install those DLLs?
In the Java world (where I usually live), I just package my Java code with any dependencies into a monolithic UberJAR that I can send to anyone who has the appropriate version of Java (usually 6) and they can run my code by typing
java -jar MyUberJar.jar
I routinely write code in Scala and include the Scala library, along with any other dependencies.
Is there any easy way to do something similar for .NET, and specifically for F#?
One alternative is to use the --standalone flag to fsc which will statically compile all the DLL's you need into a single large EXE. The people you send it to will still need to install Mono, but there are no other dependencies.
I think this is what most people use:
http://wix.sourceforge.net/
I say "I think" because at work we've got a release team that builds the installer package for us.

Resources