MX on Windows OS: Difference between revisions

3,425 bytes added ,  15:37, 6 April 2022
m
Add explanation for why do not put in "Program Files"
m (Add explanation for why do not put in "Program Files")
Line 2: Line 2:
=Introduction=
=Introduction=


This page is a simple summary for installing and running (non-beta) releases of MX on any computer running the Microsoft Windows Operating System.
This page is a simple summary for installing and running (non-beta) releases of MX on any computer running the Microsoft Windows Operating System (e.g. personal computer, notebook computer, laptop computer, Raspberry Pi with Windows instead of Linux, etc.).


If you are not running MX using the Microsoft Windows Operating System, then please see [[MX on Linux]] page instead.
If you are not running MX using the Microsoft Windows Operating System, then please read [[MX on Linux]] page in this Wiki instead.


There are various related pages to get more information:
There are various related pages to get more information:
Line 14: Line 14:
*The [[Cumulus MX FAQ]] page was created with snippets from the forum, but nobody has yet sorted this out into a useful page or updated it for recent releases
*The [[Cumulus MX FAQ]] page was created with snippets from the forum, but nobody has yet sorted this out into a useful page or updated it for recent releases
*If you want to use a script language, you might want to read [[PHP|PHP Hypertext Preprocessor and JavaScript]] page
*If you want to use a script language, you might want to read [[PHP|PHP Hypertext Preprocessor and JavaScript]] page
=Already have Cumulus?=
== Report and data files to copy across from any previous Cumulus location ==
All the (optional) files in the [[Reports folder]] can be copied across from a previous installation. It should not matter which release created past files, although ideally you need to ensure that the report naming and encoding described on that linked page remain the same.
<br>
Whilst you should copy ALL the files in the [[data folder]], from any old installation into the new installation, there are several extra considerations:
* '''Your new MX installation will ignore any entries prior to the MX Start Date'''  when it reads from [[Monthly log files]], such as [[Standard log files]], and [[Extra Sensor Files]]:
**  See [[Cumulus.ini#Data_Logging|'''StartDate=xxxxx''']] parameter, edit using ''Station Settings → Common Options → Advanced Options → Records Began date''
* Be aware your new installation has to use the same "locale" as the old installation, or MX will struggle as the locale affects how new lines are stored, and how MX expects old lines to have been stored the same way.
* If your old installation, is on a different operating system to the Microsoft Windows for your new installation, remember that Microsoft Windows uses different line terminators to all other operating systems, although MX should cope with mixed line terminators, any third party routines reading your data files will probably not accept a line terminator change.
* If your previous Cumulus installation was of the legacy software, version 1.9.4, or earlier, then you need to do a lot of reading:
** [[Amending dayfile]] tells you about how MX is far more fussy about the content in [[dayfile.txt]]
** [[:Category:Ini Files|.ini files]] explains how time-stamps are formatted differently in the extreme tracking files
** [[Migrating from Cumulus 1 to MX]] gives some advice about differences in settings, but be aware that the way MX handles settings varies by release, and information on the linked page may be out of date
==Configuration Files to copy across from any previous Cumulus installation==
There are two configuration files that are not included in any MX release:
*[[strings.ini]] (Windows is case insensitive, so your file might have capitals) – optional file to customise output
*[[Cumulus.ini]] (Windows is case insensitive,so your file might be all lower case) – main configuration file
Just copy the existing files from old to new installation, if
# Your locale (Language settings in the Settings app, Regional Settings in the Windows Control Panel, even on Windows 10) is still the same
# All files on your new install are in same paths as on your old install (some settings involve specifying paths)
# Your old installation has a relatively recent MX release (compare the "y" in 3.y.z,between old and new installation,  a difference of more than 1 means you do not have a recent release)
# Your old installation was on computer running Microsoft Windows Operating System,  (not a Linux computer)
If you are upgrading from an older release, please read the table for advice.
{| class="wikitable"
|-
! scope="col" style="width:450px; color:blue" | Cumulus.ini !! scope="col" style="width:450px; color:navy" | strings.ini
|-
| Your old installation will have this file. In general, ''if your old installation was any release before 3.8.0'', the advice is give  the old file a different name when you copy it across to the new installation, and let MX create the file as you work through all the settings.
| '''This is an optional file'''.  Its [[strings.ini|purpose]] is to allow customisation of some of the outputs from Cumulus. You might want to use customisation to abbreviate (or extend) some outputs, or to change those outputs into another language.
|-
| When you work through the Settings pages, MX will create this file if it does not exist.
* If your old installation was of the legacy software then do consult [[Migrating from Cumulus 1 to MX]]
* As MX evolves, the former "read-only" settings in this file are becoming "advanced" settings in the interface.
| You create a “strings.ini” file by '''selecting some of the parameter'''s from the [[Samplestring.ini]] file that is included in each MX release, and ''modifying the value for the listed attributes'' as you type just those you selected (under the same group titles - these are enclosed in [ ] as before).
The sections that appear in '''samplestring.ini''', and the parameters that appear within a section, depend upon which release you are using.  So be cautious if you try to reuse a "strings.ini" file originally created by the legacy software, you may find you need to specify your customisation using different parameters in the latest "samplestring.ini".
|-
|  The content of "Cumulus.ini" is changing as MX is developed, the [https://cumulus.hosiene.co.uk/viewtopic.php?f=40&t=17887 Release Announcements] normally list any new parameters as they appear in the file, without always mentioning those that have become redundant. The announcements tend to avoid any detail, so you have to guess ''from the attribute'' what values it might take, and generally have no idea of where to make any change.
To remove any parameters no longer used in this file, see [[Cumulus.ini#How_to_Remove_Redundant_parameters_from_file|remove redundant parameters]]
If your old file contains any [[Cumulus.ini (Cumulus 1)|legacy read-only]] parameters not yet converted into advanced settings, or any [[Cumulus.ini (MX 3.0.0 to 3.7.0)|MX read-only parameters not yet converted into advanced settings]], you may need to manually add such missing parameters back into new file by stopping MX (after finishing all the settings you can configure in the interface), doing an external file edit, and then restarting MX
| The content of "samplestring.ini" is changing as MX is developed:
* Therefore, your existing “strings.ini” might need to be modified.
* There is no automatic way to check your “strings.ini” file, if MX does not understand any parameter in this file, it ignores it.
* Instead, you need to manually check each parameter you have in your “strings.ini” file to see if that parameter is still in the “samplestring.ini” included in the release you have installed.
* You may also find new parameters in “samplestring.ini” that you wish to add to your “strings.ini” file to tailor new functionality to your preferences.
|}
If you previously used an older release of Cumulus, but in this new installation will be using the latest release (latest is what is normally best, unless it has bugs), you may want to read up on all the changes between your old release and the current release, not just changes that affect the configuration file.


=Cumulus Software=
=Cumulus Software=
Line 99: Line 38:


As at 9 March 2020, another utility, '''CreateRecord''', has been initialised in the Github areas managed by the developer where Cumulus is worked on, although it appears to be just a concept (any code on the developer's computer has not yet been included) on github.  This will, if my understanding is correct, read [[dayfile.txt]] and use that to update the various [[:Category:Ini Files|extreme record files]].
As at 9 March 2020, another utility, '''CreateRecord''', has been initialised in the Github areas managed by the developer where Cumulus is worked on, although it appears to be just a concept (any code on the developer's computer has not yet been included) on github.  This will, if my understanding is correct, read [[dayfile.txt]] and use that to update the various [[:Category:Ini Files|extreme record files]].
== Where to store download ==
There are no firm rules.
* Most browsers, if you don't change any options, will download to a sub-folder that is called "Download" within the Current User's folder  (or a location elsewhere that is associated with a link of that name)
** Some people change the default, so they can place all downloads onto a separate partition, or a separate disc, mostly because it helps to keep downloads safe in case your main computer disc fails.
* A beginner may find it easier to create a new folder specifically for storing MX download zips, so it is easy to find if your standard download location is used a lot.
* It probably is not sensible for a beginner to store the download zip in a "temp" folder, although that is sometimes suggested for downloads that do not need to be kept.


== Earlier MX releases ==
== Earlier MX releases ==
Line 111: Line 60:
Anyway, '''you can download any earlier build, without the bug''', from [https://github.com/cumulusmx/CumulusMX/releases CumulusMX/releases].
Anyway, '''you can download any earlier build, without the bug''', from [https://github.com/cumulusmx/CumulusMX/releases CumulusMX/releases].


You need to ensure that you use the right version of "CreateMissing.exe" and "ExportToMySQL.exe" utilities for the MX release you are running, so if you are using an old MX release, you will need to go directly to the [https://github.com/cumulusmx Cumulus MX github] page, and navigate to the utility of interest, to download an older version of these utilities that matches your older MX.
You need to ensure that you use the right version of "CreateMissing.exe" and "ExportToMySQL.exe" utilities for the MX release you do install, as some modules are shared. Therefore if you are using an old MX release, you will need to go directly to the [https://github.com/cumulusmx Cumulus MX github] page, and navigate to the utility of interest, to see if you need to download an older version of these utilities that matches to your older MX.
 
 
=Unzip the package, and install MX=


Please note there are rules governing where you can install MX.


=Where to store the download zip, and where to extract the files =
==Have you already got Cumulus MX?==


# Most browsers, if you don't change any options, will download to the Current User's folder that is called "Download" (or associated with a link of that name)
# It is good practice to backup your existing MX installation, (i.e. make a copy that is placed somewhere else, so it is easy to check what you had before; and if you find a bug in new release, or you make a mistake during the new installation, it is easy to regress to the earlier version)
#* Some people change the default, so they can place all downloads onto a separate partition, or a separate disc, mostly because it helps to keep downloads safe in case your main computer disc fails.
# Now install the new MX over where the old MX was
# It is good practice to backup your existing MX installation, if you have one, before you install a new MX release over it (as if there is a bug in the new release,people regress back to their old one)
#* This makes life simpler, as you know you will retain all files needed that are not included inthe new release
# When download completes, use the mouse (those unable to use the mouse should do the equivalent keyboard action) to click on the download file name, this should ask if you want to extract (unzip) it.
# The only rule about where you put the MX files is "avoid the 'Program File' hierarchy".
#* MX uses a number of different computer languages and multiple components. It is best to keep the path to where you install it short, to remove any possibility of path name being truncated as it is passed between components.
#* Best practice is to place MX files in the root directory of any disc or partition where you can have frequent updating
#* Normally, you will unzip over any existing MX installation, so you retain all files not part of the release distribution


If you already have MX installed, you should be following the [[Updating MX to new version|Upgrade]] page advice:
If you already have MX installed, you should be following the [[Updating MX to new version|Upgrade]] page advice:
* It is not a good idea to skip too many in-between releases
* It is not a good idea to skip too many in-between releases
* Read the relevant release announcement at [https://cumulus.hosiene.co.uk/viewtopic.php?f=40&t=17887 Cumulus MX Announcements and Download - PLEASE READ FIRST], for all in-between releases just in case particular releases have one-off tasks associated with that release.
* Read the relevant release announcement at [https://cumulus.hosiene.co.uk/viewtopic.php?f=40&t=17887 Cumulus MX Announcements and Download - PLEASE READ FIRST], for all in-between releases just in case particular releases have one-off tasks associated with that release.
==Where should you install MX if you have not used MX before?==
# When download completes, use the mouse (those unable to use the mouse should do the equivalent keyboard action) to click on the download file name, this should ask if you want to extract (unzip) it.
# If there is an option as to whether to preserve folder structure, then select to preserve it, and be aware that this extracts into a folder with a name  '''CumulusMX3xyz'''  where the digits represented there by "xyz" identifies the build
# You should therefore extract to the download location (see earlier), and then copy, or file transfer all the files in sub-folder of that into appropriate place, following hierarchy in final location
# The final location has a small number of important rules, although there is some flexibility if you have multiple drives.
#* MX uses a number of different computer languages and multiple components. It is best to keep the path to where you install it short, to remove any possibility of path name being truncated as it is passed between components.
#* Best practice is to place MX files in the root directory of any disc or partition where you can have frequent updating, i.e. '''G:\CumulusMX''' (where G is the chosen drive, might be ''C:'' and '''CumulusMX''' is a short informative folder name that matches the top folder under the name  '''CumulusMX3xyz''' in the release download after extraction from zip.
#* There is one place, where you must not store MX, and that is "avoid the 'Program File' hierarchy".
#*# Let me explain that:
#*# Microsoft tell developers to put code in '''C:\Program Files''' or ''c:\Program Files (x86)'' as these are read only folders except when software is being installed, and Microsoft tells developers to put data files for that software in '''c:\ProgramData'''
#*# Cumulus MX has not been developed in accordance with those Microsoft specific rules
#*# Consequently, if you did wrongly install MX in the above hierarchy, the read-only rule would mean that Microsoft stores any files that MX updates in say the [[Data folder|data sub-folder]] after the software installation into ''C:\Users\user_name\AppData\Local\VirtualStore\Program Files\CumulusMX\data'' (and similar redirection for other sub-folders)
#*# The problem then is that your Microsoft Windows computer now has two "data" (and other) sub-folders, so MX gets confused as to which sub-folder to look in for each file within the data (and other) sub-folders (as any file not updated is in installation sub-folder, while any file that has been updated is in the redirection sub-folder).


= Requirements for running MX on Windows =
= Requirements for running MX on Windows =
Line 384: Line 349:
# The "lib" sub-folder contains further levels of sub-folders all to be replicated on your web site.
# The "lib" sub-folder contains further levels of sub-folders all to be replicated on your web site.
# The '''trends.htm''' web page also loads some library software from an internet Content Delivery Network (cdn) to invoke the JavaScript based Highstocks library.
# The '''trends.htm''' web page also loads some library software from an internet Content Delivery Network (cdn) to invoke the JavaScript based Highstocks library.
=Already have Cumulus?=
== Report and data files to copy across from any previous Cumulus location ==
All the (optional) files in the [[Reports folder]] can be copied across from a previous installation. It should not matter which MX release created past files, although ideally you need to ensure that the report naming and encoding described on that linked page remain the same.  If you previously used the legacy Cumulus 1, on the same computer, the same requirement for settings compatibility applies. If however you previously used the legacy Cumulus 1 on a different computer, then you may have some difficulty in accessing the old files because of differences in the default settings, please see [[Migrating from Cumulus 1 to MX]] page and read about why it is often more complex.
<br>
Whilst you should copy ''nearly'' ALL the files in the [[data folder]], from any old installation into the new installation, there are several extra considerations:
* MX cannot understand the Cumulus 1 [[Log.xml|log file]] (aka [[Weather Diary]]), so there is no point in copying that from the legacy Cumulus to a MX folder
* If your previous Cumulus installation was of the legacy software, version 1.9.4, or earlier, then you need to do a lot of reading:
** [[Amending dayfile]] tells you about how MX is far more fussy about the content in [[dayfile.txt]]
** [[:Category:Ini Files|.ini files]] explains how time-stamps are formatted differently in the extreme tracking files
** [[Migrating from Cumulus 1 to MX]] gives some advice about differences in settings, but be aware that the way MX handles settings varies by release, and information on the linked page may be out of date
* When copying [[Standard log files|MMMYYlog.txt]] files and [[Extra Sensor Files|ExtraLogyyyymm.txt]] files, be aware that '''your new MX installation will ignore any entries prior to the MX Start Date'''  when it reads those files:
**  See [[Cumulus.ini#Data_Logging|'''StartDate=xxxxx''']] parameter, edit using ''Station Settings → Common Options → Advanced Options → Records Began date''
* Some releases of MX are very fussy, some are less fussy, about all lines in all [[:Category:Files_with_Comma_Separated_Values]] being totally consistent in all "locale" settings.
* If your old MX installation, is on a different operating system to the Microsoft Windows for your new installation, remember that Microsoft Windows uses different line terminators to all other operating systems, although MX should cope with mixed line terminators, any third party routines reading your data files will probably not accept a line terminator change.
==Configuration Files to copy across from any previous Cumulus installation==
There are two configuration files that are not included in any MX release:
*[[strings.ini]] – optional file to customise output (MX content significantly different to legacy Cumulus content)
*[[Cumulus.ini]] – main configuration file (Substantial changes to content at release 3.12.0, some changes at other releases)
Just copy the existing files from old to new installation, if
# Your locale (Language settings in the Settings app, Regional Settings in the Windows Control Panel (use that not "Settings" even on Windows 10/11) is still the same
# All files on your new install are in same paths as on your old install (some settings involve specifying paths)
# Your old installation has a relatively recent MX release (compare the "y" in 3.y.z,between old and new installation,  a difference of more than 1 means you do not have a recent release)
# Your old installation was on computer running Microsoft Windows Operating System,  (not a Linux computer)
If you are upgrading from an older release, please read the table for advice.
{| class="wikitable"
|-
! scope="col" style="width:450px; color:blue" | Cumulus.ini !! scope="col" style="width:450px; color:navy" | strings.ini
|-
| Your old installation will have this file. In general, ''if your old installation was any release before 3.8.0'', the advice is give  the old file a different name when you copy it across to the new installation, and let MX create the file as you work through all the settings.
| '''This is an optional file'''.  Its [[strings.ini|purpose]] is to allow customisation of some of the outputs from Cumulus. You might want to use customisation to abbreviate (or extend) some outputs, or to change those outputs into another language.
|-
| When you work through the Settings pages, MX will create this file if it does not exist.
* If your old installation was of the legacy software then do consult [[Migrating from Cumulus 1 to MX]]
* As MX evolves, the former "read-only" settings in this file are becoming "advanced" settings in the interface.
| You create a “strings.ini” file by '''selecting some of the parameter'''s from the [[Samplestring.ini]] file that is included in each MX release, and ''modifying the value for the listed attributes'' as you type just those you selected (under the same group titles - these are enclosed in [ ] as before).
The sections that appear in '''samplestring.ini''', and the parameters that appear within a section, depend upon which release you are using.  So be cautious if you try to reuse a "strings.ini" file originally created by the legacy software, you may find you need to specify your customisation using different parameters in the latest "samplestring.ini".
|-
|  The content of "Cumulus.ini" is changing as MX is developed, the [https://cumulus.hosiene.co.uk/viewtopic.php?f=40&t=17887 Release Announcements] normally list any new parameters as they appear in the file, without always mentioning those that have become redundant. The announcements tend to avoid any detail, so you have to guess ''from the attribute'' what values it might take, and generally have no idea of where to make any change.
To remove any parameters no longer used in this file, see [[Cumulus.ini#How_to_Remove_Redundant_parameters_from_file|remove redundant parameters]]
If your old file contains any [[Cumulus.ini (Cumulus 1)|legacy read-only]] parameters not yet converted into advanced settings, or any [[Cumulus.ini (MX 3.0.0 to 3.7.0)|MX read-only parameters not yet converted into advanced settings]], you may need to manually add such missing parameters back into new file by stopping MX (after finishing all the settings you can configure in the interface), doing an external file edit, and then restarting MX
| The content of "samplestring.ini" is changing as MX is developed:
* Therefore, your existing “strings.ini” might need to be modified.
* There is no automatic way to check your “strings.ini” file, if MX does not understand any parameter in this file, it ignores it.
* Instead, you need to manually check each parameter you have in your “strings.ini” file to see if that parameter is still in the “samplestring.ini” included in the release you have installed.
* You may also find new parameters in “samplestring.ini” that you wish to add to your “strings.ini” file to tailor new functionality to your preferences.
|}
If you previously used an older release of Cumulus, but in this new installation will be using the latest release (latest is what is normally best, unless it has bugs), you may want to read up on all the changes between your old release and the current release, not just changes that affect the configuration file.


= Operating a web site with uploads from MX engine =
= Operating a web site with uploads from MX engine =
5,838

edits