-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
45 lines (36 loc) · 1.22 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
desc "Collect dependencies and environment variables"
task :collect do
# TODO: Recursive dirs
ruby "build/collector/collect.rb --windows --dll rubyw.exe.manifest --out build/app SymeApp.rb theme/* theme/*/*"
end
file "build/app/env.nsh" => :collect
file "build/Syme.exe" => :launcher
desc "Build launcher"
task :launcher => ["build/app/env.nsh"] do
# NSIS should be installed
require 'win32/registry'
nsis_path = Win32::Registry::HKEY_LOCAL_MACHINE.open('Software\NSIS') do |entry| entry.read_s "" end
sh "\"#{nsis_path}\\makensis.exe\" /V2 build\\syme.nsi"
end
desc "Create zip package"
task :package => [:collect, "build/Syme.exe"] do
cd "build"
sh "zip -x app/env.nsh -r syme.zip app/* Syme.exe"
cd ".."
end
desc "Delete built files"
task :clean do
rm_rf "build/app"
rm_f "build/Syme.exe"
end
task :info do
puts "Gathering info..."
require "SymeApp"
info = `.ignore/cloc.exe *.* Rakefile build lib theme models gui`
puts "-------------------------------------------------------------------------------"
puts SYME_NAME
puts "Version: #{SYME_VERSION}"
puts "-------------------------------------------------------------------------------"
puts info
end
task :default => [:package, :clean, :info]