ten-point-nine / freETarget

Electronic Air Rifle Target
85 stars 42 forks source link

How to build this project #6

Closed mjbedford closed 3 years ago

mjbedford commented 4 years ago

Sorry I am now a windows users so I am struggling to get this project open in VS and built.

I have cloned the repo and installed the Installer plugin for VS but I can see no way to open the project or build it.

Could someone point me to how to do this please it appears to be very different that the equivalent on a MAC (Visual Code)

Thanks

AzmodanRO commented 4 years ago

hi you need visual studio 2019. community edition (which is free) is good. after install, you only need to open the .sln file in the github\freETarget\Software\C#\freETarget directory, in order to run the app from visual studio.

in order to build an installation kit, in the freETarget solution, right click on the "freETarget Setup" project and click "build" in the context menu.

that being told, this is not a tutorial/learning project. if you need to expand your knowledge on C# and visual studio, there are a lot of free courses on the internet

mjbedford commented 4 years ago

\thanks, its just a very different setup from the Mac version, I think the MS dependency is a challenge, it would be good to see if this could be done in a cross platform language, I did start building a golang ui for this but ran out of time. I have seen there is a lot of discussion about the communication I think a message based solution would simplify the challenge rather than using serial communication.

mjbedford commented 4 years ago

Apologies again but I am trying to debug this code and it appears not to be reading the config file as its throwing a null pointer exception for the session type, I am not a nubbie but I am struggling to see how this app is configured is there any documentation. Also the main project will not build from the setup file, there appears to be a dependency on creating a desktop short cut in an invalid location, can you tell me where this is location is configured , is it parameterized of hard coded

AzmodanRO commented 4 years ago
mjbedford commented 4 years ago

I have installed the released package from free-e-target.com and I get a very similar exception

Log Name: Application Source: .NET Runtime Date: 25/08/2020 08:36:43 Event ID: 1026 Task Category: None Level: Error Keywords: Classic User: N/A Computer: JCW_Laptop_2013 Description: Application: freETarget.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException at freETarget.frmMainWindow.drawTarget() at freETarget.frmMainWindow.targetRefresh() at freETarget.frmMainWindow.frmMainWindow_Resize(System.Object, System.EventArgs) at System.Windows.Forms.Control.OnResize(System.EventArgs) at System.Windows.Forms.Form.OnResize(System.EventArgs) at System.Windows.Forms.Control.OnSizeChanged(System.EventArgs) at System.Windows.Forms.Control.UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32) at System.Windows.Forms.Control.UpdateBounds(Int32, Int32, Int32, Int32) at System.Windows.Forms.Control.SetBoundsCore(Int32, Int32, Int32, Int32, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.Form.SetBoundsCore(Int32, Int32, Int32, Int32, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.Control.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.ScrollableControl.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.Form.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.Control.ScaleControl(System.Drawing.SizeF, System.Drawing.SizeF, System.Windows.Forms.Control) at System.Windows.Forms.ContainerControl.Scale(System.Drawing.SizeF, System.Drawing.SizeF, System.Windows.Forms.Control) at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean, Boolean) at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout() at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean) at System.Windows.Forms.Control.ResumeLayout(Boolean) at freETarget.frmMainWindow.InitializeComponent() at freETarget.frmMainWindow..ctor() at freETarget.Program.Main()

Event Xml:

1026 2 0 0x80000000000000 3891 Application JCW_Laptop_2013 Application: freETarget.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException at freETarget.frmMainWindow.drawTarget() at freETarget.frmMainWindow.targetRefresh() at freETarget.frmMainWindow.frmMainWindow_Resize(System.Object, System.EventArgs) at System.Windows.Forms.Control.OnResize(System.EventArgs) at System.Windows.Forms.Form.OnResize(System.EventArgs) at System.Windows.Forms.Control.OnSizeChanged(System.EventArgs) at System.Windows.Forms.Control.UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32) at System.Windows.Forms.Control.UpdateBounds(Int32, Int32, Int32, Int32) at System.Windows.Forms.Control.SetBoundsCore(Int32, Int32, Int32, Int32, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.Form.SetBoundsCore(Int32, Int32, Int32, Int32, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.Control.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.ScrollableControl.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.Form.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified) at System.Windows.Forms.Control.ScaleControl(System.Drawing.SizeF, System.Drawing.SizeF, System.Windows.Forms.Control) at System.Windows.Forms.ContainerControl.Scale(System.Drawing.SizeF, System.Drawing.SizeF, System.Windows.Forms.Control) at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean, Boolean) at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout() at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean) at System.Windows.Forms.Control.ResumeLayout(Boolean) at freETarget.frmMainWindow.InitializeComponent() at freETarget.frmMainWindow..ctor() at freETarget.Program.Main() I suspect this is the same exception I get in VS relating to the default target being null when it tries to draw the main window.
mjbedford commented 4 years ago

Also, I appreciate your comment about this being an open source project, in that light please could you remove your copyright from all the code

AzmodanRO commented 4 years ago

pushed a change to check on the event type on session creation. however, i cannot figure out where the problem comes from. the only thing i can think of is that, being on mac, somehow the .exe.config file is not loaded/not written correctly.

.net executables have the app settings saved in a .exe.config file that usually sits right next to the exe file. in case that directory is not writable, the config file is written in the default user directory. maybe the macos refuses to do that.

TigraTT commented 4 years ago

why do you want the copyrights to be removed? i´m new in open source projects, so i ask! For me this is a private shooting range solution, am i wrong? (or did you want to sell it to any customers?)

as is see in your post, the copyrights should be you smalles problem?? maybe if i get some time in the next days i will test on my iMac and give a feedback. On my W10/64Pro systems everything works fine and i could make all the changes i want.

mjbedford commented 4 years ago

I think a copy right is a completely incompatible with almost all recognised open source licensing.

By applying a copyright to code you are asserting your ownership of the code therefore no one can reproduce or extend it without your consent.

Martyn Bedford +44 (0)7796692467

On 28 Aug 2020, at 12:52, TigraTT notifications@github.com wrote:



why do you want the copyrights to be removed? i´m new in open source projects, so i ask! For me this is a private shooting range solution, am i wrong? (or did you want to sell it to any customers?)

as is see in your post, the copyrights should be you smalles problem?? maybe if i get some time in the next days i will test on my iMac and give a feedback. On my W10/64Pro systems everything works fine and i could make all the changes i want.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ten-point-nine/freETarget/issues/6#issuecomment-682483409, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3YGYTEB57ZNN6GY2WXMB3SC6LBNANCNFSM4QHNE6VQ .

TigraTT commented 4 years ago

OK; understand. thank you

AHenricsson commented 4 years ago

Hi,

That is not accurate. One automatically has copyright of any work one creates no matter if one assert ones ownership or not. This project uses the MIT license which grants anyone the right to reproduce or extend it. The copyright notice does not change this, but instead helps users. In fact it is only through using their copyright that an author can license their work under an free and open source license. The copyright notice at the top of the MIT license is important and should not be removed as

  1. it makes authorship clear and 2. it helps people who redistribute (possibly modified) versions give credit to the original author(s).

It is also not true that copyright is incompatible with open source licensing. In fact many free and open source licenses start with a copyright notice.

So please keep the license as it is now.

Kind Regards

Anders Henricsson

On 8/28/20 2:26 PM, Martyn Bedford wrote:

I think a copy right is a completely incompatible with almost all recognised open source licensing.

By applying a copyright to code you are asserting your ownership of the code therefore no one can reproduce or extend it without your consent.

Martyn Bedford +44 (0)7796692467

On 28 Aug 2020, at 12:52, TigraTT notifications@github.com wrote:



why do you want the copyrights to be removed? i´m new in open source projects, so i ask! For me this is a private shooting range solution, am i wrong? (or did you want to sell it to any customers?)

as is see in your post, the copyrights should be you smalles problem?? maybe if i get some time in the next days i will test on my iMac and give a feedback. On my W10/64Pro systems everything works fine and i could make all the changes i want.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ten-point-nine/freETarget/issues/6#issuecomment-682483409, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3YGYTEB57ZNN6GY2WXMB3SC6LBNANCNFSM4QHNE6VQ .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ten-point-nine/freETarget/issues/6#issuecomment-682497354, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISCRGZWDKYYEQE7DPCAGN3SC6PA5ANCNFSM4QHNE6VQ.

ten-point-nine commented 4 years ago

Anders

Thank you for your thoughtful comment.

When I started this project the intention was that the project could be open to anybody who wanted to build their own electronic target. Not being an expert on copyrights, it seemed like the MIT license achieved those goals with a minimum of interference,

I agree that if the copyright notice serves the dual purpose of recognizing the author's contribution while not preventing somebody else from using it, then the goals of the project are achieved.

I suppose I need to put a copyright notice on the Arduino code and the circuit drawings. I will copy Azmodan's text into mine.

Allan Brown

mjbedford commented 4 years ago

In my experience the copyright if any is that of the open source project not the individual

Martyn Bedford +44 (0)7796692467

On 28 Aug 2020, at 14:11, AHenricsson notifications@github.com wrote:



Hi,

That is not accurate. One automatically has copyright of any work one creates no matter if one assert ones ownership or not. This project uses the MIT license which grants anyone the right to reproduce or extend it. The copyright notice does not change this, but instead helps users. In fact it is only through using their copyright that an author can license their work under an free and open source license. The copyright notice at the top of the MIT license is important and should not be removed as

  1. it makes authorship clear and 2. it helps people who redistribute (possibly modified) versions give credit to the original author(s).

It is also not true that copyright is incompatible with open source licensing. In fact many free and open source licenses start with a copyright notice.

So please keep the license as it is now.

Kind Regards

Anders Henricsson

On 8/28/20 2:26 PM, Martyn Bedford wrote:

I think a copy right is a completely incompatible with almost all recognised open source licensing.

By applying a copyright to code you are asserting your ownership of the code therefore no one can reproduce or extend it without your consent.

Martyn Bedford +44 (0)7796692467

On 28 Aug 2020, at 12:52, TigraTT notifications@github.com wrote:



why do you want the copyrights to be removed? i´m new in open source projects, so i ask! For me this is a private shooting range solution, am i wrong? (or did you want to sell it to any customers?)

as is see in your post, the copyrights should be you smalles problem?? maybe if i get some time in the next days i will test on my iMac and give a feedback. On my W10/64Pro systems everything works fine and i could make all the changes i want.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/ten-point-nine/freETarget/issues/6#issuecomment-682483409 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AE3YGYTEB57ZNN6GY2WXMB3SC6LBNANCNFSM4QHNE6VQ

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/ten-point-nine/freETarget/issues/6#issuecomment-682497354>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AISCRGZWDKYYEQE7DPCAGN3SC6PA5ANCNFSM4QHNE6VQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ten-point-nine/freETarget/issues/6#issuecomment-682550266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3YGYU6RXKM2UYK3D7KC3LSC6UJRANCNFSM4QHNE6VQ .

TigraTT commented 4 years ago

i´m sorry, but i could not make the MAC OS test because my iMac is too old. I only have MAC OS 10.11 and for that i only can use Visual Studio 2017, but on the microsoft website i only found VS 2019.

AzmodanRO commented 4 years ago

VS2017 should be ok (2017 and 2019 are the almost the same release)

TigraTT commented 4 years ago

i have canceled my iMac tests because it is a time thief, and for me Windows 10 is working. I think my iMac is too old for running VS2017, because the installation does not complete, so i stopped these tests. sorry Martyn, i could not help in this case.........