Skip to content

Commit

Permalink
feat: Improve compilation support
Browse files Browse the repository at this point in the history
  • Loading branch information
thegamerx1 committed Feb 4, 2024
1 parent f7805f3 commit eebecc4
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
extensions/_asda
extensions/killlol.ahk
extensions/_includer.ahk
_includer.txt
data
2 changes: 2 additions & 0 deletions extensions/autodns/autodns.ahk
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <timer>
#include <requests>
FileInstall extensions/autodns/config.html, ~

class extension_autodns extends extension_ {
static extension := {}
,extension.name := "Auto DNS"
Expand Down
1 change: 1 addition & 0 deletions extensions/mpv/mpv.ahk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <GraphQL>
FileInstall extensions/mpv/config.html, ~

class extension_mpv extends extension_ {
static extension := {}
Expand Down
2 changes: 2 additions & 0 deletions extensions/ramdisk/ramdisk.ahk
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <timer>
FileInstall extensions/ramdisk/config.html, ~

class extension_ramdisk extends extension_ {
static extension := {}
,extension.name := "Ram Disk"
Expand Down
2 changes: 2 additions & 0 deletions extensions/rclone/rclone.ahk
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <timer>
FileInstall extensions/rclone/config.html, ~

class extension_rclone extends extension_ {
static extension := {}
,extension.name := "RClone"
Expand Down
5 changes: 5 additions & 0 deletions main.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ debug.print("Script initiated (" script.starttime.get() "ms)", {label: "Loader"}
script.ready := true
Return

FileInstall web/minify/index.html, ~

;@Ahk2Exe-SetMainIcon icons/icon.ico
;@Ahk2Exe-ExeName StartUp.exe

#Include scripts/gui.ahk
#Include scripts/extensions.ahk

Expand Down
6 changes: 5 additions & 1 deletion scripts/extensions.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ class extension_ {
}
}
if this.extension.gui {
FileRead html, % this.getAsset("config.html")
if A_IsCompiled {
html := GetScriptResource("extensions/" this.name "/config.html")
} else {
FileRead html, % this.getAsset("config.html")
}
if html {
this.extension.html := html
} else {
Expand Down
1 change: 1 addition & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
</template>

<script src="js.js"></script>
<!-- inject.js -->
</body>
</html>

0 comments on commit eebecc4

Please sign in to comment.