It will be awesome
@codejam1024
Hey, thanks for this feature request. Could you give some more details on what exactly you're looking for, or which changes you'd need? Thanks!
@christianbundy Keep data in the working directory of the program, so we no need the Installer anymore! I apologize for not being word-perfect in English
No problem, your English is way better than my Chinese. :upside_down_face:
Could you try the --path option and see if that does what you'd like it to? I'm on Linux, but I think the Windows commands would look something like:
npm start -- --path "/file/path/goes/here"
or
./Patchwork-3.11.5-linux-x86_64.AppImage.exe -- --path "/file/path/goes/here"
@christianbundy Ok, it seems to be working fine of first run:
.\Patchwork.exe -- --path "E:\MyData\ssb"
The most convenient type of "portable install" is usually distributed as a zip file with all it's dependencies inside the extracted folder. That way you can just unzip straight to a USB disk and run it there, confident that it will keep all it's stuff in that folder (and out of the user folders, %APPDATA%, etc).
The Windows installer in the releases does its own install and setup but I think @codejam1024 is asking for something a little lighter weight that is portable.
Sorry, I'm not using Windows so I may be lacking context -- is the Patchwork .exe file an installer? I was under the assumption that it was a full application. I think the simplest way to make this portable would be to add --path %cd% or something to the executable, but I'm not familiar enough with Windows to know whether you have to make a shortcut to add command-line flags.
@christianbundy Yes, must be create a shortcut to do that.
@christianbundy - interesting. My experience with the .exe download from Releases is that it will basically install and then boostrap itself. So if I run the .exe I see a small modal dialog first that says "Installing" and a progress bar. After that it fires up the client.
The installer makes a shortcut of its own and the shortcut indicates that it's actually installing the client binaries into C:\Users\Andy\AppData\Local\Programs\ssb-patchwork\Patchwork.exe.
That folder has a bunch of Electron support files for Windows:
-a---- 11/7/2018 5:38 PM 19256 api-ms-win-crt-locale-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 27064 api-ms-win-crt-math-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 26936 api-ms-win-crt-multibyte-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 71480 api-ms-win-crt-private-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 19768 api-ms-win-crt-process-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 22464 api-ms-win-crt-runtime-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 24888 api-ms-win-crt-stdio-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 24888 api-ms-win-crt-string-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 21304 api-ms-win-crt-time-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 19256 api-ms-win-crt-utility-l1-1-0.dll
-a---- 11/7/2018 5:38 PM 26693 blink_image_resources_200_percent.pak
-a---- 11/7/2018 5:38 PM 15 content_resources_200_percent.pak
-a---- 11/7/2018 5:38 PM 8682599 content_shell.pak
-a---- 11/7/2018 5:38 PM 4173928 d3dcompiler_47.dll
-a---- 11/7/2018 5:38 PM 1955328 ffmpeg.dll
-a---- 11/7/2018 5:38 PM 10197040 icudtl.dat
-a---- 11/7/2018 5:38 PM 17920 libEGL.dll
-a---- 11/7/2018 5:38 PM 3687936 libGLESv2.dll
-a---- 11/7/2018 5:38 PM 1060 LICENSE.electron.txt
-a---- 11/7/2018 5:38 PM 1811569 LICENSES.chromium.html
-a---- 11/7/2018 5:38 PM 633152 msvcp140.dll
-a---- 11/7/2018 5:38 PM 221973 natives_blob.bin
-a---- 11/7/2018 5:38 PM 17863680 node.dll
-a---- 11/7/2018 5:38 PM 67920896 Patchwork.exe
-a---- 11/7/2018 5:38 PM 164181 pdf_viewer_resources.pak
-a---- 11/7/2018 5:38 PM 1531028 snapshot_blob.bin
-a---- 11/7/2018 5:38 PM 1001272 ucrtbase.dll
-a---- 11/7/2018 5:38 PM 76888 ui_resources_200_percent.pak
-a---- 11/7/2018 5:38 PM 484129 Uninstall Patchwork.exe
-a---- 11/7/2018 5:38 PM 87888 vcruntime140.dll
-a---- 11/7/2018 5:38 PM 57450 views_resources_200_percent.pak
So, on some systems, you may lack permission to install to AppData\Local and you wouldn't be able to use Patchwork. A "portable" installation would, essentially, be a zip of the contents of the above folder, along with the default configuration to store all the users' .ssb stuff in that folder - never touching AppData. (Imagine something like a public library computer)
This means you could drop the zip on a USB disk and use it anywhere without touching the sandboxed Users\AppData
Interesting, I didn't realize that the Windows installer worked that way.
It looks like electron-builder supports portable Windows apps -- I think this will be easier once we've got a solid release workflow, I think Matt is the only person who can build all of the installers currently.
Release workflow is now working great, I'd merge a PR to add a portable build target.
@christianbundy thanks! I'm not sure when I'll have the time to follow through with that feature PR but this definitely looks unblocked.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Thanks, stale bot. Someone needs to update the Electron build to also spit out a "portable version" for Windows. It appears to be covered in the docs that are linked in this issue. :)
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Should the .ssb folder be on the same folder eg a USB drive or where the Portable Application is stored so we could maximize portability ?
Yep, looks like that can be set as PORTABLE_EXECUTABLE_DIR in the documentation linked above. I think this is possible, maybe even easy, but it should probably be done by someone who at least has a Windows computer. :~)
My roommate has a Windows machine I could use I guess, or I can run a Windows VM. I guess I could send something with some results next time? Do I need patchwork-builder?
You should just need this repo. If you run npm run dist it'll create all the output images, so as long as you enable the option for the portable build you _should_ get a portable EXE.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Thanks stalebot, we should be able to do this soon.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?