|
Thanks. I have recently done an application like that: a VB.NET application developed/built on a Windows 10 machine and then executed on the Raspberry PI using mono. It worked well but I am now investigating if there is a more native way to do it.
I have found some interesting info in a document called "An introduction to C&GUI programming" by Simon Long, one of the engineers who works for the Raspberry PI Foundation.
Unfortunately everything in it is built on the Raspberry PI itself via command line etc... and I really like to use my VScode IDE on my Windows machine .
If I don't succeed I will revert to Visual studio, C#.NET and mono on the PI but I will keep looking for a while.
|
|
|
|
|
You may want to try GtkSharp | Mono[^]; also download the MonoDevelop IDE; it allows you to "draw" UI's, like VS does for WinForms.
A quick Google implied that VS can do that natively; GTK# Platform Setup - Xamarin | Microsoft Docs[^], but never tried it. If you try it and it works, please let me know
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Have you looked at using the remote compile option for VS? That way you don't need to figure out how to get the GTK2.0 libs and headers on Windows.
If you're looking at developing GUI programs, do you know about VcXrv or Xming, which provide XWindows servers on a Windows system?
|
|
|
|
|
Thanks for the info, I didn't know of any of those. I will check out all of them.
|
|
|
|
|
Hi,
The remote development option for VScode does work very neatly. Edit/develop everything from Visual studio code on the windows 10 machine, build and test everything on the Raspberry PI. It takes a bit of doing to get it all to work nicely together but I have a working application that uses the GTK-2.0 library that is installed on the PI. Thanks for the suggestion.
|
|
|
|
|
Don't forget that you've got 4 cores on the Pi, so you might be able to improve your compile times using Properties > C/C++ > General > Max Parallel Compilation Jobs
|
|
|
|
|
I have just watched the latest episode of Michael Portillo's "Great Railway Journeys". He visited RAF Coningsby, and your name was mentioned. Something new I learned today.
|
|
|
|
|
One of the most beautiful pieces of kit ever built, I think. Second would be the LNER Class A4, which has held the speed record for steam engines at 126 MPH since 1938! Maybe I should change my name to Mallard, instead?
|
|
|
|
|
Ha ha, Portillo was waxing lyrical about the Mallard on the same program. Do you have a British connection, other than your love for these machines?
|
|
|
|
|
I have dual citizenship. Born in the UK, but we emigrated to Canada when I was only six, which was over 50 years ago, now. So, yeah, I do, bit it's somewhat tenuous. I don't really remember much about life in Britain.
|
|
|
|
|
I generally do not like when post ask " I am using / have X ..." and poster receives "advise" "why don't you use XYZ instead.."
I have been struggling using Linux version of X IDE together with "plug-in" called "Terminal communication framework" - TCF.
It is rather obscure framework , but does all the "dirty work" after the code is cross-compiled.
My app is intended to run on RPi and so far TCF works as expected.
Cheers
|
|
|
|
|
Dear,
i set up python 3.4 and PostgreSQL 10.6 on Oracle Linux 7.4.
when i create plpython3u it's error.
could not load library "/u01/PostgreSQL/10/lib/postgresql/plpython3.so": libpython3.4m.so.1.0: cannot open shared object file: No such file or directory
then i add export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH in file ~/bash_profile
Finally, i have to restart services postgreSQL : pg_ctl restart ==> it's ok.
but when i reboot linux , it will be error again, i guess LD_LIBRARY_PATH load after service postgres start. How i Can resolve it ?
Thank you !
|
|
|
|
|
There should be some information in the PostgreSQL installation guide as to how to set this up. But if not then I would guess it needs to be set in one of the /etc/rc startup scripts. You will need to check the Linux man pages to decide which one you should use.
|
|
|
|
|
You will need to add LD_LIBRARY_PATH to the startup script for postgres. It looks like Oracle Linux 7.4 is using systemd, so try adding the line
Environment=LD_LIBRARY_PATH=/u01/PostgreSQL/10/lib/postgresql to /lib/systemd/system/postgresql.service. The best place for that would be right after the line that says Export=PGDATA=path-to-pgdata
Meanwhile, I would follow Richard's advice and contact the PostgreSQL mailing list and ask there. They may have a better solution so that when you update to PGSQL 10.XX or 11.XX, you won't have to continually remember to edit the startup script.
|
|
|
|
|
|
I need a small help finding my bluetooth hci problem.
The attached snippet fails to execute when all passed parameters are correct.
Execution stops at function like wrong parameters are being passed.
But it compiles / links.
For troubleshooting purposes I added 1 to device descriptor parameter and the function run and returns an error as expected.
I am not sure what is the purpose of "to" - time-out parameter?
Here is function prototype
int hci_read_class_of_dev(int dd, uint8_t *cls, int to);
What is odd - to write class I need uint32_t, but read wants only uint8_t.
<pre>#ifdef DEBUG
system("hciconfig hci0 class");
cout << "device descriptor " << dev_descriptor << endl;
#endif
uint8_t *device_class = {0};
int timeout = 0;
if (hci_read_class_of_dev(dev_descriptor+1, device_class, timeout)) {
perror("FAILURE");
} else {
#ifdef DEBUG
perror("SUCCESS");
cout << "@line " << __LINE__ << endl;
#endif
}
Thanks
Cheers
|
|
|
|
|
Vaclav_ wrote: I am not sure what is the purpose of "to" - time-out parameter? Most likely it allows you to set a timeout on the operation, thus preventing an infinite wait.
Vaclav_ wrote: Execution stops at function like wrong parameters are being passed.
But it compiles / links. Lots of code compiles and links, doesn't mean it is correct.
|
|
|
|
|
I am new to Linux Shell (there is #!/bin/sh in the beginning of my file) and I need to write a Git pre-commit hook, for my Visual Studio C# Project repository, that must prevent a commit from being performed if a specific file
(<My Repository Root>\MyCsharpProject\GitCommitDateAndTime.cs) is not part of the selected files to be committed. Can anybody please help me? I understand that git diff --cached --name-only lists the files to be committed.
modified 8-Nov-19 11:38am.
|
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: Since you might be new to this, here are a few resources that can help you get started:
Git Hooks | Learn how to use pre-commit hooks, post-commit hooks, post-receive hooks, and more. | Matthew Hudson
Git - Git Hooks
GitHub - pre-commit/pre-commit-hooks: Some out-of-the-box hooks for pre-commit Thank you. The hooks are already enabled and working and they are calling standard .bat-files as it is now. My plan was to write as much as possible in standard .bat-files, but I think a check like this is difficult to pass on to a .bat-file.Afzaal Ahmad Zeeshan wrote: Quote: is not part of the selected files to be committed What exactly do you mean by this? Does the file need to be added, modified or anyway altered in the commit, or just to make sure that it is not deleted? I use TortoiseGit and when I click commit I get a list of all files with modifications. Next to each file name in the list there's a checkbox that I can mark the specific file for inclusion in the commit about to happen. So, the user must always check the checkbox next to GitCommitDateAndTime.cs. Now, you could argue that I could always programmatically click the checkbox as a convenience for the user, but I have seen that some of my colleagues use git from some kind of command line tool so this solution wouldn't work for them.
modified 9-Nov-19 5:28am.
|
|
|
|
|
If I was able to pass parameters (in this case ASCII-strings with files that have their checkboxes checked) to an .exe-file then this problem would be gone since it would be extremely easy to write a C#-application that would perform the check, but I have no clue how to do that either.
|
|
|
|
|
arnold_w wrote: in standard .bat-files I have not heard of such things in Linux. Are you using the wrong terminology, or the wrong files?
|
|
|
|
|
Richard MacCutchan wrote: arnold_w wrote: in standard .bat-files I have not heard of such things in Linux. Are you using the wrong terminology, or the wrong files? No, not in Linux, in Windows (the type of .bat-files you could run on dos in the 1990's). So in this case I start off with a Git hook file written in #!/bin/sh, which I believe has some relation with Linux, but since I have no knowledge of that I want to move into Windows environment (.bat-file or .exe written in C#), but I have no idea how to make that bridge and pass parameters.
modified 9-Nov-19 10:23am.
|
|
|
|
|
Not sure if this is what you problem is, but:
Windows still supports .bat files; more commonly .cmd these days. And passing parameters is just the same as in running an executable in a console window. Try the following:
@echo off
:repeat
if "%1" == "" goto :eof
echo next parameter is %1
shift
goto :repeat
Save as zzz.cmd and then run it by calling "zzz one two three". That shows how to pass a variable number of parameters to a batch file. Alternatively the parameters can be addressed by their actual position (but only the first 9).
However, converting a shell script to a Windows cmd file is no easy matter unless you are reasonably proficient in bash or similar, and Windows batch commands. And unless they are small (less than 15-20 lines) it is going to be a considerable task.
|
|
|
|
|
Wait a minute, I think I just had an epiphany! That line that gets the files about to be committed, git diff --cached --name-only, isn't that the same as calling something like (I'm not at work now, but in another .bat-file there is something close to this) "C:/program files/git/bash.exe" git diff --cached --name-only? In that case I might as well retrieve the list of files directly in the .bat-file, not in the #!/bin/sh file.
modified 9-Nov-19 15:17pm.
|
|
|
|