Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can you add the flag AllowMultipleInstances=true #2

Closed
Janaue opened this issue Aug 1, 2022 · 3 comments
Closed

can you add the flag AllowMultipleInstances=true #2

Janaue opened this issue Aug 1, 2022 · 3 comments

Comments

@Janaue
Copy link

Janaue commented Aug 1, 2022

I want to launch several FreeTubePortable in parallel, with different profiles. For FirefoxPortable, there is a flag AllowMultipleInstances=true to activate in FirefoxPortable.ini in the root directory of PortableApps\FirefoxPortable, but I dont see one for FreeTubePortable. Is it possible you create this?

@rddim
Copy link
Owner

rddim commented Aug 14, 2022

Hello, @Janaue

Sorry for the delay and thank you for your patience. I wanted to make a few changes and test them before responding.
Actually AllowMultipleInstances=true will do nothing for parallel running of FreeTubePortable, but SingleAppInstance=false will.

Also as I mentioned before in FreeTubeApp/FreeTube#746 (comment) adding a --user-data-dir="%PAL:DataDir%\FreeTube" to the CommandLineArguments= will do the main part of the portable profile - to work from the Data folder.

There is a known issue with --user-data-dir="%PAL:DataDir%\FreeTube" that I can not resolve - the UNC stop working.
The workaround is to add --no-sandbox which will disable the sandbox. Use it at your own risk!

This is the content that you need to replace in \FreeTubePortable\App\AppInfo\Launcher\FreeTubePortable.ini file before running in parallel:

[Launch]
ProgramExecutable=FreeTube\FreeTube.exe
CommandLineArguments=--user-data-dir="%PAL:DataDir%\FreeTube"
WaitForOtherInstances=false
SingleAppInstance=false
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true

[RegistryKeys]
-=HKCU\Software\Classes\freetube

For the parallel running there are several options:

Option 1
Create a copy of the whole FreeTubePortable folder (~240mb) with different name or different place

Option 2 - save a space and be updated

  1. Create a copy of the FreeTubePortable.exe in the same folder with new name (for example) FreeTubePortable-2nd.exe
  2. Create a copy of the \FreeTubePortable\App\AppInfo\Launcher\FreeTubePortable.ini in the same Launcher folder with the same name as copied FreeTubePortable.exe (for example) FreeTubePortable-2nd.ini
  3. For the new profile:
    • Change the --user-data-dir="%PAL:DataDir%\FreeTube" in the copied file to --user-data-dir="%PAL:DataDir%\FreeTube-2nd" or what profile name you would like
      OR
    • Add --user-data-dir="%PAL:DataDir%\FreeTube-2nd" to the AdditionalParameters= in the FreeTubePortable-2nd.ini in the root FreeTubePortable directory (get the file from \Other\Source and rename it) - this option will override the default.

Option 3
This is interesting option that work like the Firefox Portable 2nd Profile

  1. In the main PortableApps directory create a folder like FreeTubePortable2ndProfile
  2. Inside FreeTubePortable2ndProfile create a folder App
  3. From the FreeTubePortable copy the FreeTubePortable.exe to the FreeTubePortable2ndProfile
  4. From the FreeTubePortable\App copy the whole AppInfo folder to the new FreeTubePortable2ndProfile\App folder
  5. Replace the content of the \FreeTubePortable2ndProfile\App\AppInfo\Launcher\FreeTubePortable.ini with this:
[Launch]
ProgramExecutable=..\..\FreeTubePortable\App\FreeTube\FreeTube.exe
CommandLineArguments=--user-data-dir="%PAL:DataDir%\FreeTube"
WaitForOtherInstances=false
SingleAppInstance=false
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true

[RegistryKeys]
-=HKCU\Software\Classes\freetube

Please, note that the both FreeTubePortable and FreeTubePortable2ndProfile must be stored in the same main folder


After all

  • At this time I don't plan to create a new separated app for secondary profile. If there is interest may be I will do.
  • For using a UNC (use it at your own risk of course) I suggest to add the --no-sandbox to the AdditionalParameters= in the \FreeTubePortable\FreeTubePortable.ini. This argument can be at one line with --user-data-dir="%PAL:DataDir%\FreeTube" without problems.
  • For Option 2 I have added an option to keep all other *.ini files while update the app, because the main FreeTubePortable.ini will be also updated.
  • I hope I will release the new v0.17.1 with the new changes these week.

@rddim
Copy link
Owner

rddim commented Aug 20, 2022

v0.17.1 is released

@rddim rddim closed this as completed Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@rddim @Janaue and others