diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2d8c728b91..2144cd7689 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -93,6 +93,7 @@ jobs: run: | echo "${{ github.workspace }}/bin" >> $GITHUB_PATH ./bin/arturo tools/tester.art + # curl -L https://arturo-lang.s3.amazonaws.com/libcrypto-1_1-x64.dll -o libcrypto-1_1-x64.dll diff --git a/src/vm/bundle/generator.nim b/src/vm/bundle/generator.nim index 8a968e0bf5..737a8a2830 100644 --- a/src/vm/bundle/generator.nim +++ b/src/vm/bundle/generator.nim @@ -118,10 +118,13 @@ proc copyDirRecursively(source: string, dest: string) = copyFile(path, dest / noSource, {cfSymlinkAsIs}) proc commandExists(cmd: string) = - let (_, exitCode) = execCmdEx("[ -x \"$(command -v " & cmd & ")\" ]") - if exitCode != 0: + if findExe(cmd) == "": echo "\t`" & cmd & "` command required; cannot proceed!" quit(1) + # let (_, exitCode) = execCmdEx("[ -x \"$(command -v " & cmd & ")\" ]") + # if exitCode != 0: + # echo "\t`" & cmd & "` command required; cannot proceed!" + # quit(1) proc startVM() = var str = "" @@ -368,15 +371,22 @@ proc buildExecutable(conf: BundleConfig) = if forceFull: mode = "" - let (outp, res) = execCmdEx("./build.nims build " & conf.configFile() & " --bundle " & mode & " " & forceFlags & " --log --as " & conf.name) - if res != 0: + let (outp, err) = execCmdEx("nim build.nims build " & conf.configFile() & " --bundle " & mode & " " & forceFlags & " --log --as " & conf.name) + + if err != 0: echo "\tSomething went wrong went building the project..." echo outp quit(1) setCurrentDir(currentFolder) - copyFile(TmpFolder / "bin" / conf.name, currentFolder / conf.name) + let finalName = + when defined(windows): + conf.name & ".exe" + else: + conf.name + + copyFile(TmpFolder / "bin" / finalName, currentFolder / finalName) proc cleanUp() = removeDir(TmpFolder)