AutoHotkey Community

It is currently May 26th, 2012, 1:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: December 28th, 2007, 7:21 pm 
Offline

Joined: November 9th, 2007, 4:44 pm
Posts: 20
Location: http://taplpoker.com/
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group