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

portable mode #236

Closed
sardinas9 opened this Issue Jul 3, 2016 · 42 comments

Comments

Projects
None yet
4 participants
@sardinas9

sardinas9 commented Jul 3, 2016

Hello.

I work in several computers and use QOwnNotes from a thumb drive. Every time that I start QON in a different computer I have to set the notes folder to an absolute path with the new letter assigned to my thumb drive.

It is possible to have the option to set a relative path to a notes folder?

@pbek pbek added the enhancement label Jul 3, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Jul 3, 2016

Relative to what? To the path where the QOwnNotes executable is placed? What would be the improvement, since you still have to set the path of the note folder?

@sardinas9

This comment has been minimized.

sardinas9 commented Jul 3, 2016

Yes, relative to where the QON executable is placed.

I use relative paths to link support material like documents, audios, images etc. to a text note from within QON and works very well. I thought that it would be also possible to configure the notes folder path in the same way.

This is how I see it:

Let's say that I have QON inside a software folder at root level i.e. "software/QOwnNotes", and my notes inside a "notes" folder at root level. The QON path to my notes folder could be set as "../notes"

In that way if the relative location of both folders in my thumb drive is preserved the drive letter changes won't affect the note folder setup. I'm right?

@pbek

This comment has been minimized.

Owner

pbek commented Jul 4, 2016

What's the advantage of setting a relative note folder path? You still would have to set it and you only would do that once, right?

@sardinas9

This comment has been minimized.

sardinas9 commented Jul 4, 2016

That's right, for me the advantage is that with relative path I only have to set up the notes folder once and for all, because it will always work well without matter which drive letter is assigned to my thumb drive.
As I work with portable software from a thumb drive on different PCs on a daily basis It's very useful for me to have relative paths in all my software settings.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 4, 2016

But you are working on different computers, aren't you? You would have to setup QOwnNotes every time you start it on a new computer. I think I still fail to see what you are trying to achieve.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 4, 2016

Is a "portable mode" what you are seeking? ...with all settings (currently in the registry on Windows), all local databases and the note folder in the directory of the binary? That would be a completely different story (and also quite some work).

@sardinas9

This comment has been minimized.

sardinas9 commented Jul 4, 2016

A "portable mode" would be ideal. I suppose it's a lot of work but if you are willing to fully portablilize QOwnNotes there is something that may help:
http://portableapps.com/development/portableapps.com_format

@pbek

This comment has been minimized.

Owner

pbek commented Jul 4, 2016

If there ever would be a portable mode (everything else wouldn't make much sense in my opinion) it would have to work on all supported platforms, what's a real challenge by itself...

@pbek pbek changed the title from relative path to notes folder to portable mode Jul 4, 2016

@sardinas9

This comment has been minimized.

sardinas9 commented Jul 4, 2016

I understand. It's a big effort you already do to develop, maintain and update your software in all the supported platforms. It would be great if you ever have the time to develop a portable mode of QOwnnotes.

@shnbwmn

This comment has been minimized.

shnbwmn commented Sep 11, 2016

If there ever would be a portable mode ... it would have to work on all supported platforms

I have to respectfully disagree.

  • Carrying programs around is done mainly (exclusively?) with Windows programs, and so portability is only an issue on this platform.
  • All cross-platform programs I've come across with portable versions only offer them for Windows.
  • It would just be a nice option for Windows users, be it for portability or other purposes (clean computer, no installation, ease of backup, etc).

That said, the PortableApps format linked above is a good option to simply wrap around the program if native portability would be unwieldy. Another option is yaP ("yet another Portablizer").

There are some nice folks on the PortableApps & PortableFreeware forums who might be willing to create/maintain a portable wrapper, or at least provide guidance & assistance.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 11, 2016

Do I understand it correctly that from the developers view Portable Apps is a format / spec to make the app available so that Portable Apps can use it?

@shnbwmn

This comment has been minimized.

shnbwmn commented Sep 11, 2016

Yes, the format is their system for distributing and integrating programs with their launcher. However the spec is GPL'd and isn't bound to the PortableApps brand or their launcher. You can use it without having to put your program in their suite/on their site. The .paf.exe package is just a self-extracting archive, which can be extracted to any location and used completely independently.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 11, 2016

I will have to take more looks at it what I can do to release such a package with appveyor when there is a "portable mode" for QOwnNotes...

@pbek pbek added this to the 16.09.9 milestone Sep 17, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Sep 17, 2016

16.09.9

  • there now is a portable mode, for example to carry around
    QOwnNotes on an USB stick (work in progress)
    • it will be activated if you start QOwnNotes with the parameter
      --portable
    • the internal sqlite database and the settings will be stored
      inside a Data folder at the binary's location
    • the settings will be stored in an ini file
    • TODO
      • special handling for note folders, so that they always are
        read from the Data folder
      • a batch file for Windows to run QOwnNotes in portable mode

@sardinas9, @shnbwmn
There now is a new release, could you please test the current state of the portable mode implementation and provide feedback?

@sardinas9

This comment has been minimized.

sardinas9 commented Sep 17, 2016

Thank you for provide the portable mode for QOwnNotes, it works very well! No traces left in the windows registry ("HKEY_CURRENT_USER\SOFTWARE\PBE\QOwnNotes") or in the %APPDATA% folder and all settings stored inside the Data folder at the binary's location)

I put a batch file with the following command in the same folder that the QOwnNotes.exe file and worked ok to launch the portable mode:

Start ""  QOwnNotes.exe --portable

I also made an exe from the batch file using Bat To Exe Converter (http://www.f2ko.de/en/b2e.php) in order to be able to launch the portable mode from the Portableapps platform menu which is the software that I use to manage and launch my portable applications.

Looking forward for the implementation of special handling for note folders.

Thanks again!

@pbek

This comment has been minimized.

Owner

pbek commented Sep 17, 2016

Thank you for the feedback!
Is the data structure of PortableApps mandatory to get an app into their launcher? Currently the app is not in an App folder. Can batch files or the QOwnNotes.exe with the parameter not launched directly form PortableApps if configured in their config file (that I plan to include)?

@sardinas9

This comment has been minimized.

sardinas9 commented Sep 17, 2016

The PortableApps platform is able to launch any exe file inside a subfolder into the main PortableApps folder (Example: PortableApps/QownNotes/QOwnNotes.exe) this is the only structure requirement to work with the launcher. It is not mandatory to follow the PortableApps data structure at least that you want to make the app available on the PortableApps official site. On the other hand the PortableApps platform is not a requirement for develop or using a portable application.
As far as I know the platform does not launch batch or jar files, only exe files.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

So I could just also generate a portable launcher exe with the converter you mentioned, create an appinfo.ini in the same directory as the executable that uses the launcher exe and QOwnNotes can be used by PortableApps app?
I just want to make it convenient and maybe post QOwnNotes to http://www.portablefreeware.com/.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

Of course you are also invited to send me an appinfo.ini that works so I can include it in the package.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

As I now understand it you need to build a new .paf.exe with their tool to get it into their ecosystem.

16.09.10

  • in portable mode the note folders will now be automatically stored
    relative to the Data folder so that the correct note folders will be
    loaded regardless where your QOwnNotes installation is currently located
    • for Windows there now is a QOwnNotesPortable.exe in your release
      path to start QOwnNotes in portable mode
    • there now is a new page in the settings to show more information
      about the portable mode

There now is a new release, could you please test it and report if the new features work for you?

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

To test the current release better remove/rename your current Data folder.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

@sardinas9 I got word that QOwnNotesPortable.exe (that I created with http://www.f2ko.de/en/b2e.php) is afflicted with TR/Crypt.XPACK.Gen7, can you confirm that?

@sardinas9

This comment has been minimized.

sardinas9 commented Sep 18, 2016

I cannot confirm nor deny that that Bat to Exe Converter is completely virus free. I have used it without issues. The application is listed in the portable freeware collection page http://www.portablefreeware.com/index.php?id=1660 and the virus issue was raised in the comments. I just uploaded the zip file to Virus Total and it returns the following: https://www.virustotal.com/en/file/05fd4fc365aef176604733cfc753fc10aa06f5bb3d680c19f8f380b2d4b6bb32/analysis/1474206515/ the result seems as a false positive.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

I tested the QOwnNotesPortable.exe and I got https://www.virustotal.com/en/file/e8c1dd3dddb41067836eb7b552be153dba818cf555c69674fa02e073f2f9d904/analysis/1474206237/, can you maybe please try to generate an exe from the QOwnNotesPortable.bat and check it again (if you dare).

Meanwhile I removed the QOwnNotesPortable.exe from the release...

@sardinas9

This comment has been minimized.

sardinas9 commented Sep 18, 2016

I generated a new exe from the batch file and uploaded to virus total and I got this: https://www.virustotal.com/en/file/89b421a0b2096ece9024723647a91e9fd6cb00a0d53c5b3a05494ee86ef086ca/analysis/1474207817/

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

😆 that's even more than I got...

@sardinas9

This comment has been minimized.

sardinas9 commented Sep 18, 2016

pretty scary!

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

We better stay with the QOwnNotesPortable.bat...
Do the relative note folders work for you?

@sardinas9

This comment has been minimized.

sardinas9 commented Sep 18, 2016

I agree to that.
The relative note folders works just fine. I started the portable mode from my usb drive in two different machines and also started the portable mode in two different HDD drives in the same PC and in all cases the note folders path was adjusted relative to the Data folder.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

That's great, thank you for testing. Please report back if you run into any issues.

@pbek pbek closed this Sep 18, 2016

@sardinas9

This comment has been minimized.

sardinas9 commented Sep 18, 2016

Thanks to you for taking the time to work on my request.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2016

Almost all new features stem from a feature request nowadays... ;)

@ghost

This comment has been minimized.

ghost commented Sep 19, 2016

The Avira Virus Lab Response Team wrote:

The file 'QOwnNotesPortable.exe' has been determined to be 'FALSE POSITIVE'. In particular this means that this file is not malicious but a false alarm. Detection will be removed from our virus definition file (VDF) with one of the next updates.

@sardinas9

This comment has been minimized.

sardinas9 commented Sep 20, 2016

Last night after starting the portable mode several times through the day my antivirus (Windows Defender) blocked the execution of the QOWnNotesPortable.exe file and put it into quarantine.

It seems difficult to prove beyond doubt that the exes generated with the Bat to Exe Converter are absolutely virus free. Or being virus free expect that such files won't be considered as real threats or highly suspicious files by any antivirus.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 20, 2016

@xraMsamohT thanks a lot for the feedback!
@sardinas9 we will stick with the bat

@pbek

This comment has been minimized.

Owner

pbek commented Sep 26, 2016

@sardinas9 I now created an entry at http://www.portablefreeware.com/index.php?id=2816, in case you want to like it there.

@smaragdus

This comment has been minimized.

smaragdus commented Oct 15, 2016

@pbek

I saw you had added QOwnNotes to The Portable Freeware so edited the database entry a bit and posted about your program at the forum:

http://www.portablefreeware.com/forums/viewtopic.php?f=4&t=23143

where I think that more users would have the chance to discover it (right now the database entry is private), test it, like it and use it.

I prefer to launch it via "QOwnNotes.exe --portable" parameter than using the BAT file (QOwnNotesPortable.bat).

Thank you for the implementation of portable mode in the Windows version of the program, without it QOwnNotes would have been virtually useless for me.

Regards

@pbek

This comment has been minimized.

Owner

pbek commented Oct 15, 2016

@sardinas9 thank you for creating the forum post! If there is a way to "like" it, I haven't found it yet. ;)

A question, do you use the "Light" editor color schema on purpose in dark mode?

@sardinas9

This comment has been minimized.

sardinas9 commented Oct 15, 2016

@pbek Thanks to You for the implementation of portable mode in Windows. All users of portable applications are grateful for that.
About your question. I do not use dark mode because I prefer the light theme and light color scheme. I think that dark mode and dark color schema are better combination than dark mode and light color schema as appears in the screen capture (http://www.portablefreeware.com/forums/viewtopic.php?f=4&t=23143.). Although I've tested the dark mode and light color schema I don't use it because in my opinion offers less readability than any of the other color combinations.

@pbek

This comment has been minimized.

Owner

pbek commented Oct 15, 2016

@smaragdus, sorry, I meant to reply to you with my last comment. :)
@sardinas9, yes, I also think dark and dark makes more sense than dark and light ;)

@smaragdus

This comment has been minimized.

smaragdus commented Oct 16, 2016

@pbek
First, thank you for developing QOwnNotes and for releasing a portable version! Some time ago when portable mode was not yet implemented I tested it and the lack of portability discouraged me. As far as I can remember then QOwnNotes was writing to Windows registry which I didn't like at all. Now I am glad there is a way to make QOwnNotes fully portable!

A question, do you use the "Light" editor color schema on purpose in dark mode?

In fact I yesterday I was very busy and didn't tested QOwnNotes thoroughly (and I haven't yet done it) so I am not sure whether I understand you right. I just chose "Enable dark mode". How can one change the colour schemes?

If there is a way to "like" it, I haven't found it yet. ;)

By the way now QOwnNotes is a public entry at The Portable Freeware:

http://www.portablefreeware.com/index.php?id=2816

which means that every visitor of the site will be able to see it.

Yes, there is a way to "like" it- when you log in and open a database entry below the program's icon there are two thumbs- "This app rocks!" thumb up and "This app sucks!" thumb down. When you click "This app rocks!" and confirm it, the program enters your favourites list. And when a program earns 10 points it becomes public. These points are based on a user rating system- a user with less than 50 posts at The Portable Freeware Forum has 0 points rating, user with 50+ posts- 1 rating, 100+ posts- 2, rating, etc, for the maximum of 5 a user needs 250+ posts. A program needs 10 points to become public (visible) which means that for example 10 users with rating of 1 should vote for it, or 2 users with rating of 5. Besides me another user with 5 rating voted for QOwnNotes and that is how it became public.

Although I just briefly tested the program I think I found a bug. Where should I report it? Here at GitHub or at The Portable Freeware Forum?

The Portable Freeware community is friendly and you can use this thread:

http://www.portablefreeware.com/forums/viewtopic.php?f=4&t=23143

as a kind of forum.

Regards

@pbek

This comment has been minimized.

Owner

pbek commented Oct 16, 2016

First, thank you for developing QOwnNotes and for releasing a portable version!

I'm happy you like it now. :)

By the way now QOwnNotes is a public entry at The Portable Freeware:

Yay!

This app rocks!

I found that. Sorry, I thought we were talking about the forum post...

Where should I report it?

Always GitHub please.

Cheers, Patrizio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment