<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to CODESYS on Linux</title><link href="https://forge.codesys.com/hax/blog/2018/07/codesys-on-linux/" rel="alternate"/><link href="https://forge.codesys.com/hax/blog/2018/07/codesys-on-linux/feed.atom" rel="self"/><id>https://forge.codesys.com/hax/blog/2018/07/codesys-on-linux/</id><updated>2018-07-10T22:14:24.322000Z</updated><subtitle>Recent changes to CODESYS on Linux</subtitle><entry><title>CODESYS on Linux discussion</title><link href="https://forge.codesys.com/hax/blog/2018/07/codesys-on-linux/?limit=25#f154" rel="alternate"/><published>2018-07-10T22:14:24.322000Z</published><updated>2018-07-10T22:14:24.322000Z</updated><author><name>Ingo</name><uri>https://forge.codesys.com/u/ingo/</uri></author><id>https://forge.codesys.com05a4994fee63687194594cda0d13314e344a63ac</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Screenshot&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS on Linux</title><link href="https://forge.codesys.com/hax/blog/2018/07/codesys-on-linux/" rel="alternate"/><published>2018-07-10T21:54:12.208000Z</published><updated>2018-07-10T21:54:12.208000Z</updated><author><name>Ingo</name><uri>https://forge.codesys.com/u/ingo/</uri></author><id>https://forge.codesys.com4b8c795f27b073c7ef57ba69bd0cc952266b6208</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;img rel="nofollow" src="https://forge.codesys.com/hax/blog/_discuss/thread/b419b96a/f154/attachment/codesys.png"/&gt;&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;&lt;strong&gt;Note: The content moved to &lt;a class="" href="/tol/codesys-4-linux"&gt;this project&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;hr/&gt;
&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#get-codesys-sp13-or-higher"&gt;Get CODESYS SP13 or higher&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#use-development-version-of-wine"&gt;Use Development Version of Wine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#get-winetricks"&gt;Get winetricks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#install-prerequisits"&gt;Install Prerequisits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#switch-to-win7"&gt;Switch to Win7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#install-codesys"&gt;Install CODESYS&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#run-the-setup"&gt;Run the setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#ignore-errors-for-visual-c-runtimes"&gt;Ignore errors for Visual C++ Runtimes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#dont-install-codemeter"&gt;Don't install Codemeter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#wait-for-space-computation"&gt;Wait for Space Computation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#use-custom-setup"&gt;Use Custom Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#add-registry-key"&gt;Add Registry Key&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#start-codesys"&gt;Start CODESYS&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#linux-rte-online"&gt;Linux RTE online&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#dont-install-svn-plugin"&gt;Don't install SVN Plugin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;With the release of SP13 it is now finally possible to run CODESYS on Wine. The whole procedure is not very straight forward, but still easily possible.&lt;/p&gt;
&lt;h1 id="get-codesys-sp13-or-higher"&gt;Get CODESYS SP13 or higher&lt;/h1&gt;
&lt;p&gt;You can &lt;a class="" href="https://store.codesys.com/codesys.html" rel="nofollow"&gt;download CODESYS&lt;/a&gt; from the CODESYS store (use 32bit version). You need an account for that, before you can download it, but all is for free.&lt;/p&gt;
&lt;h1 id="use-development-version-of-wine"&gt;Use Development Version of Wine&lt;/h1&gt;
&lt;p&gt;At the time of writing this, I needed to install the development version of wine.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo apt-get install wine64-development cabextract winbind
&lt;/pre&gt;&lt;/div&gt;


&lt;h1 id="get-winetricks"&gt;Get winetricks&lt;/h1&gt;
&lt;p&gt;You will need to download winetricks, which helps you in installing Dot Net, as well as several Visual C++ Runtimes:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;wget -c https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod 755 winetricks
&lt;/pre&gt;&lt;/div&gt;


&lt;h1 id="install-prerequisits"&gt;Install Prerequisits&lt;/h1&gt;
&lt;p&gt;Like already mentioned above, you should install some packages using winetricks. I recommend ot use an own wine directory for that:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;WINEPREFIX=~/.wine.codesys ./winetricks vcrun2005 vcrun2008 vcrun2013 vcrun2015 dotnet46
&lt;/pre&gt;&lt;/div&gt;


&lt;h1 id="switch-to-win7"&gt;Switch to Win7&lt;/h1&gt;
&lt;p&gt;The emulated windows has to be configured to Windows 7. You can do so by using winecfg:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;WINEPREFIX=~/.wine.codesys winecfg-development
&lt;/pre&gt;&lt;/div&gt;


&lt;h1 id="install-codesys"&gt;Install CODESYS&lt;/h1&gt;
&lt;h2 id="run-the-setup"&gt;Run the setup&lt;/h2&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;WINEPREFIX=~/.wine.codesys wine-development ~/Downloads/CODESYS\ 3.5.13.0.exe
&lt;/pre&gt;&lt;/div&gt;


&lt;h2 id="ignore-errors-for-visual-c-runtimes"&gt;Ignore errors for Visual C++ Runtimes&lt;/h2&gt;
&lt;p&gt;Just click through the first part of the setup, and always ignore errors, if s.th. could not be installed.&lt;/p&gt;
&lt;h2 id="dont-install-codemeter"&gt;Don't install Codemeter&lt;/h2&gt;
&lt;p&gt;Do not cancel the installer, just deselect every component of the Codemeter Setup, as this will fail.&lt;/p&gt;
&lt;h2 id="wait-for-space-computation"&gt;Wait for Space Computation&lt;/h2&gt;
&lt;p&gt;This is a dialog, which takes a long time. Just wait, it will finish.&lt;/p&gt;
&lt;h2 id="use-custom-setup"&gt;Use Custom Setup&lt;/h2&gt;
&lt;p&gt;In the custom setup you should deselect all, except CODESYS itself (no OPC DA, no CODESYS Control Services, ...)&lt;br/&gt;
Codesys Gateway works on 32bit and 64bit edition.&lt;/p&gt;
&lt;h2 id="add-registry-key"&gt;Add Registry Key&lt;/h2&gt;
&lt;p&gt;After the installation finished successfully, you need to add a registry key. Without this, I got an error of wine, saying "The specified user does not have a valid profile".&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;WINEPREFIX=~/.wine.codesys wine-development reg add "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-21-0-0-0-1000"
&lt;/pre&gt;&lt;/div&gt;


&lt;h1 id="start-codesys"&gt;Start CODESYS&lt;/h1&gt;
&lt;p&gt;CODESYS should now be ready to start...&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;WINEPREFIX=~/.wine.codesys wine-development ~/.wine.codesys/dosdevices/c\:/Program\ Files\ \(x86\)/CODESYS\ 3.5.13.0/CODESYS/Common/CODESYS.exe
&lt;/pre&gt;&lt;/div&gt;


&lt;h2 id="linux-rte-online"&gt;Linux RTE online&lt;/h2&gt;
&lt;p&gt;You can install the Linux RTE and login with your Codesys IDE to this PLC.&lt;br/&gt;
&lt;img alt="Codesys IDE and PLC on Linux with Webvisu" rel="nofollow" src="https://forge.codesys.com/forge/support/_discuss/thread/965c1a79/c59b/attachment/CS35onLinux.PNG"/&gt;&lt;/p&gt;
&lt;h2 id="dont-install-svn-plugin"&gt;Don't install SVN Plugin&lt;/h2&gt;
&lt;p&gt;At the moment do not install the SVN Plugin into codesys, it will break your installation.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>