johnjore / Centrafuse-MapFactor-Navigator

GNU Lesser General Public License v2.1
0 stars 0 forks source link

Compile latest version #3

Open Q2Lummox opened 2 years ago

Q2Lummox commented 2 years ago

Hello, I know this is not a bug, but I can't find another way to contact you.

I was wondering if it is possible to compile the latest version (.12) to be able to download it, since in addition to not knowing how to compile it, the centrafuse SDK is no longer available.

Regards!

johnjore commented 2 years ago

The lack of an SDK is going to present a problem... I also note that centrafuse.com has a very different type of content, and I guess the CF forums are dead so the old download links are gone. As an FYI, I've not used CF since 2018? ish, so no dev system setup for it at the moment.

Grab a copy of the SDK from here: https://1drv.ms/u/s!AsU_5YTV4sBhgskar7I07O4N4vbyoA?e=TEJWFh I'll remove it later, so please grab it now.

I dont have time to setup a dev system to compile the app right now, so give it a shot and let me know in the next three weeks how it went. I'll have some time towards the end of June and might have time todo something then. No promises.

johnjore commented 2 years ago

Btw, what is wrong with https://github.com/johnjore/Centrafuse-MapFactor-Navigator/blob/master/Releases/2.0.9/Navigator_2.0.9.cfapp ?

Found a file called .12, and uploaded it to the Releases folder. It might work...

Q2Lummox commented 2 years ago

First of all, thank you for your time and effort, I appreciate it.

I have tried with the latest version that you have uploaded (.12), with the previous ones I have not tried because I thought that this one, .12, would be the "newest" and the one with the fewest errors.

I have downloaded and installed this version (.12), but when I open the centrafuse, it automatically asks me to specify the directory where the .mca files are located, but I have a problem with the "OK" button. I navigate to the path where the files are located, which is "C:\ProgramData\Navigator\21.3\Data", but when I press the "Ok" button nothing happens, and it does not let me do anything other than exit of the configuration wizard .

I leave you a small video where you can better appreciate what I say.

https://youtu.be/GQM654Evl9E

johnjore commented 2 years ago

a) Could language related. No idea how it behaves on a non-english version. b) Plugin is just a bridge between CF and Navigator, it doesn't do much itself. Later version added support for things like PocketGPS for additional red light and speed camera and automatic imports as POIs etc. Very little had anything todo with making the bridge itself "better".

Use virtualbox, or similar, and an English version of Windows (and Navigator) to see if you can get it working. Might be able to fudge it by adding appropriate dummy (registry/file) entries to your spanish version

also, there should be a log file, somewhere, that shows a bit more about what is going on

also, roll back to .9. The .12 version you are using, might not be a working version at all, but something I was working on at the time and never finished...

Q2Lummox commented 2 years ago

Nothing, tried with the english version of centrafuse and with version .9 of the plugin, and the same thing happened. When starting centrafuse it always asks me to specify the directory containing the .mca files, but the "OK" button doesn't work. Still, I cancel and try to specify the directory from the settings in "Navigation", I save the changes, but when I do, it asks me again to enter the directory where the .mca files are located.

I wonder if there is any option to disable this start wizard that asks for the paths of the program and its .mca files, to be able to do it manually from the plugin settings within the "Navigation" menu

Q2Lummox commented 2 years ago

I have found this part of the code that, I understand, is the one that searches for the folder where the .mca files are:

//Folder with MCA files

    private void SetMCAPath(ref object value)
    {
        try
        {
            if (value.GetType().Equals(typeof(CFSetupHandlerParams)))
            {
                string location = this.configReader.ReadField("/APPCONFIG/MCAPATH");
                if (string.IsNullOrEmpty(location)) location = PluginPath;

                CFDialogParams dialogParams = new CFDialogParams(this.langReader.ReadField("/APPLANG/SETUP/MCAPATH"), location);
                dialogParams.browseable = true;
                dialogParams.enablesubactions = true;
                dialogParams.showfiles = false;
                dialogParams.showextension = true;

                CFDialogResults results = new CFDialogResults();
                if (mainForm.CF_displayDialog(CF_Dialogs.FileBrowser, dialogParams, results) == DialogResult.OK)
                {
                    ((CFSetupHandlerParams)value).result.ok = true;
                    ((CFSetupHandlerParams)value).result.pobject = results.resultobject;
                    ((CFSetupHandlerParams)value).result.text = results.resulttext;
                    ((CFSetupHandlerParams)value).result.value = results.resultvalue;
                    this.configReader.WriteField("/APPCONFIG/MCAPATH", results.resultvalue);

                    //Make sure user can opt to restart Navigator
                    boolAskNavigatorRestart = true;
                }

                ((CFSetupHandlerParams)value).requesttype = CFSetupHandlerRequest.None; //Get out of loop
                return;
            }

            CFSetupHandlerParams internalhandler = new CFSetupHandlerParams();
            internalhandler.requesttype = CFSetupHandlerRequest.None;
            internalhandler.button = (int)value;
            internalhandler.dialogtype = CF_Dialogs.OkBox;
            internalhandler.listviewitems = null;
            internalhandler.writebutton = true;
            internalhandler.writebuttonwithvalue = true;
            internalhandler.title = this.langReader.ReadField("APPLANG/SETUP/MCAPATH");
            internalhandler.listheader = this.configReader.ReadField("/APPCONFIG/MCAPATH");
            value = internalhandler;
        }
        catch (Exception errmsg) { CFTools.writeError(errmsg.Message, errmsg.StackTrace); }
    }

This is the configuration file found at "C:\ProgramData\Centrafuse\Centrafuse Auto\MyUser\Plugins\Navigator\config.xml"

<APPCONFIG> <SKIN>Clean</SKIN> <APPLANG>English</APPLANG> <LOGEVENTS>False</LOGEVENTS> <MUTEUNMUTESTATUS>False</MUTEUNMUTESTATUS> <OSMOK>False</OSMOK> <FREEEDITION>True</FREEEDITION> <EXEPATH>C:\Program Files (x86)\Navigator21\PC_Navigator</EXEPATH> <WINDOWSIZE>0,0,2560,1440</WINDOWSIZE> <TCPPORT>4242</TCPPORT> <ALERTSENABLED>True</ALERTSENABLED> <NAMEDPIPE>False</NAMEDPIPE> <NOHIRES>False</NOHIRES> <AUDIODELAYAFTERMUTE>1800</AUDIODELAYAFTERMUTE> <SETTINGSXMLSWAP>True</SETTINGSXMLSWAP> <LOCALIZE>False</LOCALIZE> <EXITCOUNTER>10</EXITCOUNTER> <TRIMDIGITS>False</TRIMDIGITS> <CFCAMSUPPORT>False</CFCAMSUPPORT> <MCAPATH>C:\Users\Sergio\Descargas\Nueva carpeta (2)\Data</MCAPATH> <OSRM_ENABLE>False</OSRM_ENABLE> <OSRM_TCP_PORT>5000</OSRM_TCP_PORT> </APPCONFIG>

Lastly, this is the plugin log:

05/06/2022 12:20:13 12:20:13.16> CF_pluginInit(): startup


12:20:13.16> CF_pluginInit(): Plugin Version: '2.0.12.0' 12:20:13.16> CF_pluginInit(): CF Version: '4.4.9.201' 12:20:13.16> CF_localskinsetup(): CF_localskinsetup() - start 12:20:13.16> CF_localskinsetup(): Configure for Navigator (Not GPSStatus) 12:20:13.17> CF_localskinsetup(): Create and configure Panel 12:20:13.17> CF_localskinsetup(): Panel configured. Configure screen-size 12:20:13.17> CF_localskinsetup(): pNavigator == null 12:20:13.17> CF_localskinsetup(): CF_localskinsetup() - end 12:20:13.18> LoadSettings(): App Load Config File 12:20:13.18> LoadSettings(): boolOSMOK: True 12:20:13.18> LoadSettings(): boolFREE: True 12:20:13.18> LoadSettings(): strEXEPath: C:\Program Files (x86)\Navigator21\PC_Navigator 12:20:13.18> LoadSettings(): strEXEParameters: 12:20:13.18> LoadSettings(): REGNavigator: SOFTWARE\MapFactor\set\pcnavigator_21 12:20:13.18> GetProductKey(): Reading product key from 'C:\PROGRAMDATA\NAVIGATOR\21.3\atlas_pcn_free.idc' 12:20:13.19> GetProductKey(): ProductKey: X87UXGEZULSTFUS53GR3P42HF 12:20:13.19> LoadSettings(): Using FREE edition 12:20:13.19> LoadSettings(): strEXEParameters: --atlas=C:\PROGRAMDATA\NAVIGATOR\21.3\atlas_pcn_free.idc 12:20:13.19> LoadSettings(): Window Size: 0,0,2560,1440 12:20:13.19> LoadSettings(): intTCPPort: 4242 12:20:13.19> LoadSettings(): boolAlerts: True 12:20:13.19> LoadSettings(): boolNamedPipes: False 12:20:13.19> LoadSettings(): intDelay: 1800 12:20:13.19> LoadSettings(): Swap mapFactor Navigator's settings.xml files around: True 12:20:13.19> LoadSettings(): Localize GPS Status screen: : False 12:20:13.19> LoadSettings(): intExitCounter: 10 12:20:13.19> LoadSettings(): Trim digits: False 12:20:13.19> LoadSettings(): CFCam Support : False 12:20:13.19> GetDataPath(): Reading data path from 'C:\PROGRAMDATA\NAVIGATOR\21.3\atlas_pcn_free.idc' 12:21:14.12> LoadSettings(): Found :earth_osm 12:21:14.12> LoadSettings(): mca folder : 'C:\Users\Sergio\Descargas\Nueva carpeta (2)\Data' 12:21:14.12> LoadSettings(): LiveTraffic MCA file does not exist. Failed to remove mca file 12:21:14.12> LoadSettings(): boolOSRMEnabled: False 12:21:14.12> LoadSettings(): intOSRMPort: 5000 12:21:14.12> LoadSettings(): Pocket GPS folder: 12:21:14.12> LoadSettings(): Dynamic Audio Level: False 12:21:14.12> LoadSettings(): boolUseCFMixerforATT: True 12:21:14.12> LoadSettings(): CF_ConfigFlags.AttMute: 'False' 12:21:14.12> LoadSettings(): CF_ConfigFlags.Fullscreen: 'False' 12:21:14.12> LoadSettings(): CF_ConfigFlags.GPSAttMute: 'True' 12:21:14.12> LoadSettings(): CF_ConfigFlags.GPSEnableVoice: 'True' 12:21:14.12> LoadSettings(): CF_ConfigFlags.GPSFullscreen: 'False' 12:21:14.12> LoadSettings(): CF_ConfigFlags.GPSSetNavSoundLevel: 'False' 12:21:14.12> LoadSettings(): CF_ConfigFlags.NightSkinFlag: 'False' 12:21:14.12> LoadSettings(): CF_ConfigFlags.RadioMute: 'False' 12:21:14.12> LoadSettings(): CF_ConfigSettings.GPSNavSoundLevel: '15' 12:21:14.12> LoadSettings(): CF_ConfigSettings.AttMuteLevel: '15' 12:21:14.12> LoadSettings(): CF_ConfigSettings.GPSVoicePrompts: '2|16' 12:21:14.12> LoadSettings(): CF_ConfigSettings.OSVersion: 'Win7' 12:21:14.12> CF_pluginInit(): Create the panel to use for mapFactor Navigator 12:21:14.13> TerminateOrphanedProcess(): Listing all processes to check if PC_Navigator.exe is running 12:21:14.13> ConfigureNavigatorXML(): Path :C:\Users\Sergio\AppData\Roaming\Navigator\21.3 12:21:14.13> ConfigureNavigatorXML(): XML exists 12:21:14.13> ConfigureNavigatorXML(): CF Exists 12:21:14.13> ConfigureNavigatorXML(): Renamed XML to NAV 12:21:14.13> ConfigureNavigatorXML(): Renamed CF to XML 12:21:14.13> ConfigureNavigatorXML(): Communication type set to: tcpip 12:21:14.14> ConfigureNavigatorXML(): IP Address configured: 127.0.0.1 12:21:14.14> ConfigureNavigatorXML(): Port configured: 4242 12:21:14.14> ConfigureNavigatorXML(): 'Minimize' removed 12:21:14.14> ConfigureNavigatorXML(): 'Exit' removed 12:21:14.15> ConfigureNavigatorXML(): Suspend configured: yes 12:21:14.16> unpatchNavigator(): Checking whether PC_Navigator.exe is patched for Named Pipe Support or not. Desired state: UnPatched 12:21:14.17> ByteMatch(): Looped all, and still true. First match @ 0x4FF416 12:21:14.18> unpatchNavigator(): Patch not applied. No further action required 12:21:14.18> SetupNamedPipe(): Patch successfully removed or already removed 12:21:14.18> LaunchNavigator(): Launching Navigator using: 'C:\Program Files (x86)\Navigator21\PC_Navigator\PC_Navigator.exe' 12:21:14.18> LaunchNavigator(): Parameters: '--window_border=no --atlas=C:\PROGRAMDATA\NAVIGATOR\21.3\atlas_pcn_free.idc --window_position=0,0,2560,1440' 12:21:14.18> TerminateOrphanedProcess(): Listing all processes to check if PC_Navigator.exe is running 12:21:14.21> LaunchNavigator(): Blocking input: True 12:21:14.71> LaunchNavigator(): Navigator started, waiting for process to idle 12:21:14.71> LaunchNavigator(): Waiting for Navigator to get idle... (totalProcessorTime used = 00:00:00.4843750 12:21:15.21> LaunchNavigator(): Waiting for Navigator to get idle... (totalProcessorTime used = 00:00:00.9218750 12:21:15.71> CF_localskinsetup(): CF_localskinsetup() - start 12:21:15.71> CF_localskinsetup(): Configure for Navigator (Not GPSStatus) 12:21:15.72> CF_localskinsetup(): Create and configure Panel 12:21:15.72> CF_localskinsetup(): Panel configured. Configure screen-size 12:21:15.72> CF_localskinsetup(): thepanel.Handle: 0x5509D0, pNavigator.MainWindowHandle 0x420AC4 12:21:15.73> CF_localskinsetup(): Connected to new panel again 12:21:15.73> SetNonFullScreen(): Configure for non-fullscreen 12:21:15.73> SendCommand(): Trying to establish connection. BeginConnect() Started 12:21:15.73> OnConnect(): Connection made 12:21:15.73> SendCommand(): Success: True 12:21:15.73> SendCommand(): Connected 12:21:15.73> SendCommand(): Sending '$protocol_version' 12:21:15.73> SendCommand(): Sending '$software_version' 12:21:15.73> SendCommand(): Sending '$window=0,0,700,392,noborder' 12:21:15.73> CF_localskinsetup(): CF_localskinsetup() - end 12:21:15.73> TerminateOrphanedProcess(): Listing all processes to check if PC_Navigator.exe is running 12:21:15.74> TerminateOrphanedProcess(): PC_Navigator is running 12:21:15.74> LaunchNavigator(): Navigator process exists 12:21:15.74> LaunchNavigator(): MainWindowHandle before parenting = 0x420AC4 12:21:15.74> LaunchNavigator(): thepanel.Handle = 0x5509D0 12:21:15.74> LaunchNavigator(): Connected to panel 12:21:15.74> LaunchNavigator(): MainWindowHandle after parenting = 0x420AC4 12:21:15.74> LaunchNavigator(): Panel hidden 12:21:16.13> OnRecievedData(): TCPCommand 'Protocol' arrived 12:21:16.13> OnRecievedData(): Navigator TCP Protocol Version: '2.4.0' 12:21:16.13> OnRecievedData(): TCPCommand 'SoftwareVersion' arrived 12:21:16.13> OnRecievedData(): Navigator Version: '21,3', revision '8' 12:21:16.16> OnRecievedData(): Command for 'Window' was successfull 12:21:16.24> LaunchNavigator(): Coordinates : 0,0,2560,1440 12:21:16.24> LaunchNavigator(): Mouse Position mWidth: 1280, mHeight: 1330 12:21:16.24> LaunchNavigator(): Positioning Mouse Cursor: True 12:21:16.24> LaunchNavigator(): Sending Mouse Clicks 12:21:16.25> CF_localskinsetup(): CF_localskinsetup() - start 12:21:16.25> CF_localskinsetup(): Configure for Navigator (Not GPSStatus) 12:21:16.26> CF_localskinsetup(): Create and configure Panel 12:21:16.26> CF_localskinsetup(): Panel configured. Configure screen-size 12:21:16.26> CF_localskinsetup(): thepanel.Handle: 0x4907F6, pNavigator.MainWindowHandle 0x420AC4 12:21:16.26> CF_localskinsetup(): Connected to new panel again 12:21:16.26> SetNonFullScreen(): Configure for non-fullscreen 12:21:16.26> SendCommand(): Sending '$window=0,0,700,392,noborder' 12:21:16.26> CF_localskinsetup(): CF_localskinsetup() - end 12:21:16.26> LaunchNavigator(): Sending minimize command to window with handle 0x420AC4 12:21:16.26> LaunchNavigator(): Blocking input: False 12:21:16.27> SetNonFullScreen(): Configure for non-fullscreen 12:21:16.27> SendCommand(): Sending '$window=0,0,700,392,noborder' 12:21:16.27> SendCommand(): Sending '$gps_sending=start;nmea' 12:21:16.27> SendCommand(): Sending '$set_mode=day' 12:21:16.27> SendCommand(): Sending '$navigation_info=sound_warning:on' 12:21:16.27> SendCommand(): Sending '$sound_volume=on' 12:21:16.27> SendCommand(): Sending '$navigation_info=waypoint_info:on' 12:21:16.27> SendCommand(): Sending '$navigation_info=recalculation_warning:on' 12:21:16.62> OnRecievedData(): Command for 'Window' was successfull 12:21:16.62> OnRecievedData(): Command for 'Window' was successfull 12:21:16.62> OnRecievedData(): Command for 'GPSSending' was successfull 12:21:16.65> OnRecievedData(): Command for 'DayNight' was successfull 12:21:16.65> OnRecievedData(): Command for 'NavInfoSoundWarning' was successfull 12:21:16.65> OnRecievedData(): Command for 'SoundVolume' was successfull 12:21:16.65> OnRecievedData(): Command for 'NavInfoWaypointInfo' was successfull 12:21:16.65> OnRecievedData(): Command for 'NavInfoRecalculationWarning' was successfull 12:21:18.92> CF_pluginShow(): Start: CF_pluginShow 12:21:18.92> CF_pluginShow(): Not active CFNav engine or Navigator already initialized 12:21:18.92> SetDayNightToggle(): AUTOSWITCHSKIN: True 12:21:18.92> SendCommand(): Sending '$maximize' 12:21:19.13> OnRecievedData(): Command for 'Maximize' was successfull 12:21:21.02> CF_pluginCMLCommand(): CF_pluginCMLCommand: Centrafuse.Main.MainMenu, state: Click 12:21:21.02> CF_pluginCMLCommand(): CF_pluginCMLCommand: Centrafuse.Main.MainMenu, state: Click 12:21:21.21> CF_pluginHide(): Start: CF_pluginHide 12:21:21.21> SendCommand(): Sending '$minimize' 12:21:21.26> SendCommand(): Sending '$navigation_statistics' 12:21:21.27> GetNavigatorRoutingXML(): Not Navigating. No route to return 12:21:21.63> OnRecievedData(): Command for 'Minimize' was successfull 12:21:21.86> CF_pluginCMLCommand(): CF_pluginCMLCommand: Centrafuse.Main.MainMenu, state: Click 12:21:22.56> CF_pluginClose(): CF_pluginClose() - Start 12:21:22.56> CF_pluginClose(): Shutdown TCP connection 12:21:22.56> CloseNavigator(): Disconnecting TCP connection for reuse 12:21:22.63> CloseNavigator(): Can't stop a non-running pipe-server 12:21:22.63> TerminateOrphanedProcess(): Listing all processes to check if PC_Navigator.exe is running 12:21:22.64> TerminateOrphanedProcess(): PC_Navigator is running 12:21:22.64> CloseNavigator(): Waiting for Navigator to close: 10 12:21:22.64> ClickOnPoint(): Sending left mouse click to window with handle 0x420AC4 12:21:22.64> ClickOnPoint(): Mouse click sent to window with handle 0x420AC4, iStat1 = 1, iStat2 = 1 12:21:22.91> pNavigator_Exited(): BoolExit is True. No autostart of navigator 12:21:22.91> TerminateOrphanedProcess(): Listing all processes to check if PC_Navigator.exe is running 12:21:22.91> TerminateOrphanedProcess(): Listing all processes to check if PC_Navigator.exe is running 12:21:22.91> CF_pluginClose(): TCP connection closed 12:21:22.91> CF_pluginClose(): Success - TCPCommandQueue empty 12:21:22.91> CF_pluginClose(): Remove PowerModeChange event handler... 12:21:22.92> CF_pluginClose(): Remove NavigatorExit event handler... 12:21:22.92> CF_pluginClose(): Remove timer event handlers... 12:21:22.92> CF_pluginClose(): CF_pluginClose() - End


Inside the "C:\Users\Sergio\Descargas\Nueva carpeta (2)\Data" folder there are several .mca files.

When running Centrafuse, where the plugin is supposed to look to check for the folder with the .mca files?, I've tried creating the "Data" folder with these .mca files inside, in several places, but every time I start Centrafuse it tells me to specify the folder containing the .mca files.... :__(

Q2Lummox commented 2 years ago

I know that giving "support" to this plugin that no one uses anymore is a waste of time, but I would be grateful if you could help me with it. I would just like the plugin not to check the "MCA" folder and just run looking for the files in the folders that have been manually configured.

If you could please make this change... it would make me extremely happy.

johnjore commented 2 years ago

Mate, I told on May 30th that "I dont have time to setup a dev system to compile the app right now, so give it a shot and let me know in the next three weeks how it went. I'll have some time towards the end of June and might have time todo something then. No promises."

I got off the plane about 3h ago and have not had internet access for the past two weeks. Will look at this, with about a 100 other pressing items, over the next few days.

Patience.

Q2Lummox commented 2 years ago

Sorry, I'm not in a hurry. Not much less do I want to rush you, I understand that this is not a priority. When I didn't receive a response, I thought that I would simply not give more support (which I would understand perfectly).

I'm sorry I seem like a pain in the ass.

You can let me know around here when you have some time to devote to this.

Cheers and thank you again.

johnjore commented 2 years ago

Looks like you are still using .12? "2.0.12.0"

That version was never released and is probably a half baked, half done version that only works on my specific setup while implementing something that I can't remember.

Roll back and use .9 as per the releases instead. Might need to flush the CF cache todo this.

Q2Lummox commented 2 years ago

Yes, the logs show version .12, but I also tried version .9, first uninstalling centrafuse and starting with a "clean" installation and still had the same problem. When I launch centrafuse it asks me to configure the paths, both for the mapfactor executable and for the MCA directory. Although I configure them with this wizard, when I close centrafuse and reopen it, it asks me again to configure the MCA directory (what it doesn't ask me anymore, is the path of the mapfactor executable)

johnjore commented 2 years ago

Sorry, you are misunderstanding. .12 was never released and I have no intention of spending time fixing it. The source code is published and you are free to compile your own version and submit PRs etc.

If you want my help .9 is the version to use and show me a log file and a screenshot (photo) of the problem, and I'll see if I can figure out what the issue is.

Q2Lummox commented 2 years ago

Yes, I have understood you correctly, I have to do the tests and show you the log of version .9. The .12 was never a finished version...

I am going to prepare a clean installation of centrafue with version .9 of the plugin and show you the results of the log.

Thank you very much again.