...
 
Commits (3)
......@@ -27,6 +27,10 @@ type WellsConfig(fn: string) =
match getEnv (configKeyToEnvVar key) with
| null | "" -> keyValuePairs.TryFind key
| envValue -> Some envValue
member this.GetStrDefault key defaultValue =
match this.GetStr key with
| None -> defaultValue
| Some value -> value
member this.GetBool key =
Option.map (fun value -> Regex.IsMatch(value, "^(yes|true|enable|1)$", RegexOptions.IgnoreCase)) (this.GetStr key)
member this.GetFloat key =
......
This diff is collapsed.
# files/dirs to exclude, for syntax, check rsync patterns
# This file is reserved when uninstall/upgrade mbackup.
# lines started with # are comments.
# example:
# *.o
# C:\foo\bar.iso
# local dirs to backup.
# This file is reserved when uninstall/upgrade mbackup.
# lines started with # are comments.
# example:
# C:\mydir
# D:\some dir\some file.doc
# example config file
# example config file, lines start with # are comments.
# target=d:\backup\
# target=myhost.example.com:/data/backup/somedir/
# remote-user=foo
......@@ -6,7 +6,7 @@
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
<RootNamespace>Mbackup</RootNamespace>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>0.2.3.0</Version>
<Version>0.3.0.0</Version>
</PropertyGroup>
<ItemGroup>
......
......@@ -14,58 +14,85 @@
<Directory Id="MBACKUP_DATA" Name="mbackup"/>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
<Directory Id="ProgramMenuFolder" />
<Directory Id="ProgramMenuFolder">
<Directory Id="mbackup_start_menu_dir" Name="mbackup" />
</Directory>
</Directory>
<DirectoryRef Id="MBACKUP_DATA">
<Component Id="default_exclude.txt" Guid="*">
<File Id="default_exclude.txt" Source="mbackup-config\default-exclude.txt" KeyPath="yes"/>
</Component>
<Component Id="default_list.txt" Guid="*">
<File Id="default_list.txt" Source="mbackup-config\default-list.txt" KeyPath="yes"/>
</Component>
<Component Id="local_list.txt" NeverOverwrite="yes" Permanent="yes" Guid="*">
<!-- do not overwrite this component/file if it already exists on target system -->
<File Id="local_list.txt" Source="mbackup-config\local-list.txt" KeyPath="yes"/>
</Component>
<Component Id="local_exclude.txt" NeverOverwrite="yes" Permanent="yes" Guid="*">
<!-- do not overwrite this component/file if it already exists on target system -->
<File Id="local_exclude.txt" Source="mbackup-config\local-exclude.txt" KeyPath="yes"/>
</Component>
<Component Id="mbackup_config.txt" NeverOverwrite="yes" Permanent="yes" Guid="*">
<!-- do not overwrite this component/file if it already exists on target system -->
<File Id="mbackup_config.txt" Source="mbackup-config\mbackup-config.txt" KeyPath="yes"/>
</Component>
<Component Id="user_default_list.txt" Guid="*">
<File Id="user_default_list.txt" Source="mbackup-config\user-default-list.txt" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcutDesktop" Guid="*">
<Shortcut Id="ApplicationDesktopShortcut"
<Component Id="mbackup_desktop_shortcuts" Guid="*">
<Shortcut Id="DesktopMbackupExe"
Name="mbackup"
Description="Backup your computer using rsync"
Target="[#filE3FFB5E42FD6DDB7AD945F29409779F0]"
Target="[!filE3FFB5E42FD6DDB7AD945F29409779F0]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<RemoveFolder Id="DesktopShortcut" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\mbackup" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
<RegistryValue Root="HKCU" Key="Software\mbackup\desktopshortcuts" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="ProgramMenuFolder">
<Component Id="ApplicationShortcutStartMenu" Guid="F7C168BA-BDC9-4C4D-8AE7-722AC399AFD5">
<Shortcut Id="ApplicationStartMenuShortcut"
<DirectoryRef Id="mbackup_start_menu_dir">
<Component Id="mbackup_start_menu" Guid="F7C168BA-BDC9-4C4D-8AE7-722AC399AFD5">
<Shortcut Id="StartMenuMbackupExe"
Name="mbackup"
Description="Backup your computer using rsync"
Target="[#filE3FFB5E42FD6DDB7AD945F29409779F0]"
Target="[!filE3FFB5E42FD6DDB7AD945F29409779F0]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<Shortcut Id="StartMenuMbackupConfig"
Name="mbackup-config.txt"
Description="mbackup config file"
Target="[!mbackup_config.txt]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<Shortcut Id="StartMenuLocalList"
Name="local-list.txt"
Description="mbackup local-list.txt file"
Target="[!local_list.txt]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<RemoveFolder Id="StartMenuShortCut" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\mbackup" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
<Shortcut Id="StartMenuLocalExclude"
Name="local-exclude.txt"
Description="mbackup local-exclude.txt file"
Target="[!local_exclude.txt]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<RemoveFolder Id="MBACKUP_START_MENU_DIR" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\mbackup\startmenushortcuts" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="MBACKUP_DATA">
<Component Id="mbackup_default.exclude" Guid="*">
<File Id="mbackup_default.exclude" Source="mbackup-config\mbackup-default.exclude" KeyPath="yes"/>
</Component>
<Component Id="mbackup_default.list" Guid="*">
<File Id="mbackup_default.list" Source="mbackup-config\mbackup-default.list" KeyPath="yes"/>
</Component>
<Component Id="user_default.list" Guid="*">
<File Id="user_default.list" Source="mbackup-config\user-default.list" KeyPath="yes"/>
</Component>
<Component Id="mbackup.txt" NeverOverwrite="yes" Permanent="yes" Guid="*">
<!-- do not overwrite this component/file if it already exists on target system -->
<File Id="mbackup.txt" Source="mbackup-config\mbackup.txt" KeyPath="yes"/>
</Component>
</DirectoryRef>
<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentGroupRef Id="MbackupHeatGenerated" />
<ComponentGroupRef Id="RsyncHeatGenerated" />
<ComponentRef Id="mbackup_default.exclude" />
<ComponentRef Id="mbackup_default.list" />
<ComponentRef Id="user_default.list" />
<ComponentRef Id="mbackup.txt" />
<ComponentRef Id="ApplicationShortcutStartMenu" />
<ComponentRef Id="ApplicationShortcutDesktop" />
<ComponentRef Id="default_exclude.txt" />
<ComponentRef Id="default_list.txt" />
<ComponentRef Id="local_list.txt" />
<ComponentRef Id="local_exclude.txt" />
<ComponentRef Id="mbackup_config.txt" />
<ComponentRef Id="user_default_list.txt" />
<ComponentRef Id="mbackup_start_menu" />
<ComponentRef Id="mbackup_desktop_shortcuts" />
</Feature>
</Product>
</Wix>
This diff is collapsed.