added automatic version bump when script is compiled, moved version number outside of main script
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -27,3 +27,4 @@ Compile Scripts to EXE.ahk
|
||||
Freedomain Video Uploader.exe
|
||||
Lib/LBRY Process Killer.exe
|
||||
Lib/chrome-win64
|
||||
Lib/Version.ini
|
||||
@@ -14,29 +14,24 @@ CoordMode, Mouse, Screen
|
||||
|
||||
;---Notes/Extra Info/#Includes------------------------------------------------------
|
||||
|
||||
; msgbox
|
||||
|
||||
;---VARIABLES-----------------------------------------------------------------------
|
||||
/*ScriptToCompile = %1%
|
||||
CompileType = %2% ; Testing OR Production
|
||||
if(CompileType = "")
|
||||
CompileType = Testing
|
||||
; Msgbox % "CompileType: " CompileType
|
||||
if(ScriptToCompile = "")
|
||||
ExitApp
|
||||
|
||||
|
||||
*/
|
||||
|
||||
; Msgbox % "ScriptToCompile: " ScriptToCompile
|
||||
ScriptToCompile = SocialMediaPoster
|
||||
; ScriptToCompile = ScriptUpdater
|
||||
;---MAIN SCRIPT---------------------------------------------------------------------
|
||||
|
||||
AHKFilepath = %A_ScriptDir%\Freedomain Social Media Poster.ahk
|
||||
Exefilepath = %A_ScriptDir%\Freedomain Social Media Poster.exe
|
||||
icopath = %A_ScriptDir%\Assets\FreedomainSMP.ico
|
||||
VersionIniFP = %A_ScriptDir%\Version.ini
|
||||
|
||||
|
||||
; Bump the version number in the version.ini file
|
||||
IniRead, VersionNumber, %VersionIniFP%, Social-Media-Poster, Version, 0.0 ; , Filename, Section, Key [, Default]
|
||||
VersionNumber += .01
|
||||
VersionNumber := SubStr(VersionNumber, 1, 4)
|
||||
; Msgbox % "VersionNumber: " VersionNumber
|
||||
IniWrite, %VersionNumber%, %VersionIniFP%,Social-Media-Poster, Version
|
||||
|
||||
|
||||
; Kill any active intances of the uploaders so the .exe file can be overwriten by the compilation
|
||||
process, close, Freedomain Social Media Poster.exe
|
||||
@@ -68,8 +63,6 @@ if(!FileExist(icopath)){
|
||||
run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%""
|
||||
|
||||
|
||||
; OldNotify(ScriptToCompile,"Compiled Successfully",5)
|
||||
; sleep, 5000
|
||||
ExitApp
|
||||
|
||||
|
||||
|
||||
@@ -41,9 +41,7 @@ global UpdateVersionNumber
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.ahk
|
||||
|
||||
|
||||
ScriptName = Freedomain Social Media Poster
|
||||
ScriptVersion = 2.88
|
||||
FullScriptName := ScriptName . " " . ScriptVersion
|
||||
|
||||
|
||||
;---ToDo---
|
||||
;------------------------------------------------
|
||||
@@ -122,6 +120,14 @@ ChangelogIniFilepath := A_ScriptDir . "\Lib\FreedomScriptsChangelogINI"
|
||||
global ScriptSettingsSection
|
||||
ScriptSettingsSection := "SocialMediaPoster"
|
||||
|
||||
|
||||
FileInstall, Version.ini, %A_ScriptDir%\Lib\Version.ini, 1
|
||||
IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,Social-Media-Poster, Version, 0.0 ; , Key [, Default]
|
||||
ScriptName = Freedomain Social Media Poster
|
||||
FullScriptName := ScriptName . " " . ScriptVersion
|
||||
|
||||
|
||||
|
||||
;---General Info---
|
||||
;------------------------------------------------
|
||||
IniRead, TestingMode, %SettingsIniFilepath%, General, TestingMode, 0
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
Version.ini
Normal file
2
Version.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[Social-Media-Poster]
|
||||
Version=2.89
|
||||
Reference in New Issue
Block a user