Open michael-ring opened 3 years ago
Hey Michael,
While you wait to see if @LongDirtyAnimAlf will implement that, you can do what I do.
I'm not sure if you're aware but every time fpcupdeluxe runs for Lazarus it renames lazarus/lazarus
to lazarus/lazarus.old
so at least you have that?
What I do is: right after a good compile I copy lazararus
, lazbuild
and startlazarus
to lazarus.working
, lazbuild.working
and startlazarus.working
.
That way whenever something goes BOOM I have those waiting for me.
Cheers, Gus
Nice trick! However, I am in the same dilemma, forgetting to set a new directory and forgetting to rename files is about the same thing 8-) However, with your solution I can go back to at least something known to work good. I like your other idea about pre/post scripts..... I did not realize that lazarus is renamed on build because I am using lazbuild a lot and that one does not get preserved...
Hey Michael(@michael-ring)
Yeah, let's wait and see what Don says about #376 and then we can plan accordingly.
Cheers, Gus
This feature request has been implemented in a different manner. https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.8.2s A history tabsheet has been added. Previous revisions can be selected. Please test. Thanks.
Hmm, I just did a fresh build and I have exactly the same date/revision and both look a little cheesy, 123456 as revision and 2134 as year look more like test data to me than something real.
Also, for revision my expectation would have been a hash (as I used git) and not a number (that looks more like svn).
There is a small optical issue, the history tab is invisible on a mac so likely people will not realize that it exists.
If there is real data, it will replace the test data. Real data is only generated when doing an update/install. Its a new feature. Data is only generated by this latest release.
GIT hashes are not yet supported. Only SVN.
Unfortunately I cannot build svn versions on MacOSX, will try on Windows later..
fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): Start checkout/update of FPC sources. fpcupdeluxe: WARNING: FPCNativeInstaller (DownloadFromSVN: FPC): svn is needed, but cannot be found on the system !! fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): FPC is at revision: fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): No updates for FPC found. fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): No FPC patches defined. fpcupdeluxe: info: FPCNativeInstaller (BuildModule: FPC): Building module FPC... fpcupdeluxe: ERROR: FPCNativeInstaller (BuildModule: FPC): /Users/ring/fpcupdeluxe-test/fpcsrc/Makefile not found. Severe error. Should not happen. Aborting.
ERROR: Fpcupdeluxe fatal error ! Sequencer (FPC): Failure running fpcupdeluxe: error executing sequence FPC Sequencer (DefaultSimple): Failure running fpcupdeluxe: error executing sequence DefaultSimple
I gave the feature a try on Windows, here are my observations:
using git as a base confuses the system same as on Darwin. For fpc the latest build was added but with the svn checkout which does not help. For lazarus nothing was set. i first built fpc, then build lazarus.
With svn as a base things look better, I did a complete build of fpc+lazarus and saw both versions in history. I then manually changed the checkout to an older version and the rebuilt fpc only. build was successful but the revision I choose was not added to history, I would have expected to see two entries here, one for the initial build and the other one for the successful build I did on the older svn checkout.
Due to the move from svn to git, the history feature now uses hashes. I will leave this issue open for about a week to enable feedback on this feature.
"build last known good" suggests auto-saving "known good" configurations, rather than user doing this explicitly
just used 2.2.0e to make fresh win64 install.
Tried some packages, like chmhelp, jvcl, etc - and now the fpcupdeluxe works no more. (I miss binary plugins of Delphi IDE 3.0+...)
There seems ot be no "dependencies" concept, so that user-selected packages could pre-install there dependencies.
d:\fpcupdeluxe\lazarus\components\chmhelp\packages\
package required units from d:\fpcupdeluxe\fpc\units\x86_64-win64\chm\
but there seems to be no clear way to modify search path...
It would be nice if fpcupdeluxe provided "proper" ways to modify dependencies from extra packages, be them "fpc package" (what is it? i heard the term but do not know, if it means something) or file path. Because manually trying to edit random source file would surely only add more confusion... Since fpcupdeluxe strives to provide some componentization, some "proper" infrastructure to express this paths and dependencies, it would be nice if it helped to modify this setting in proper, expected places.
(10001) PPU Loading D:\fpcupdeluxe\fpc\units\x86_64-win64\chm\chmreader.ppu
(10011) PPU Source: chmreader.pas not available
(10028) Recompiling chmreader, checksum changed for D:\fpcupdeluxe\lazarus\components\sparta\generics\lib\x86_64-win64\generics.collections.ppu
D:\fpcupdeluxe\fpc\units\x86_64-win64\chm\chmreader.ppu:chmreader.pas(81,12) Fatal: (10022) Can't find unit chmreader used by ChmLangRef
Fatal: (1018) Compilation aborted
Basicaly, I can get what it writes in Pascal sense, but not in fpcupdeluxe...
History
tab is empty for me.
lazarus.exe
exists no more - so i can not even open the packages in the "old IDE" to twist settings.
Dead-end now... Remove all and start from scratch... I can not "take N steps back" or like that.
Okay, let me tell you how to shoot yourself in the foot. At least on Win64 version. And it might show a newcomer frustration.....
Remove config_lazarus folder, make Extras/CreatLazConf and Extras/CreateStartupScripts
Now IDE compiles. Lazarus 2.0.12 r64642 FPC 3.2.2 x86_64-win64-win32/win64
This compilation process is looong, so sorry, i can not skip some intermediate steps, i suspect they are not relevant, but i can not be sure. Minimizing it would take lot of midnight time.
At this point History tab shows something, however, it only shows single hash for FPC and another for Laz, and those seem to be git stamps of the vanilla sources, NOT including any user customization made, including extra packages adding.
......
So, next step: Press "mORMot" button, something is getting done, okay. I wish it tell if it installs mORMot or mORMot2 (as there are two modulkes in the list), but whatever.
History tab still shows the same "vanilla" releases, it did not added another hash for the new (vanilla+mORMot) configuration.
....at this point it would be nice if fpcupdeluxe
SAVED automatically (after successful compilations) new configuration of FPC + laz + packages + it's own settings, whatever is need to be saved. Into local git/hg/fossil, with "commit message" outlining last differences / user actions. This however would require fpcupdeluxe
to have some stateful configuration, including packages (installed / not-installed / downloaded but temporarily turned off). Maybe it even has it, but not in GUI.
.....
Next step was... ooops, i already forgot! Where can i check it, the history of my inputs? some high-level log?...
ooookay, i believe the next step was to press Modules/OPM button
Since it is positioned near package infor and next to install/uninstall buttons - i believe it is just another way to install the selected module, right? Like, a more sophisticated, flexible way. So, i press the OPM and something is installed. But not the module i selected in the list. OOOOPS.... a downer.
On a good side, nothing seems broken and IDE still compiles.
History tab still shows the same "vanilla" releases, it did not added a 3rd hash for the new (vanilla+mORMot+OPM) configuration.
...........
Now i install jplib
module.
Actually i wanted to try jppack
module, but if i try it - it will start compiling, then after the fact it would say it can not work without jplib
. I learned it hour ago, when Laz was installed only to get broken. Tell anything bad about CodeTyphon guys, but at least their "bigIDE" seems to compile at any release... And also, it felt sad when the dependency was not announced BEFORE trying to install a jppack
package, but only after a failed attempt. Perhaps i am spoiled with Delphi BPLs...
Okay, whatever, as next step i believe i installed that jplib
module. Something compiled succesfully...
History tab still shows the same "vanilla" releases, it did not added a 4th hash for the new (vanilla+mORMot+OPM+jplib) configuration.
..........
Now i finally install jppack
module.
...and things go off the cliff. IDE can no more be compiled!
Funny thing is, desktop STILL has that Lazarus launching icon. But there is no .exe when i click that shortcut. Inconsistency.
..........
I am smartie, i even remember what i did last time!!! So i find that jppack
module and click Uninstall. Now it would save the day. Am i not a smart boy?
02.12.2021 0:25:13: fpcupdeluxe: V420 (20211003) started.
FPCUPdeluxe V2.2.0e for x86_64-win64 running on Win64-6.1.7601
Build with: FPC 3.2.2 on Win10 x86_64
Found valid svn.exe application.
Found valid git.exe application.
Found valid hg.exe application.
Found valid make.exe application.
fpcupdeluxe: info: UniversalInstaller (UnInstallModule: jppack): UnInstalling module jppack
fpcupdeluxe: info: UniversalInstaller (RemovePackages): Package jppacklcl.lpk not found ... skipping.
fpcupdeluxe: info: UniversalInstaller (UnInstallPackage: jppacklcl): Removing package from config-files
SUCCESS: Fpcupdeluxe ended without errors.
....fpcupdeluxe did not even TRY to compile the lazarus.exe !!! It did not even try! There is no IDE at all, but it writes "SUCCESS".
Basically, at this point you can just delete the FPC/Laz and start anew, there it no GUI way out of the mess, only "surgical methods" of renaming this and that folder and seeing what happens. Whatever you do with fpcupdeluxe - there will never be IDE compiled.
I wonder, can you just take CodeTyphon Control Center for the starting point, replace their custom things with vanilla ones and use it?
I remember when some package wrecked IDE build in it, all i had to do is "uncheck all" modules, then clean all, then build all - and it worked. Then i could bi-sect which module was breaking things, by obvious checkboxes... I think it re-generated configuration every time i pressed "build XXXX" rather than trying some complex cached "uninstall" automagic. Maybe it was slow, but recompiling IDE is not fast anyway. But at least it always provided a way out to bare-bones, vanilla IDE, if things went wrong.
Yeah, their "install.bat" script is crazy and has needlessly hard-coded what it could has as configuration, and i even once sent them patches, to no avail... but their Control Center was really making Laz usable on Win...
yes, just "Installing" jppack
- for example after deleting that config_lazarus
folder - makes fpcupdeluxe totally ruined with no way out by standard user GUI
Thank you for your detailed feedback ! Will try to answer your questions.
First, to make a few things clear. Fpcupdeluxe is a FPC and Lazarus installer. And a cross-compiler installer. All other things, most likely the modules, are an extra with unknown side-effects, as fpcupdeluxe has no means of changing their (modules) sources or behavior. The preferred way of installing extras into Lazarus is to use the OPM, that can be installed by a single click on the modules tab.
Your remarks.
There will never be a last known config. The inner workings of Lazarus when installing a package are unknown to me. Packages can have huge influence on the behavior of Lazarus, can make many changes in the config. Its impossible for fpcupdeluxe to track all those changes and revert to some well defined state if something goes wrong. The same is valid for moving an install to another location: also impossible due to all those settings with non-relative paths.
The history tab is only meant for tracking the origin of FPC and Lazarus sources. Nothing else. This should ease debugging of FPC and Lazarus.
There is definitely a dependencies concept. Package files are scanned for dependencies and these will be installed recursively. There is also the possibility to add dependencies for the modules themselves.
Packages like jplib and jppack are external sources. As mentioned earlier, they will get installed as is. How they influence FPC and Lazarus is unknown to me. I do not know if the author checks their compatibility with the most recent FPC and Lazarus versions.
The chmreader error is a known error. Has nothing to do with fpcupdeluxe. Is caused by a combined install of certain packages.
If you have ruined your Lazarus install (and that happens to me more often than I like), just remove (only) the config_lazarus directory and let fpcupdeluxe install Lazarus again. This will always work and will give you a vanilla Lazarus again.
I can google, Don.
However this does not answer the question: when a newb sees fpcupdeluxe and sees OPM button there - what does it mean in terms of process integration of OPM and of fpcupdeluxe and of fpcupdeluxe making it's job by proxy of OPM?
Frankly, i think it would make sense to remove that page from fpcupdeluxe as it currently is and make OPC into a pluggable comp[onent (like BPL in Delphi) that can be used form it's own EXE or as a tab panel in fpcupdeluxe
чт, 2 дек. 2021 г. в 09:06, Don @.***>:
OPM
https://wiki.freepascal.org/Online_Package_Manager
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LongDirtyAnimAlf/fpcupdeluxe/issues/372#issuecomment-984321446, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHE6LWZT5X7K3H46SYNJT3UO4EFBANCNFSM42FMRUOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Perhaps you misunderstood. The OPM button only installs the OPM into Lazarus. Nothing else. When the user has chosen this option, he or she can forget about fpcupdeluxe and use the OPM to install packages. This feature was added due to the fact that installing modules (packages) through fpcupdeluxe can be a bit dangerous. The modules are downloaded as they are from online sources. Without any guarantee. The OPM delivers the same but with much more guarantees !
All other things, most likely the modules, are an extra with unknown side-effects, as fpcupdeluxe has no means of changing their (modules) sources or behavior.
So those pages should be hidden by default, and if not - they should be only enabled after a BIG RED WARNING
By mere presentation of that tab in the list of other top-level tabs you advertise this functionality to nd user as ready to be used. GUI is it's own documentation. Frankly, i was rather confused ifindint that button OPM there, what about "separation oif concerns" and single-responsibility ? Who is "owning" those packages, fpcupdeluxe or OPM.
Perhaps you'd better remove that tab by default. Or at all. Or only populate with few packages you personally tested and whitelisted. For everything else - call OPM GUI, hich seems much more flexible, advanced and hopefully stable w.r.t. packages.
There will never be a last known config.
Now, this is something substantial.
The inner workings of Lazarus when installing a package are unknown to me.
Now, this is complication, but not impossibility. You always cal remove all "configuration" and then re-create it step by step. Recreate pieces needed for FPC, re-create pieces neeeded by Laz, by mORMot, by OPM, etc, etc.
Think about it as applying patches - you have some "trunk" ( vanilla FPC comilation files ), and then you have "patches" (Lazarus, every module, all the user-tuned options, etc, consider). This all is within fpcupdeluxe control and can be "re-done from scratch".
So, yes, as long as user did not tweaked Laz after fpcupdeluxe and by other means then fpcupdeluxe - fpcupdeluxe CAN provide "last known good" and even can provide all the history of use actions and changes - just commit those to local git or hg, which fpcupdeluxe includes anyway. User did something, triggered re-compilation, it was OK - commit.
Packages can have huge influence on the behavior of Lazarus, can make many changes in the config. Its impossible for fpcupdeluxe to track all those changes and revert to some well defined state if something goes wrong.
Yes and no. Tracking changes is impossible indeed. Reverting IS possible by "start in emptyplace, apply 'build FPC' patch, apply 'build Laz' patch, apply 'add module 001' patch, , apply 'add module 002' patch, apply 'add module 004' patch, apply 'add module 005' patch, compile now"
See, we just reverted whatever module 003 was doing without knowing a thing about it.
The history tab is only meant for tracking the origin of FPC and Lazarus sources. Nothing else. This should ease debugging of FPC and Lazarus.
Perhaps then you'd better remove all the setting that can not be tracked? Specifically, modules that you perosnally could not test?
There is definitely a dependencies concept. Package files are scanned for dependencies and these will be installed recursively.
Maybe, but i could not see that from fpcupdeluxe GUI. I tried to install LazProfiler, then it downloaded the profiler, started compiling it, and failed complaining there is not VirtualTreeView installed. fpcupdeluxe did show two different VTV forks and gave no suggestions of which one was needed by the profiler. And anyway, why did fpcupdeluxe even tried to download and compile the profiler if it knew VTV dependency was unresolved. This does not look as "knowing the concept of dependencies".
So yet gain i think the modules, maybe except for few white-listed and perosnally tested by you, better be removed. Either do it equally good to OPM or don't do it at all. Your program is a gateway for newbs, anything that make a newb be totally lost with totally unsuable Lazarus - is "blocking bug". Your program is not for seasoned ones who can fix and Laz compilation error while sleeping, it is for newbs. It is their last resort to make things working form any broken situation!
There is also the possibility to add dependencies for the modules themselves.
Probably, but being newb how can i know which of dozen source files and how exactly to edit to do that? Yet worse, after i do it what would hapen next? chances are, fpcupdeluxe would refetch those modules from repo undoing my changes...
Packages like jplib and jppack are external sources. As mentioned earlier, they will get installed as is. How they influence FPC and Lazarus is unknown to me. I do not know if the author checks their compatibility with the most recent FPC and Lazarus versions.
But then REMOVING them is still fpcupdeluxe's job to do.
Your program is one targeting newbs to make the Lazarus working. Not maybe bleeding edge, not every feature on Earth, but - working.
The chmreader error is a known error.
Then fpcupdeluxe could tell newb user how to fix that "well known error". Or prevent user from killing Laz with that error.
Geez, even mere not deleting lazarus.exe until new version is successfully compiled would be much better user experienc - user would always have something to start with...
Has nothing to do with fpcupdeluxe. Is caused by a combined install of certain packages.
It has. I download "officially published" fpcupdeluxe, i only click what fpcupdeluxe advertises to me to click, never interferred with fpcupdeluxe's business firm outside, i end up with the situation Lazarus is broken and fpcupdeluxe does not do anything to rebuild it.
CTCT, again, (CodeTypon's Control Center) does have clean build functionality. Because they target newbs and they want to give newbs a reliable way to run Lazarus, at least vanilla "small IDE" one.
If you have ruined your Lazarus install (and that happens to me more often than I like), just remove (only) the config_lazarus directory
Thank you, did that already and wrote it abovew, however, WHY fpcupdeluxe, a tool targetting newbs did not do it on its own, or at least not suggested it? I random-guessed it. But the tool could just do it for me.
Actually, again, try to refolmulate your repetitious task of building FPC+Laz+some modules you like in a "checklist menu" combination. Like declarative proigramming vs imperative one. On modules again (if you wish to retain this quasi-OPM), there has to be no "install" and "uninstall" actions with no certain known in advancemeaning behind them, but "installed/downloaded"removed" state instead. The state you can both save to fpcupdeluxe's config and exchange with users and reapply to empty clean folder as stage 0 for FPC/Laz build. Then you could remove "config_lazarus" and/or some other temporary folders on very build attempt and re-populate them from scratch according to those user's options, and you would be able to save those options into some configs, and put those configs to local git/hg - and here were are, the last-known-good configuration, and also a number of alternative Laz build profiles (git branches of fpcupdeluxe configs). Even you would then be able to quickly test different sets of FPC/Laz/packages by "switching" your fpcupdeluxe config to this or that branch/commit.
Perhaps you misunderstood.
Sure, and i explained to you why i misunderstood. GUI is documentaiton. Where you position buttons, how you name them - that already IS the documentation. Otherwise we all would still be only using commandlines - much more flexible but much harder to learn. If the OPM button is positioned within the same "groupbox" as with module description and install/uninstall buttons, then this documents that it is the same rank action, applied to the selected module.
The OPM button only installs the OPM into Lazarus. Nothing else.
Would it then be more reasonble to position that button in bottom panel next to mORMot panel?
When the user has chosen this option, he or she can forget about fpcupdeluxe and use the OPM to install packages.
And that probably would be more safe option, if fpcupdeluxe would advertise it.
Actually WHY did you addd the modules tab? FPC wiki screenshots of fpcup suggests there was no such thing there. Then why?
fpcupdeluxe seems to be the tool for newbs to start - then why should it contain fuinctionality, which is dangerous, hard to implement reliably and completely, already implemented in another tool (OPM) and is alpha-quality at best?
There should had been a reason to spend all that effort, after you forked fpcup?
This feature was added due to the fact that installing modules (packages) through fpcupdeluxe can be a bit dangerous.
The modules are downloaded as they are from online sources. Without any guarantee.
no guarantees about their installation, i get it. But there can be guarantees about their removal!
The OPM delivers the same but with much more guarantees !
So, there CAN be guarantees.
Yes, it would take efforts to provide them. And this bring us backto square one - while there could had been some marginal reasons why fpcupdeluxe decided to reinvent unsafe stateless laconic OPM clone, why to advertise that funcitonality to newbs? Won't it be better to hide it from newbs and instead to redirect them to OPM ? and if they try to enable it - to outright tell them "i only implemented this tool for a very niche case of x, y nd z. Itis dangerous tool and unless you exactly do X,Y and you do not need it" ?
Thanks again for your answer. And again I think you misunderstand the goal of fpcupdeluxe.
Fpcupdeluxe is nowhere near an official installer for FPC, Lazarus and packages. Fpcupdeluxe used online sources that are so dynamic that testing all is an impossible task. Fpcupdeluxe will install FPC and Lazarus with success on most systems out there. Fpcupdeluxe is not meant for nb.
As you are perhaps right in many remarks, most of them will never be implemented. There is no time nor need to do so. Its not what fpcupdeluxe is made for.
Official installers are made available by FPC and Lazarus developers. Use these to get things running. Read Wiki-instructions to do anything else.
If you want an out-of-the-box experience, use CodeTyphon. It will work on many systems. With many add-ons also working 100%. And as free as FPC and Lazarus.
If you want an out-of-the-box experience, use CodeTyphon.
And i did it, but many Laz users kep complaining about those shady "pirates"
Fpcupdeluxe is not meant for nb.
An then those guys tell exactly that fpcupdeluxe IS for newbs, they said CT's only reason of existense was providing things working out of the box, but now as we have fpcupdeluxe it is as easy for Lazarus as it was for CT, so get rid of those shady pirates.
Whether it was your itnention or not, fpcupdeluxe IS touted as go to tool for newbs to install vanilla Laz, be them refugees from Ct, from Delphi or just students needing first Pascal expirience at new school year.
P.S. from readme.md: "Fcpupdeluxe is the latest addition that adds a GUI to ease its use."
And again I must correct you. I am sorry about this. In the past, even before I took over fpcup(deluxe), its primary goal was to ease the installation of cross-compilers. That is a very hard task. For anybody. I have personally put a huge amount of effort to get crossing as easy as just pressing a single button. I have build many cross-tools, made many cross-libs available. And again, packages (modules) are not a primary goal. OPM does a fantastic job for that. You might use it as such: if its not available through OPM, you might try fpcupdeluxe.
To give you an idea, I will share my personal setup.
I never ever install packages. I have a testing Lazarus for that. After testing, all is done runtime in my official install. That makes my projects portable to any install or setup. Fpcupdeluxe is build on Win10. All versions. All cross-build. I think that is a marvelous accomplishment by FPC and Lazarus !
I am happy with FPC and Lazarus and their devs !
Problem is, whatever you intentions and goals (indeed only you know) the tool IS advertized as a way for newbs as safe and easy way to get Laz.
It would be nice if readme.md clearly explained this is NOT safe tool for newcomers.
And/or, non-polished and dangerous functionaliy to be disabled by default.
I never ever install packages. I have a testing Lazarus for that.
The stateful menu and installation of packages would also provide for easy testing different FPC/Laz versions with respect to a given libs set. Whether that is needed or not i don't know.
The stateful menu and installation of packages would also provide for easy testing different FPC/Laz versions with respect to a given libs set. Whether that is needed or not i don't know.
Yes, that would be a very welcome feature. But not to be implemented by me. That is a Lazarus devs thing. And I know that they are working on a plug-in system that would fulfill all (our) needs !
As our opinions are clear now, this discussion can end now. And will continue when the Lazarus plug-ins feature is available.
Sometimes I am stupid, I am usually on lazarus trunk.git and in some cases I hit Install/Update FPC + Laz without changing to a test directory. When then Lazarus build fails I am left with a system that does not work anymore because lazarus does not start after a failed build.
It would be nice that fpcupdeluxe stores the git-tag or svn revision after a successful build in a 'lastknowngood' selection for fpc and lazarus.
Then I could select those entries and rebuild fpc/lazarus and very likely get back a working system again and can continue until trunk is fixed again. Is this doable?