Author Topic: KiCAD 8.0.7 On Windows 7 - Easy Install Script!  (Read 1286 times)

0 Members and 1 Guest are viewing this topic.

Offline The DoktorTopic starter

  • Regular Contributor
  • *
  • Posts: 185
  • Country: us
KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« on: January 02, 2025, 11:26:20 am »
It's taken a long time, but I put together a full solution for running KiCAD 8.0.7 On Windows 7. In some other good news, I also tried version 9.0.0 RC1 using the same two DLL files which got this one going, and it seems to work just fine. So unless some change is made at the last minute, we should be able to run KiCAD 9.x on Windows 7 as well.

Much thanks to a member named “j0t”, he created the loader _eeschema.dll, which fixes the missing function which was preventing the schematic editor from loading. I had no success doing this myself, without his work, this would not be possible.
The only things really needed to get KiCAD 8.x are the _eeschema.dll file and the api-ms-win-core-file-l1-2-0.dll, both of which were produced by somebody else. What I have done is create a nice, easy to use script which not only ads those files, but handles a lot of other issues to make KiCAD function as if it belongs on Windows 7 :-)
PS these instructions appear in the patch package as How_To.txt.

1. You will need 7-zip for this installation, if you don't already have it installed, get it here https://7-zip.org/download.html
2. Create folder C:\Program Files\KiCad\8.0
3. Download the installer for KiCAD  8.0.7, then use 7-zip  to extract all files from the installer to C:\Program Files\KiCad\8.0
4. Download the file kicad_8.07_patch_all.zip  from this post and extract all the files to C:\Program Files\KiCad\8.0
4. Go into the folder C:\Program Files\KiCad\8.0  and run “patch_all.bat”. This will patch all files to eliminate the “unsupported operating system” warning message, install a few files needed to make the programs run, install registry entries to associate files with the proper programs, add a program folder and links to the start menu, and clean up all of the files we no longer need after patching.
 
The following users thanked this post: PlainName, Per Hansson, MitjaN, j0t

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 993
  • Country: gb
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #1 on: January 02, 2025, 12:40:12 pm »
Where can a zipped version of KiCad 8.07 be downloaded from? I usually download the kicad-8.0.7-x86_64.exe installer.
This is the place I normally download KiCad from

https://kicad-downloads.s3.cern.ch/index.html?prefix=windows/stable/
David
Hertfordshire, UK
University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V8+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 PCB router Operator, Electronics instructor. Credited KiCad French to English translator
 

Offline The DoktorTopic starter

  • Regular Contributor
  • *
  • Posts: 185
  • Country: us
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #2 on: January 02, 2025, 01:27:55 pm »
You don't download a zipped version, 7-zip can extract the files from the installer. So you download kicad-8.0.7-x86_64.exe . I usually put the installer directly in C:\Program Files\KiCad\8.0 then right click on and under 7-zip select "extract here" and wait a few minutes while it finishes. Do the same thing with the patcher attached to this post, and then just run "patch_all.bat. If everything went well, a bunch of little files will disappear as you will be ready to run KiCAD.

Ed
 

Offline j0t

  • Newbie
  • Posts: 6
  • Country: lv
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #3 on: January 04, 2025, 04:46:03 pm »
Wow, that's impressive, bravo! :clap:
I was too lazy to hunt all those nag screens over the code, and also tried do not touch the original code as much as possible.
But, anyway, it is nice to see all required stuff in one place!  :-+

Just a little suggestion, I think it would be great to mention the sources of the binaries in your How_To.txt instruction, just in case if someone wants to be sure that all this stuff is safe and trojan-free. Besides of the repo for my wrapper (https://github.com/j0t/kicad87), I have no idea where api-ms-win-core-path-l1-1-0.dll comes from. There are two repos, https://github.com/kobilutil/api-ms-win-core-path-HACK and https://github.com/nalexandru/api-ms-win-core-path-HACK, though they offers a different versions, both of them should work fine.
BTW, there is an useful repo https://github.com/adang1345/PythonWin7 for whose who wants to get the newest versions of Python working on legacy systems.


 

Offline The DoktorTopic starter

  • Regular Contributor
  • *
  • Posts: 185
  • Country: us
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #4 on: January 05, 2025, 07:39:41 pm »
Hey, j0t, I'm glad you like it. Do remember that this would not be possible without your loader, as I was looking at that situation all wrong. I was trying to figure out what to change in KiCAD itself, not adding an external function it was missing. I found the error message when launching _eeschema.exe very confusing, as one of the things it referenced was file loaded successfully. If it loaded successfully, why is it not working? Remember, I am not a programmer, nor do I pretend to be one. But I do know enough to beat my way through some situations…

As for patching out the nag messages, you would not believe how easy that is. I just open up each file in x64dbg and search for a string reference to "unsupported operating system", then start scrolling up from that location. Around 10 items up, there is a jne instruction, just change it to a jmp and then choose to apply patches. Oh, yes, save an unpatched version of each file first. I can patch that out for all seven files in under 15 minutes, and then I got a little batch script which compares the patched to unpatched files and creates the .bspatch files for each of them. The registry entries are also fairly easy, although they do take some time. I simply do a clean install on a Windows 10 or 11 VM, export the relative registry entries, and combine them all into a single file. This only needs to be done once per major version. The start menu shortcuts I do very crudely, I simply generate the links and put them any folder, and my script moves them to the start folder.

I like your suggestion about listing the source of the two binaries, I will do that in my next release. Although, I am not sure that the binary I got for api-ms-win-core-path-l1-1-0.dll comes from the source you listed. I got it several years ago when trying to set up a chia form on a Windows 7 machine. The chia would not run on Windows 7, somebody else posted a fix to make it work using that DLL. A few years later I had a problem with sabnzb not wanting to run on Windows 7, that DLL fix the problem there as well. Then it popped into my mind that perhaps this was KiCAD's problem as well. In version 7 it was indeed the only problem, and I thought others might like to know as well :-)

At my end, KiCAD is no longer being run on Windows 7. My old Q9450 based system is still running quite well (I built it back in '08) but being stuck with 8 GB of memory and only a SATA1 interface for the hard drive was getting to be a drag. Especially as I usually have a few dozen tabs open in Chrome, a ton of background programs running, bunch of PDFs open in Acrobat, etc. So I finally decided to upgrade and him currently running a Core Ultra 7 265K system with 192 GB of memory and an nvme drive. Unfortunately, running Windows 7 on that hardware is not a viable option. I'm sure I could get it to boot and run, just don't think it would have to many functional devices attached. So I'm dealing with Windows 11. Speed and stability are excellent, some parts of the UI are a big step backwards.

For doing things like coming up with this install package though, it's really nice. I've created VMware machines for everything from Windows XP up to 11, configured him as I like, and then compress them into an archive on the nvme drive. When I want to use one, I extract the archive to a RAM drive and run the VM from there. It's lightning fast, and if I make a mistake I need to try again, I just delete from the RAM drive and extract the archive again. Back up and running and maybe 2 to 3 minutes :-)

In case you are wondering, the old Windows 7 machine did not get retired to the attic. I recently bought a CO2 laser and a fiber laser with the Galvo head, the old computer will be in charge of running those as soon as I get some space cleared.
« Last Edit: January 05, 2025, 07:42:17 pm by The Doktor »
 

Offline j0t

  • Newbie
  • Posts: 6
  • Country: lv
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #5 on: January 06, 2025, 06:22:24 pm »
Hello The Doktor, thank you for your story, it was very interesting!

Yes, the error message from the core was rather vague and irrelevant, so it takes me some time to figure out what is going on. This is because of dynamic loading of the libraries. But since it was open source, the original texts from github helped me very much. I've also used x64dbg, depends, The Interactive Disassembler and mingw.

Patching technique is fine in general until you have to repeat the same job for the next version - frankly speaking, it was the main reason why I've decided to write a complete wrapper rather than trying to massage the original binary. It was a little (and pleasant) surprise for me when I got it working for the first time!

It seems that api-ms-win-core-path-l1-1-0.dll hacking is in great demand, since we see so many attempts to reimplement it!
BTW, there is another interesting project https://github.com/i486/VxKex - they tried to apply a generic approach to make Windows 8-11 apps running on Windows 7. I've reused some ideas for my wrapper from there.

Glad you did managed to find the right job for your old machine. And please be safe while working with lasers!
 

Offline not_at_all

  • Newbie
  • Posts: 3
  • Country: cn
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #6 on: January 07, 2025, 04:41:49 am »
I tried to modify the global library table, but it prompted "Permission denied",after restarting the computer, the global library table returns to its original state.
 

Offline not_at_all

  • Newbie
  • Posts: 3
  • Country: cn
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #7 on: January 08, 2025, 04:46:40 am »
I tried to modify the global library table, but it prompted "Permission denied",after restarting the computer, the global library table returns to its original state.
------------------
This issue seems to only exist in version 8.0.x, it does not exist in versions 7.0.9 and 9.0.0-rc1.
It's not a problem caused by patch files.
I don't know if this issue exists on Win10 system.
« Last Edit: January 08, 2025, 05:18:11 am by not_at_all »
 

Offline j0t

  • Newbie
  • Posts: 6
  • Country: lv
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #8 on: January 08, 2025, 09:24:37 am »
Quote
This issue seems to only exist in version 8.0.x

Tried this operation on my 8.0.5 version under Windows 7, no such error message has been noticed.
It seems to be a specific user problem, so please try to check the security permissions of your files (though I don't know which ones exactly are associated with "global library table").
 

Offline not_at_all

  • Newbie
  • Posts: 3
  • Country: cn
Re: KiCAD 8.0.7 On Windows 7 - Easy Install Script!
« Reply #9 on: January 09, 2025, 04:33:52 am »
Quote
This issue seems to only exist in version 8.0.x

Tried this operation on my 8.0.5 version under Windows 7, no such error message has been noticed.
It seems to be a specific user problem, so please try to check the security permissions of your files (though I don't know which ones exactly are associated with "global library table").

Thank you! The reason has been identified. Previously, I applied a third-party patch for kicad 8, which changed the user profile attribute to read-only. Delete the entire user configuration folder of kicad, restart the software, everything goes well.

The files are saved in
C:\Users\Lenovo\AppData\Roaming\kicad\8.0    ("Lenovo" is the username)

« Last Edit: January 10, 2025, 04:20:51 am by not_at_all »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf