-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_shared.au3
More file actions
88 lines (55 loc) · 2.11 KB
/
Copy pathdeploy_shared.au3
File metadata and controls
88 lines (55 loc) · 2.11 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#include <_stringReplaceVariables.au3>
#include <_run.au3>
#include <_path.au3>
Global Const $7zPath = _stringReplaceVariables("%sabox%\superglobal\7zip\App\7-Zip\7z.exe")
Global Const $includesPath = _stringReplaceVariables("%grid%\FP-AutoItDevGrid\tools\AutoIt\Include")
Global Const $appPath = @ScriptDir
Global Const $changelogPath = $appPath&"\changelog.txt"
Func _initialize($version,$suffix)
While 1
If $version=="" Then $version = InputBox(@ScriptName,"enter version",@YEAR&@MON&@MDAY&"T"&@HOUR)
If @error Then Exit
Global $basePath = @ScriptDir&"\dist\FP-QUI_v"&$version&$suffix
If DirGetSize($basePath,2) <> -1 Then
MsgBox(0,@ScriptName,"Version already exists, try again.")
ContinueLoop
EndIf
ExitLoop
WEnd
DirCreate($basePath)
EndFunc
Func _commonFiles($appPath,$basePath)
FileCopy($appPath&"\license.txt",$basePath)
FileCopy($appPath&"\readme.md",$basePath)
FileCopy($appPath&"\changelog.txt",$basePath)
EndFunc
Func _setDefaultConfig($path)
IniWrite($path,"_ini","specificPath","")
IniWrite($path,"_ini","iniSyncInteractive",0)
IniWrite($path,"defaults","font","Microsoft Sans Serif")
IniWrite($path,"defaults","fontSize",12)
IniWrite($path,"defaults","iconAviSize",32)
;~ IniWrite($path,"behaviour","promptIfNoArguments",0) ;deprecated
IniWrite($path,"behaviour","fadeOut",1)
IniWrite($path,"behaviour","maxInstances",10)
IniWrite($path,"behaviour","autoRegister",0)
IniWrite($path,"behaviour","autoDeregister",0)
IniWrite($path,"behaviour","firstStart",1)
IniWrite($path,"behaviour","showMenuOnFirstStart",1)
IniWrite($path,"behaviour","showMenuOnNoArguments",1)
EndFunc
Func _wrapItUp($path)
Local $name = _pathGetFileName($path)
Local $dir = _pathGetDir($path)
_runWait($7zPath&" a "&$dir&"\"&$name&".zip "&$path&"\*")
EndFunc
Func _addChangeLogEntry($stringArray,$version)
_FileWriteToLine($changeLogPath,1,"")
;~ _FileWriteToLine($changeLogPath,1,"")
For $string In $stringArray
_FileWriteToLine($changeLogPath,1,$string)
Next
_FileWriteToLine($changeLogPath,1,"")
_FileWriteToLine($changeLogPath,1,$version)
_FileWriteToLine($changeLogPath,1,"======")
EndFunc