Compiling on Windows

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Compiling on Windows

Post by pperisin »

Still, I wish we could get new unstable. The last one is 2 weeks old.

I wish I knew how to use wix and make msi win installers. I could make one every few days.

I was compiling FreeCAD on win, using VS2008, but I could not figure out how to use wix. It just seems very complicated to me.

If you guys are willing to explain to me how to use wix to make win msi installer, I would make new one every few days. However, I'm not experienced user, so tutorial for dummies would be needed in this case (including where to download wix, and which version).


Regards,
Petar
wmayer
Founder
Posts: 20284
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Import for Sketcher available?

Post by wmayer »

I'm not sure if it's possible to build installers with WiX and the Express edition of VS. You probably need the pro version therefore. Anyway I think making a .7z archive is much easier and also for the users it's less annoying because you can just unpack the archive where you want it. For the installable FreeCAD you always have to uninstall it first which is IMO very annoying because WiX doesn't do this automatically for you.

But anyway under src/WindowsInstaller you'll find a batch file BuildInstaller.bat. Just open a terminal window and cd to the directory and invoke the batch. To collect all needed files copy the DLLs from the LibPack to the bin directory of the FreeCAD build. If you have an out-of-source-build then you have to create the directory relative to the build directory "../src/WindowsInstaller" and copy the files from src/WindowsInstaller.
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: Import for Sketcher available?

Post by pperisin »

Do I need to install wix, and which version, and where to download it?

I usually know how to download stuff from net, but I did try to download Wix before and I remember that FreeCAD supported version of Wix that I could not find download for.

Regards,
Petar
wmayer
Founder
Posts: 20284
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Import for Sketcher available?

Post by wmayer »

Apparently WiX has moved from SF to CodePlex. You'll find the url here: http://wix.codeplex.com/releases/view/44406 I used version 3.1 but this doesn't seem to be there any more. So, version 3.0 might work too or try out the latest one.
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: Import for Sketcher available?

Post by pperisin »

Hi,

I got this message on installing Wix 3.5. does it mean it will not work (probably yes) :-)

Image

I can try 3.0 too :-)

wmayer wrote:I'm not sure if it's possible to build installers with WiX and the Express edition of VS. You probably need the pro version therefore. Anyway I think making a .7z archive is much easier and also for the users it's less annoying because you can just unpack the archive where you want it. For the installable FreeCAD you always have to uninstall it first which is IMO very annoying because WiX doesn't do this automatically for you.

But anyway under src/WindowsInstaller you'll find a batch file BuildInstaller.bat. Just open a terminal window and cd to the directory and invoke the batch. To collect all needed files copy the DLLs from the LibPack to the bin directory of the FreeCAD build. If you have an out-of-source-build then you have to create the directory relative to the build directory "../src/WindowsInstaller" and copy the files from src/WindowsInstaller.
so what you are saying is that I should run BuildInstallet.bat from source, but also that I should copy bin folder to the bin folder of installation.

From what I know, when using cmake on win, I need to enter source folder, and the folder where everything will be built. they are two separate folders. How does BuildInstaller.bat, that is in the source, know where my FreeCAD Build folder is?

Regards,
Petar
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Import for Sketcher available?

Post by jriegel »

I use only the command line Version. You don't need the Visual Studio integration (dont work any way in the express version).

source and bin dir have to be the same and you need to copy the bin dir of the LibPack into the bin of the build dir.

Another thing, you need two MDM files (which include the VS runtime).
Stop whining - start coding!
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: Import for Sketcher available?

Post by pperisin »

jriegel wrote:Another thing, you need two MDM files (which include the VS runtime).
How and where do I get these :-)

also, Buildinstaller contains some last lines for calling CopyRelease.bat file, that does not exist (I see CopyRelease.bat.in, do I rename it)

also, where will msi appear? in this Wininstaller folder or somewhere else?

Regards
Petar
wmayer
Founder
Posts: 20284
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Import for Sketcher available?

Post by wmayer »

How and where do I get these
IIRC they are only part of the professional edition of Visual Studio. You can still build an installer without them but then many people also have to install the vc_redist package with the same or a newer of the runtime DLLs than we used for building FreeCAD. Since that might be annoying (and it's also annoying to uninstall a previous version of FreeCAD when using a newer version) I recommend you to simply build 7-zip archive.
also, Buildinstaller contains some last lines for calling CopyRelease.bat file, that does not exist (I see CopyRelease.bat.in, do I rename it)
You can comment this out and rename the package containing the version as shown in the About dialog.
also, where will msi appear? in this Wininstaller folder or somewhere else?
In the same directory.
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: Import for Sketcher available?

Post by pperisin »

Ok,

I have made 7zip compression (actually, it is being compressed), then I will publish it on my DropBox account, and then here.

1 - however, I have some issues - When clicking Help-About, he says that Release date and build number are unknown. How to fix it.
2 - I have seen youur last commin, werner - about compress stuff in Tree view - but tree view looks the same to me - I do not see the difference.

Regards,
Petar
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: Import for Sketcher available?

Post by pperisin »

Also, 7z files Jurgen makes are 75MB. Mine is 200MB. I copied bin file from libpack - is that needed?
Post Reply