stargatedaw / stargate

Innovation-first digital audio workstation (DAW), instrument and effect plugins, wave editor
GNU General Public License v3.0
662 stars 34 forks source link

Portable installation doesn't work (as intended) (Win10) #28

Closed DreadDendy closed 1 year ago

DreadDendy commented 2 years ago

Hello, I was able to test portable installation on the flash drive. First I moved data folder of the application from my user's directory. Second I installed app on a flash drive. When I had launched it with a .bat-file and tried to open demo project I saw error message: "The audio engine stopped with exit code 11, please try restarting Stargate".

Then I started to study the log files. This lines in "local" config say that DAW still looking files in my user's directory, [2021-12-19 16:33:04,129] INFO sglib\lib\process.py : 62 - ~\program\engine\stargate-engine.exe: "using home folder: C:\Users\Umbrix" [2021-12-19 16:33:04,129] INFO sglib\lib\process.py : 62 - ~\program\engine\stargate-engine.exe: "C:\Users\Umbrix/stargate/config/device.txt does not exist" [2021-12-19 16:33:04,129] INFO sglib\lib\process.py : 62 - ~\program\engine\stargate-engine.exe: "Allocating output buffers" [2021-12-19 16:33:04,129] INFO sglib\lib\process.py : 62 - ~\program\engine\stargate-engine.exe: "Setting main volume" [2021-12-19 16:33:04,129] INFO sglib\lib\process.py : 62 - ~\program\engine\stargate-engine.exe: "get_file_setting: C:\Users\Umbrix/stargate/config/main_vol.txt" I attach the full log file. stargate - local directory.log

Then I moved back the data folder of the DAW in my user's directory and after that the application worked OK when I have launched it with the .bat file. I think that it just have found the needed files. Here is the log file for this case. stargate - user directory.log

ghost commented 2 years ago

That looks like Windows Defender (or other antivirus) killed the engine as soon as it called bind, even though the call succeeded. Stargate DAW uses a separate process for the engine and UI, and they communicate over UDP sockets on localhost (no internet access, only local to local).

Is it possible to add an exception to your antivirus?

DreadDendy commented 2 years ago

Now I have added an exception, and after that also disabled Win Defender, but the results are the same - error 11. stargate.log

But if I return folder for DAW's data to the directory of my user all works again regardless of Win Defender's status.

ghost commented 2 years ago

I tried it on my physical install of Windows 10, and it worked. IIRC, I changed some security setting to allow that, but I cannot remember what it was. A Google search did not turn up anything.

I think there might be an issue with how you setup your flash drive, though, if it's looking to C:\Users\... for anything

This is how the file layout should work:

G:\Stargate
    _stargate_home   <- The presence of this file tells Stargate this is a portable install
    LaunchStargate.cmd  <- Windows launcher script
    \program  <- This is the Windows install folder, I should rename it
        _stargate_home   <- Prior to 21.12.3, the file was located in this folder
        \stargate.exe
    stargate\  <- This is the folder created when you run Stargate for the first time, contains projects and settings
    stargate.app\  <- The MacOS app bundle, you can drop it here to make the flash drive also work with MacOS

When you check the portable flash drive install checkbox on the Windows installer, it should create that _stargate_home file.

DreadDendy commented 2 years ago

I think there might be an issue with how you setup your flash drive, though, if it's looking to C:\Users\... for anything

May be, but also I have tried a usual hard drive.

When you check the portable flash drive install checkbox on the Windows installer, it should create that _stargate_home file.

Yes, this file is here.

OK, that is strange, I will try some other things.

ghost commented 2 years ago

@DreadDendy , if you want, you can zip up the entire G:\Stargate folder and send it to me to debug. If there are projects in there that you do not want to share, you can delete them from the zip before sending it. Wormhold.app is a good way to share files.

DreadDendy commented 2 years ago

I tend to agree that it might be something in my system. I will try to check portable Stargate on other PCs and laptops later. But of course I can share application's folder, https://wormhole.app/YKM3r#ILr78qU8cmeEc1K8Pm5Lng

ghost commented 2 years ago

Got it, I'll have a look tomorrow

ghost commented 2 years ago

I tried the zip file on Windows 10, and it worked, no problems. It is probably related to some security setting, but I am not sure which one. If you figure it out, please let me know so I can document it. Otherwise, let me know if there is any way I can help.

DreadDendy commented 2 years ago

OK, i will try to research it. Not a very big problem, but it is just interesting.

L3337 commented 1 year ago

Have not heard back from you, closing this issue. If it is still a problem on the latest Stargate DAW, we can reopen the issue.