Skip to content

Commit

Permalink
Switched Lib to data
Browse files Browse the repository at this point in the history
Having it named Lib disallowed creating a shortcut to a stdlib folder/having a custom Lib for the scripts
Fixed directory creation while compiled
  • Loading branch information
Masonjar13 committed Aug 23, 2018
1 parent 07b4e92 commit e917939
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 26 deletions.
4 changes: 0 additions & 4 deletions Lib/getFileext.ahk

This file was deleted.

4 changes: 0 additions & 4 deletions Lib/getFilename.ahk

This file was deleted.

39 changes: 21 additions & 18 deletions ScriptUp.ahk
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
#singleInstance force
#persistent
#noEnv
#include <threadMan>
setWorkingDir,% a_scriptDir
#include data\threadMan.ahk
menu,tray,tip,ScriptUp

; compiled installs
if(a_isCompiled){
fileInstall,Lib\dlls\mini32.dll,Lib\dlls\mini32.dll
fileInstall,Lib\dlls\mini64.dll,Lib\dlls\mini64.dll
fileInstall,Lib\dlls\std32.dll,Lib\dlls\std32.dll
fileInstall,Lib\dlls\std64.dll,Lib\dlls\std64.dll
fileInstall,Lib\imgs\b1.png,Lib\imgs\b1.png
fileInstall,Lib\imgs\b2.png,Lib\imgs\b2.png
fileInstall,Lib\imgs\MXIII.png,Lib\imgs\MXIII.png
fileInstall,Lib\workerH.ahk,Lib\workerH.ahk
fileCreateDir,data\dlls
fileCreateDir,data\imgs
fileInstall,data\dlls\mini32.dll,data\dlls\mini32.dll
fileInstall,data\dlls\mini64.dll,data\dlls\mini64.dll
fileInstall,data\dlls\std32.dll,data\dlls\std32.dll
fileInstall,data\dlls\std64.dll,data\dlls\std64.dll
fileInstall,data\imgs\b1.png,data\imgs\b1.png
fileInstall,data\imgs\b2.png,data\imgs\b2.png
fileInstall,data\imgs\MXIII.png,data\imgs\MXIII.png
fileInstall,data\workerH.ahk,data\workerH.ahk
}

; setup config
;sini:=(siniD:=a_appData . "\..\Local\ScriptUp") . "\config.ini"
setWorkingDir,% a_scriptDir
sini:=a_scriptDir . "\Lib\config.ini"
dlls:=a_scriptDir . "\Lib\dlls"
imgs:=a_scriptDir . "\Lib\imgs"
sini:=a_scriptDir . "\data\config.ini"
dlls:=a_scriptDir . "\data\dlls"
imgs:=a_scriptDir . "\data\imgs"
workerdll:=dlls . "\std" . (a_ptrSize*8) . ".dll"
workerfile:=a_scriptDir . "\Lib\workerH.ahk"
workerfile:=a_scriptDir . "\data\workerH.ahk"
fileLastDir:=a_scriptDir
if(!fileExist(sini))
firstRun:=1
Expand All @@ -36,7 +38,7 @@ if(!errorLevel) ; auto-correct if the script has been moved
regWrite,REG_SZ,% regStartupPath,ScriptUp,% a_scriptFullPath

; start worker
#include <guiMake>
#include data\guiMake.ahk
worker:=new threadMan(workerdll)
worker.newFromFile(workerfile)
onExit,cleanup
Expand All @@ -52,9 +54,10 @@ if(firstRun){
setTimer,checkStates,1000
return

#include <guiSubs>
#include <optionSubs>
#include <menuSubs>
#include data\guiSubs.ahk
#include data\optionSubs.ahk
#include data\menuSubs.ahk
#include data\functions.ahk

checkStates:
stateList:=worker.varGet("stateList")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions Lib/hideFocusBorder.ahk → data/functions.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ hideFocusBorder(wParam,lParam:="",msg:="",handle:=""){ ; by 'just me'
dllCall("user32\PostMessage","ptr",handle,"uint",WM_UPDATEUISTATE,"ptr",SET_HIDEFOCUS,"ptr",0)
}else if(dllCall("IsWindow","ptr",wParam,"uint"))
dllCall("user32\PostMessage","ptr",wParam,"uint",WM_UPDATEUISTATE,"ptr",SET_HIDEFOCUS,"ptr",0)
}
getFilename(path){
splitPath,path,,,,fname
return fname
}
getFileext(path){
splitPath,path,,,ext
return ext
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e917939

Please sign in to comment.