Skip to content

Commit d40a118

Browse files
author
John Olafenwa
committed
windows bug fixes
1 parent 2d3e8d9 commit d40a118

File tree

7 files changed

+24
-8
lines changed

7 files changed

+24
-8
lines changed

deepstack-setup-gpu.iss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33
#include "environment.iss"
44
#define MyAppName "DeepStack"
5-
#define MyAppVersion "2020.12.beta"
5+
#define MyAppVersion "2021.01.beta"
66
#define MyAppPublisher "DeepQuestAI"
77
#define MyAppURL "https://www.deepstack.cc"
88
#define MyAppExeName "deepstack.exe"
@@ -24,7 +24,7 @@ AppUpdatesURL={#MyAppURL}
2424
DefaultDirName=C:\{#MyAppName}
2525
DisableDirPage=yes
2626
DefaultGroupName=DeepStack
27-
OutputBaseFilename=DeepStack-Installer-GPU.2020.12.beta
27+
OutputBaseFilename=DeepStack-Installer-GPU.2021.01.beta
2828
Compression=lzma
2929
SolidCompression=yes
3030

@@ -65,7 +65,7 @@ Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\deepstack\*"; DestDir: "{a
6565
Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\interpreter\*"; DestDir: "{app}\interpreter"; Flags: ignoreversion recursesubdirs createallsubdirs
6666
Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\redis\*"; DestDir: "{app}\redis"; Flags: ignoreversion recursesubdirs createallsubdirs
6767
Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\server\*"; DestDir: "{app}\server"; Flags: ignoreversion recursesubdirs createallsubdirs
68-
Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\server\platform.windows.cpu.json"; DestDir: "{app}\server\platform.json"; Flags: ignoreversion
68+
Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\platform\platform.windows.gpu.json"; DestDir: "{app}\server\platform.json"; Flags: ignoreversion
6969
Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\server\version.txt"; DestDir: "{app}\server"; Flags: ignoreversion
7070
Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\sharedfiles\categories_places365.txt"; DestDir: "{app}\sharedfiles"; Flags: ignoreversion
7171
Source: "C:\Users\johnolafenwa\Documents\AI\DeepStack\sharedfiles\face.pt"; DestDir: "{app}\sharedfiles"; Flags: ignoreversion

server/deepstack.exe

567 Bytes
Binary file not shown.

server/server.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,10 @@ func main() {
763763
var mode string
764764

765765
if os.Getenv("PROFILE") == "" {
766+
os.Chdir("C://DeepStack//server")
766767
platformdata, err := ioutil.ReadFile("platform.json")
767768

768-
if err != nil {
769+
if err == nil {
769770
var platform structures.PLATFORM
770771

771772
json.Unmarshal(platformdata, &platform)
@@ -777,7 +778,7 @@ func main() {
777778

778779
versionfile, err := os.Open("version.txt")
779780

780-
if err != nil {
781+
if err == nil {
781782
versiondata, _ := ioutil.ReadAll(versionfile)
782783
version := string(versiondata)
783784

@@ -812,7 +813,6 @@ func main() {
812813
if PROFILE == "windows_native" {
813814

814815
APPDIR = "C://DeepStack"
815-
os.Chdir("C://DeepStack//server")
816816
interpreter = filepath.Join(APPDIR, "interpreter", "python.exe")
817817
redis_server = filepath.Join(APPDIR, "redis", "redis-server.exe")
818818

@@ -852,6 +852,10 @@ func main() {
852852
os.Mkdir(DATA_DIR, 0755)
853853
os.Mkdir(temp_path, 0755)
854854

855+
if PROFILE == "windows_native" {
856+
go utils.CreateDirs(logdir, DATA_DIR, temp_path)
857+
}
858+
855859
stdout, _ := os.Create(filepath.Join(logdir, "stdout.txt"))
856860

857861
defer stdout.Close()

server/utils/utils.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ import (
1212
"github.com/shirou/gopsutil/host"
1313
)
1414

15+
func CreateDirs(dirList ...string) {
16+
for true {
17+
for _, dir := range dirList {
18+
pathExists, _ := PathExists(dir)
19+
if pathExists == false {
20+
os.Mkdir(dir, 0755)
21+
}
22+
}
23+
time.Sleep(1 * time.Second)
24+
}
25+
}
26+
1527
func PathExists(path string) (bool, error) {
1628
_, err := os.Stat(path)
1729
if err == nil {
@@ -95,7 +107,6 @@ func LogToServer(sub_data *structures.ActivationData) {
95107
"time": time.Now(),
96108
}
97109

98-
99110
req.Post("https://register.deepstack.cc/loguser", params)
100111
time.Sleep(86400 * time.Second)
101112

windows/dotnet-runner/obj/Debug/netcoreapp3.1/deepstack-runner.AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
[assembly: System.Reflection.AssemblyProductAttribute("deepstack-runner")]
1919
[assembly: System.Reflection.AssemblyTitleAttribute("deepstack-runner")]
2020
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21+
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/johnolafenwa/deepstack")]
2122

2223
// Generated by the MSBuild WriteCodeFragment class.
2324

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6a1694d13ee3763a4852b827ab3419248c7fe8d1
1+
eb0e6784b78940a78c6f4952b739ad1533852bb9
Binary file not shown.

0 commit comments

Comments
 (0)