AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script for setup/installation

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
daveand5



Joined: 09 Nov 2007
Posts: 18
Location: http://taplpoker.com/

PostPosted: Fri Dec 28, 2007 6:21 pm    Post subject: Script for setup/installation Reply with quote

since i started writting some simple games for the grandkids and wife i needed a way to make an installer when the game was done, instead of the repetitive typing ..
so heres the script, directions are included in the file

Code:
fileName:="\YahtzeSetup.ahk"
dirs=Dice,Icons ;names of all dirs needed with comma between
directory=*.* ;file pattern
/*
directions:
by Dave Anderson 12/27/07
feel free to use all or part, a thank you in your file credits would be nice and of course any and all donations
accepted, I'm registered at BigBoysToysRUS
change fileName to your setup/install file name
change dirs to dir names needed, make sure there's a comma between each dir
change file pattern if needed, usually not if all files to be included
I copy all files and directories that are needed to a different folder along with this file
compile the files that will be compiled
run this script
compile your setup/install file
then to test it I create another folder, and copy the setup/install file to it and run it
all files should be installed including compiled and scripts and dirs with contents
Be sure to test run it.
*/

;===================== nothing else need be changed ===============================
Filelist= ; clear filelist
F1:="FileInstall ," ;F1 & F2 are never changed
F2:=", "
Loop, %directory%, , 1  ; Recurse into subfolders.
{
 hs+=1
}
Loop, %directory%, , 1  ; Recurse into subfolders.
{
 z:=A_Index, FileList.=F1 . A_LoopFileFullPath . F2 A_LoopFileFullPath ((z<hs) ? "`n" : "")
}
;msgbox , %filelist%
Loop, Parse, dirs , `,  ;  create directories
{
cmd1:="FileCreateDir , " . A_LoopField . "`n"
FileAppend , %cmd1%, %A_ScriptDir%%fileName%
}
FileAppend , %filelist%, %A_ScriptDir%%fileName% ; create rest of file
exit


enjoy and hope it simplifies life
_________________
visit my website
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group