How can one preview the source code of a library in CoDeSys 2.3 - plc

Is there any way to preview the source code of an imported library in CoDeSys 2.3? When I check the library *.lib file I can see it is not compiled nor obfuscated, but in the CoDeSys there is no option to get into it.
I've been browsing the web for the answer, but couldn't find anything meaningful.

Technically it is possible to open a "*.lib" file in the Codesys 2.3 IDE if it is not encrypted, but I know that the IDE is customized according to the vendor. For example, I don't have "native Codesys 2.3" (directly provided by 3S Software) installed on my computer, but a version of SEW Eurodrive (PLC Editor), which contains some modifications dedicated to their PLCs. This version allows me to open *.lib files:
Maybe the version you have doesn't allow this.
Here's a way to test it:
If you create a project, add some function blocks and select "Save As" you will see that there are several options:
If you select one of the "Encrypted" options you will immediately be asked to enter a key, which will be prompted when opening the *.lib file.

Related

Altera FPGA EP4CE55F23C7N

I currently working on an Altera FPGA. In this project, we were given only the soft software source code using Nios II Software Build Tools for Eclipse I like to run and build the original code before making any changes to it. However, only a .pof programming file and a .cdf file was given to us, so when setting the Hardware design setup, please correct me if I’m wrong, I need the SOPC file and .sof file to configure the hardware?. I tried using the .pof or .cdf files in some way but with no success. Is there a way I can compile and build this application somehow using the .pof file or other way and thus be able to create a bsp project and load the .elf file to the FPGA. Or do I need this .sopcinfo and .sof files. Thank you.

How can I choose the right edition of extension for vscode?

I am trying to install the ssh vscode extension offline by Install from VSIX. However, there is an error saying Unable to install extension 'ms-vscode-remote.remote-ssh' as it is not compatible with VS Code '1.39.2'. Is there a table in which I can get the correct match between my vscode and extensions?
There does not appear to be a table listing all of the versions for the Remote - SSH extension. The package does not include a changelog file, and the github page is just a placeholder for filing issues (so there's no useful history information there either).
However, the marketplace page has a "Version History" tab. That tab only lists the past five versions (0.55.0 to 0.62.0 at time of writing), but hovering the mouse on a link shows the URL pattern, so if you know or can guess the names of past versions then you can download them. For example, I guessed that 0.45.0 probably existed, and indeed it does: link to version 0.45.0.
Having downloaded the vsix file, you can unpack it by renaming the extension to zip and using any tool that understands the zip format (since that is what vsix is). Then check the package.json inside it to see which version it requires. In the case of 0.45.0, I see:
...
"engines": {
"vscode": "^1.36.0"
},
...
meaning that version works with VSCode 1.36.0 and (in theory) greater.
You could keep doing that, using binary search, to find the best match for your version of VSCode.
If you need to do this for another extension(s), and that extension does have a changelog file, it should be linked on the Version History tab as well as contained in the latest vsix package, and reading that may be easier than binary searching among downloads, depending on how it is written.

How do I make an package of an standalone app in VS.NET?

So here is the situation. I want to bundle Google Chrome Portable by itself. The only modification I would make is to change the default homepage, and add a shortcut link to the desktop. I also can't use the included Google Chrome installer because I would need to change the default homepage.
What should I use to make a simple installer that just unzip the Google Chrome folder into programs and create the shortcut on desktop? I don't need anything fancy like program registration or anything like that, in fact, most of my clients probably will not have installation rights on there computer.
Now my project is in Visual Studio 2008, but I am willing to use any other type of packager.
You can also try the free version of Advanced Installer, i.e. by creating a "Simple" project. There is also a five-minutes tutorial on how to create the package
I went with the WinRar SFX Archive File, with auto-run after it finishes.

opengl + glew in Eclipse (for windows)

I'm trying to get glew to work under eclipse (mingw) in windows. Seems as if it is extremely unusual not to use Visual Studio in this context. The install instructions for glew is simply "use the project file in build/vc6/"...
The glew readme also writes:
"If you wish to build GLEW from scratch (update the extension data from
the net or add your own extension information), you need a Unix
environment (including wget, perl, and GNU make). The extension data
is regenerated from the top level source directory with:
make extensions"
In order to get glew to work in eclipse and windows I have to compile it in a unix environment? Is there no other way?
Sure, it would probably be a learning experience to pull that off (if I were to succeed) but I feel that my time is best spent actually working on my project. And even if I did manage to crosscompile everything, would it work in anything but Visual Studio?
Is the whole thing unfeasible and the best solution is to install Visual Studio?
Google haven't been of much help, I feel like I am the only one that has ever attempted to do this (is there a good reason this?).
Well if you still require some flexibility that the VS compiler doesn't always hold, you could try downloading the glew source zip file (on their main sourceforge page). Saying you have to have a Unix environment in order for it to work with eclipse is a huge mistake, as I have it working with MinGW at the moment. Just download the source, extract it, and create/put this batch file into the directory with "Makefile":
#echo on
set SYSTEM=mingw
set GLEW_DEST=C:\...[where you extracted it to]...\glew-1.7.0\usr
path = %PATH%;C:\MinGW\msys\1.0\bin;
make all
make install.all
pause
Change ...[where you extracted it to]... to the path you extracted the downloaded source zip to. Save that and run it, and you should see a "usr" folder containing all the dlls, libs, and headers you'll need. Copy those over to their respective OpenGL counterparts (or just anywhere where you'll be able to specify them in Eclipse later).
Now, in Eclipse, make a new project and at least be sure to include this somewhere:
#ifndef GLEW_STATIC
#define GLEW_STATIC
#endif //GLEW_STATIC
#include <Windows.h>
#include <GL/glew.h>
#include <GL/wglew.h>
If you put the glew headers somewhere besides the OpenGL headers, you may not have to use GL/. Now include the libraries by going into Project->Properties->C/C++ Build->Settings->Tool Settings->MinGW C++ Linker->Libraries and add the following libraries:
glew32
opengl32
glu32
glew32.dll
Add any library search paths you'll need. In my case I just used "C:\MinGW\lib" as a second measure.
Now save all your project files, use Project->Clean..., and build your project. If you don't get any glew errors and your project is prepared you should be able to run it.
Hope that works! It did for me.
Try the following:
Download the Windows 32-bit binary for GLEW here: http://glew.sourceforge.net/index.html
Follow the instruction to link your project to GLEW: http://glew.sourceforge.net/install.html
Make sure your Eclipse is also setup to compile with mingw. (I assume you've done this.)
cout << "Hello world!";

How do I install a type library to the activex palette via command line for BCB5?

I can import a type library via tlibimp.exe, but when I open up the IDE, the libraries are not in the activex pallete. I can't seem to figure how to get it to install to a particular package either. In the IDE there is an install button in the Import Type Library dialog. How do I do this in the command line?
When I look in at the OCX.cpp file generated by tlibimp in the CBuilder5\Imports folder, I see "Errors: Error creating palette bitmap of (TTVBH3D) : No Server registered for this CoClass". Does this have something to do with the problem?
Edit:
I want to be able to install components to the activex palette without going through the IDE so that the process can be automated during a build. Any solutions must be able to be fully automated.
According to the parameter options of tlibimp.exe, there is a -Ha+ parameter which will "Generate IDE component wrappers for controls".
There is also a -Hr+ which generates the IDE registration for component wrappers.
Does supplying any of these parameters make any difference?
Not sure from this whether or not you then have to install the components using the generated registration code.
First, run tlibimp.exe (found under Program Files\Borland\C++Builder\Bin) with the ocx\dll you want to install.
Second, locate the cpp file generated by tlibimp (you can specify the output path with tlibimp) and find the string "Servers" at the bottom of the file and replace it with "ActiveX". This string determines the palette to install to. I'm not sure if this can be specified with tlibimp, but it doesn't look like it.
Next, compile the package that contains type library\activex component.
Finally, add a key to the registry. The key goes under HKCU\Software\Borland\C++Builder\5.0\Knownpackages. The name of the key should be the path to package that you just compiled (for example, $(BCB)\Bin\applet50.bpl).
When you open up BCB, you will see the components under the activex palette.
This is the only way I could find to do this that could be automated.