Recent

Author Topic: Lazarus 1.4.2 and Windows 10  (Read 10978 times)

dalcymru

  • New Member
  • *
  • Posts: 19
Lazarus 1.4.2 and Windows 10
« on: August 04, 2015, 08:52:06 pm »
'Upgrading' windows 7 to Windows 10, little did I expect to find ruined my Lazarus apps.  Because the new windows changed some files in my Lazarus home-projects directory during its self-installation, so they no longer appeared on my desktop and did not run when I tried to find the compiled .exe file on my hard drive, I tried to run the app from a backup on a usb dongle.  This ran, but form layouts needed adjustment.  However, when I loaded the project into lazarus, it would not compile, reporting errors because it was unable to delete various backup files.

Has anyone else experienced this, please, and how, if at all, did they 'cure' the problem?

BitBangerUSA

  • Full Member
  • ***
  • Posts: 183
Re: Lazarus 1.4.2 and Windows 10
« Reply #1 on: August 04, 2015, 09:55:12 pm »
'unable to delete various backup files.'

seems to indicate you might want to try running Lazarus as Admin - if you haven't already.

the form layout needing adjustment is not surprising - i saw same-same with Windows 8.1.
i've got a new, fresh, *clean* install of Windows 10 but have not yet tried compiling one of my projects - maybe late night tonight...


Lazarus Ver 2.2.6 FPC Ver 3.2.2
Windows 10 Pro 64-bit

BitBangerUSA

  • Full Member
  • ***
  • Posts: 183
Re: Lazarus 1.4.2 and Windows 10
« Reply #2 on: August 05, 2015, 02:29:17 am »
my project compiled as expected - no compile/link issues seen.

Lazarus 1.4.2 and Windows 10 Home - but again, this was a clean install of Windows, not an upgrade.
Lazarus Ver 2.2.6 FPC Ver 3.2.2
Windows 10 Pro 64-bit

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Lazarus 1.4.2 and Windows 10
« Reply #3 on: August 05, 2015, 05:56:03 am »
No problem whatsoever here with Windows 10 upgrade. In which directory are your own apps installed? In which directory is Lazarus installed? What error messages exactly are you getting with your own apps? What error messages exactly are you getting with recompiling in Lazarus?

dalcymru

  • New Member
  • *
  • Posts: 19
Re: Lazarus 1.4.2 and Windows 10
« Reply #4 on: August 05, 2015, 09:53:07 am »
Thanks to all for your interest and pointers.  It required 'Run as Administrator' to be set, and I found
https://technet.microsoft.com/en-us/magazine/ff431742.aspx as a useful guide to making Lazarus always run as administrator.

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Lazarus 1.4.2 and Windows 10
« Reply #5 on: August 05, 2015, 10:04:01 am »
So you are going to run all your laz applications as administrator? I would find out why you get errors and adjust your program to work the correct way on Windows. I wouldn't feel happy to always run them as administrator (but maybe that's personal).

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11455
  • FPC developer.
Re: Lazarus 1.4.2 and Windows 10
« Reply #6 on: August 05, 2015, 10:24:34 am »
I don't understand fully, afaik Lazarus is nearly entirely in user writable directories.

Did you change user/create a new user while upgrading?

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Lazarus 1.4.2 and Windows 10
« Reply #7 on: August 05, 2015, 12:27:41 pm »
I had similar problems to @dalcymru with a simple msaccess-based app suite after upgrading from Win 7 to Win 10.

I upgraded Lazarus to the latest release which partially solved it, but 'clean up and build' was finally only effective when running Laz as an administrator.  I assume there were permission problems deleting older .ppus etc - but that's only a guess.

All good now - thanks for the link dalcymru.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11455
  • FPC developer.
Re: Lazarus 1.4.2 and Windows 10
« Reply #8 on: August 05, 2015, 12:50:40 pm »
It could mean that windows 10 zaps all filesystem permissions outside homedirs. Bad. >:D

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Lazarus 1.4.2 and Windows 10
« Reply #9 on: August 05, 2015, 01:51:34 pm »
@minesadorada and @dalcymru... were you as user an "Administrator" or just plain "Standard user" who can't install programs?

I'm "Administrator" (not to be confused with the old Administrator-user) and have no problems after upgrading. I run Lazarus 1.4.2 and trunk in C:\Lazarus and C:\Dev\Lazarus as a normal user and have no need to "Run as Administrator".

It would be nice to know what files (and in which directories) gave you trouble.

lainz

  • Hero Member
  • *****
  • Posts: 4470
    • https://lainz.github.io/
Re: Lazarus 1.4.2 and Windows 10
« Reply #10 on: August 05, 2015, 02:51:34 pm »
Working perfectly here, the same lazarus win7 now win10 is fine.

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Lazarus 1.4.2 and Windows 10
« Reply #11 on: August 05, 2015, 05:55:02 pm »
@minesadorada and @dalcymru... were you as user an "Administrator" or just plain "Standard user" who can't install programs?

I'm "Administrator" (not to be confused with the old Administrator-user) and have no problems after upgrading. I run Lazarus 1.4.2 and trunk in C:\Lazarus and C:\Dev\Lazarus as a normal user and have no need to "Run as Administrator".

It would be nice to know what files (and in which directories) gave you trouble.
I log on as an 'administrator'

My app uses the GetConfigDir calls for data and logs to its own folder.

It was TAChart that tripped up the app - no idea why.

I am frankly amazed that the upgrade from Windows 7 to Windows 10 messed up a well-written (IMHO) Lazarus application.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Thaddy

  • Hero Member
  • *****
  • Posts: 14381
  • Sensorship about opinions does not belong here.
Re: Lazarus 1.4.2 and Windows 10
« Reply #12 on: August 06, 2015, 11:08:56 am »
Well, if TAChart uses a directory that has insufficient rights it may fail if it tries to write or read series data.

Just make sure that data/inifiles is stored in f.e. %HOMEDRIVE%\users\%USERNAME%\appdata\local\*

These are guidelines that aren't new, but few Pascalites (be it Delphinians or Free) adhere to them. Including component writers and maintainers!
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Lazarus 1.4.2 and Windows 10
« Reply #13 on: August 06, 2015, 12:01:59 pm »
Just make sure that data/inifiles is stored in f.e. %HOMEDRIVE%\users\%USERNAME%\appdata\local\*
Ieks...  %) And also don't use that one  :)

If you want to do it according to the guidelines you shouldn't append such "path variables" together. I've seen perfectly fine/official systems where the user directories are not on the %HOMEDRIVE% and appdata is also not standard across different Windows-versions.

You probably wanted to say: %LOCALAPPDATA% (local specific to that machine) or even %APPDATA% which is the "roaming" one for domain environments.

You can find a list on this wiki-site:
https://en.wikipedia.org/wiki/Environment_variable#Windows

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Lazarus 1.4.2 and Windows 10
« Reply #14 on: August 06, 2015, 12:39:03 pm »
Well, if TAChart uses a directory that has insufficient rights it may fail if it tries to write or read series data.

Just make sure that data/inifiles is stored in f.e. %HOMEDRIVE%\users\%USERNAME%\appdata\local\*

These are guidelines that aren't new, but few Pascalites (be it Delphinians or Free) adhere to them. Including component writers and maintainers!
For writeable config files I follow the wiki guidelines here: http://wiki.freepascal.org/Multiplatform_Programming_Guide#Configuration_files
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

 

TinyPortal © 2005-2018