six-updater 0.14.13 → 0.14.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/six/updater.rb +11 -2
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ require 'rake/testtask'
12
12
 
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.name = 'six-updater'
15
- s.version = '0.14.13'
15
+ s.version = '0.14.14'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
@@ -45,13 +45,14 @@ end
45
45
  module Six
46
46
  # TODO: Evaluate if this module should be a class instead?
47
47
  module Updater
48
- VERSION = '0.14.13'
48
+ VERSION = '0.14.14'
49
49
  COMPONENT = 'six-updater'
50
50
 
51
51
  # Configuration
52
52
  ARMA2 = ['SOFTWARE\\Bohemia Interactive Studio\\ArmA 2', 'MAIN']
53
53
  ARMA2_ALT = ['SOFTWARE\\Bohemia Interactive\\ArmA 2', 'InstallPath']
54
54
  ARMA2_STEAM = ['SOFTWARE\\Valve\\Steam\\Common\\ARMA 2', 'InstallPath']
55
+ DESKTOP = ['Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders', 'Desktop']
55
56
  # Fix for WinXP
56
57
  BASE_PATH = if ENV['OCRA_EXECUTABLE']
57
58
  if ENV['OCRA_EXECUTABLE'][/(.*)[\/|\\].*/]
@@ -383,7 +384,15 @@ module Six
383
384
  end
384
385
 
385
386
  def createdesktopshortcut
386
- shortcut "#{ENV['USERPROFILE']}\\Desktop"
387
+ begin
388
+ desktop = Win32::Registry.open(Win32::Registry::HKEY_CURRENT_USER, DESKTOP[0])[DESKTOP[1]]
389
+ while desktop =~ /\%(\w*)\%/ do
390
+ desktop.sub!("%#{$1}%", ENV[$1])
391
+ end
392
+ shortcut desktop if File.directory? desktop
393
+ rescue
394
+ log.warn "WARNING: Problem while creating shortcut! #{$!}"
395
+ end
387
396
  end
388
397
 
389
398
  def uninstall
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: six-updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.13
4
+ version: 0.14.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sickboy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-10 00:00:00 +01:00
12
+ date: 2010-02-13 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency