Skip to content

Change how portable mode works#148

Merged
shinovon merged 14 commits intomainfrom
linux-installation-preps
Apr 17, 2025
Merged

Change how portable mode works#148
shinovon merged 14 commits intomainfrom
linux-installation-preps

Conversation

@Feodor0090
Copy link
Copy Markdown
Collaborator

Simplifies handling of installed kem.

If you keep KEm in a folder on usb flash or desktop, you near-always
expect that everything will live in this folder. If your KEm is somehow
ended in C:\Program Files\, you probably don't want it to be portable,
and windows won't allow you that anyway.

So i deleted this flag and added checks against some well-knows paths.
Uses `open` on macos and XDG util on linux
For future installable packages. Not tested but should work in theory
This commit doesn't modify code.
Prompts to run with `sudo` or to use package manager.
@shinovon
Copy link
Copy Markdown
Owner

Will close #96

@Feodor0090 Feodor0090 marked this pull request as draft April 13, 2025 23:53
Temporary "fix", watchers UX will be revisited separately
@Feodor0090
Copy link
Copy Markdown
Collaborator Author

  • VLC works as expected even without setting it in settings
  • M3G on mesa fixed on master

i ran out of ideas what else to touch, looks like ready one

@Feodor0090 Feodor0090 marked this pull request as ready for review April 15, 2025 15:52
@shinovon
Copy link
Copy Markdown
Owner

Also related to #95

if (win) {
// installer will write to registry path to installed jar. Let's check it.
try {
Process regRequest = Runtime.getRuntime().exec("reg query \"HKEY_LOCAL_MACHINE\\Software\\nnproject\\KEmulator\" /v JarInstalledPath");
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How this will work on 32-bit systems/32-bit java?

Copy link
Copy Markdown
Owner

@shinovon shinovon Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there is separate key for 32-bit apps on 64-bit systems: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node

Copy link
Copy Markdown
Collaborator Author

@Feodor0090 Feodor0090 Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This starts a separate process from 64-bit built-in util on pure-64 and WOW systems and from 32-bit on 32 systems. In theory, this will work if installer matches system's arch (MSI). If we will use third-party installer like NSIS, we will likely distribute 32-bit binary so it will fail on WOW systems (32-bit installer writes to 32-bit tree and 64-bit reg.exe checks 64-bit tree).

I suggest to leave this as is until i make installer and we will hit the fact that this check fails. Then i will fix it by adding /reg:32 argument.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://t.me/nnmidletschat_ru/179322

decided to leave as is

@shinovon shinovon force-pushed the linux-installation-preps branch from 7ad0667 to ba04da1 Compare April 17, 2025 10:11
@shinovon shinovon merged commit 8f0a19f into main Apr 17, 2025
@Feodor0090 Feodor0090 deleted the linux-installation-preps branch April 17, 2025 18:26
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

Successfully merging this pull request may close these issues.

2 participants