Forums
| SharpEnviro, an open source shell replacement for Windows :: Forums :: SharpE Development :: SharpE Development |
|
<< Previous thread | Next thread >> |
| Built and 90% running in Delphi 2010. | ||
|
Moderators: Billi Berserker, pixol, silentpyjamas, glacialfury, yay, brum74, HomerSp
|
| Author | Post | ||
| FWishbringer |
| ||
![]() Registered Member #2786 Joined: Wed Apr 07 2010, 01:26PMPosts: 20 | Here's my trek, from start to current place (debugging and fixing things). Its not pretty, it has lots of bugs, a healthy amount of access violations, but is running well enough to debug. Building r4025 in 2010 ====Environment Setup==== Delphi Prism 2010 From http:// www.embarcadero.com/ products/delphi-prism (being a Visual Studio addition, my company covered it) JVCL339CompleteJCL211- Build3536 From http://jvcl.delphi- jedi.org/ graphics32-1-9-0- r1336 From http://graphics32.org/ wiki/Main/Release 26127 PngComponents for Delphi 2009/2010 From http:// cc.embarcadero.com/Item/ 26127 CoolTrayIcon From http://www.opensc.ws/ components/10084- cooltrayicon-like- d2010.html#post78212 (Was told CoolTrayIcon isn't needed, I set it up anyway since it was listed in the wiki) Installed Delphi Installed Prism Renamed files in JVCL Copied replacements to JVCL Installed JCL Installed JVCL (there was 1 error) Renamed files in GR32 Copied replacements to GR32 Built/Installed GR32 The PngComponents is different from the wiki one in that it doesn't include the file to replace Add (3rd party) \PngComponents\Source to Library/Browsing Paths Built PngComponents.dpk Built/ Installed PngComponentsDesign.dpk A ttempted to build CoolTrayIcon_D6plus Will fail with error, replace: StrDispose(Strings[i]); with StrDispose(PAnsiCha r(Strings[i])); Built/ Installed Cooltrayicon Add (3rd party)\Cooltrayicon to Library/Browsing Paths Add (3rd party)\jvcl\resources to Library/Browsing Paths Add (3rd party)\jvcl\lib\d14 to Library/Browsing Paths Now, JVCL installer misses stuff. Why? No idea. Here's how I fixed it. Add (3rd party)\jvcl\dcu to Library/Browsing Paths Add (3rd party)\jvcl\common to Library/Browsing Paths Open a blank group in Delphi Open your (3rd party)\jvcl\packages\d14 folder Drag all .pkg files over to the empty group Open JvValidators.pas (the new one) Change "JvVCL5Utils" to "Utils" Build all If you don't see where to change that line, you'll have it pointed out when you try to build JvValidators Note, when building SharpE, you'll see lots of errors around missing *D11R, just replace D11R with D14R Also replace PNG_D9 with PngComponents and GR32_RS2007 with GR32_RS2010 ====Building SharpE==== Preliminary: (3rd party) \GR32\GR32_PNG.pas Replac e all tPngObject with tPngImage Replace all TPngObject with TPngImage ====Project Groups/Libraries==== Project Groups/Libraries/ SharpAPI.dll sharpe_svn\C ommon\Libraries\SharpAPI\ SharpAPI.dpr Around Line 1582 --- - opFile.pFrom := PAnsiChar(FileList.Delimi tedText); + opFile.pFrom := PChar(FileList.DelimitedT ext); --- Project Groups/Libraries/ SharpDialogs.dll sharpe_s vn\Common\Libraries\Sharp Dialogs\SharpDialogs.dpr Around Line 345 --- - szDirName: array [0..260] of AnsiChar; + szDirName: array [0..260] of Char; --- (A few lines up from where the error occurs when building) Libraries should now build. . ====Project Groups/Modules==== Project Groups/Modules/ Notes.dll This was a 'fun' one... they fixed a bug abused by SharpE (and others) https:// forums.codegear.com/ thread.jspa? threadID=32036 sharpe_svn\Common\Delph i Components\SharpETabList\ SharpETabList.pas Around Line 1289 --- procedure TSharpETabList.DrawTabs; var x: Integer; i: Integer; iTabWidth: Integer; tabExtents: TTabExtents; + temp: TTabExtents; begin // Init tabs for i := 0 to Pred(Count) do with FTabList.Item[i] .TabExtent do begin - TabRect := Rect(0, 0, 0, 0); + temp := FTabList.Item[i] .TabExtent; + temp.TabRect := Rect(0, 0, 0, 0); + FTabList.Item[i] .TabExtent := temp; end; --- Around Line 1343 --- with FTabList.Item[i] .TabExtent do begin - TabRect := Rect(0, 0, 0, 0); + temp := FTabList.Item[i] .TabExtent; + temp.TabRect := Rect(0, 0, 0, 0); + FTabList.Item[i] .TabExtent := temp; end; --- Around Line 1371 --- with FTabList.Item[i] .TabExtent do begin - TabRect := Rect(0, 0, 0, 0); + temp := FTabList.Item[i] .TabExtent; + temp.TabRect := Rect(0, 0, 0, 0); + FTabList.Item[i] .TabExtent := temp; end; ---- sharpe_svn\Plugins\Modu les\Notes\MainWnd.pas Aro und Line 95 --- - wParam := GlobalAddAtom(PAnsiChar(S ettings.Directory)); + wParam := GlobalAddAtom(PChar(Setti ngs.Directory)); --- sharpe_svn\Plugins\Modu les\Notes\NotesWnd.pas Ar ound Line 206 --- - str : PAnsiChar; + str : PChar; --- Project Groups/Modules/ AlarmClock.dll This affects a few, this was the project I happened to fix it in. sharpe_svn\Common\De lphi Components\SharpEListBoxE x\SharpEListBoxEx.pas Aro und Line 1366 --- - inherited Items[AIndex] as TSharpEListBoxExColumn; + {inherited Items[AIndex] as TSharpEListBoxExColumn;} --- Procedures now follow 'all or nothing'. You can't set up to perform a function and not perform a function. Empty procedures are allowed (as is noted in the procedure up one in the source) Also, the resources can't be found for AlarmClock. Copy sharpe_svn\Plugins\Module s\AlarmClock\*.res to sharpe_svn\Plugins\Module s\AlarmClock\res\*.res P roject Groups/Modules/ TaskBar.dll sharpe_svn\Pl ugins\Services\Shell\uTas kItem.pas Around Line 132 --- - if (newicon = 0) then newicon := ExtractIcon(SysInit.HInst ance, PAnsiChar(GetProcessNameF romWnd(Handle)), 0); + if (newicon = 0) then newicon := ExtractIcon(SysInit.HInst ance, PChar(GetProcessNameFromW nd(Handle)), 0); --- sharpe_svn\Plugins\Modu les\Taskbar\uTaskPreviewW nd.pas Around Line 267 --- - hr := dwmapi.DwmRegisterThumbna il(FWnd,pTaskWnd,FdwmThum bID); + hr := dwmapi.DwmRegisterThumbna il(FWnd,pTaskWnd,PHTHUMBN AIL(FdwmThumbID)); --- Project Groups/Modules/ Weather.dll sharpe_svn\Co mmon\Units\SharpNotify\Sh arpNotify.pas Around Line 607 --- - i2 := pos(#13#10,s); + i2 := pos(WideString(#13#10),s) ; --- Project Groups/Modules/ QuickScript.dll sharpe_sv n\Components\SharpMenu\Fo rms\uSharpEMenuWnd.pas Ar ound Line 237 --- - Msg.Result := GlobalAddAtom(PAnsiChar(F MenuID)); + Msg.Result := GlobalAddAtom(PChar(FMenu ID)); --- Project Groups/Modules/ SystemTray.dll sharpe_svn \Plugins\Modules\SystemTr ay\MainWnd.pas Around Line 394 --- - szText[n] := Char(FTrayClient.LastTipI tem.FTip[n]); + szText[n] := AnsiChar(FTrayClient.Last TipItem.FTip[n]); --- Project Groups/Modules/ Menu.dll sharpe_svn\Plugi ns\Modules\Menu\MainWnd.p as Around Line 205 --- - buf : PAnsiChar; + buf : PChar; --- Modules should now build. . ====Project Groups/Objects==== Built first try. If they don't, then follow this step by step (I'm going in order I've done everything). . ====Project Groups/Services==== Project Groups/Modules/ Exec.dll sharpe_svn\Plugi ns\Services\Exec\FileUtil s.pas Around Line 13 --- -procedure StrResetLength(var S: AnsiString); +procedure StrResetLength(var S: String); --- Around Line 101 --- -procedure StrResetLength(var S: AnsiString); +procedure StrResetLength(var S: String); --- sharpe_svn\Plugins\Serv ices\Exec\uExecServiceExe cute.pas Around Line 157 --- - filetoexecute, commandline: string; + filetoexecute, commandline: AnsiString; --- sharpe_svn\Plugins\Serv ices\Exec\uExecServiceExe cute.pas Around Line 390 --- - PChar(sLink), + PAnsiChar(sLink), --- Project Groups/Modules/ cursors.dll sharpe_svn\Pl ugins\Services\Cursors\uC ursorsServiceManager.pas Around Line 236 --- - FhCursor := LoadCursorFromFile(PAnsiC har(path)); + FhCursor := LoadCursorFromFile(PChar( path)); --- sharpe_svn\Plugins\Serv ices\Cursors\cursors.dpr Around Line 37 --- SharpApi, + Classes, --- DeallocateHWnd was moved. Project Groups/Modules/ Startup.dll sharpe_svn\Pl ugins\Services\StartupApp s\uStartup.pas Around Line 203 --- - keyname: PAnsiChar; + keyname: PChar; --- Services should now build. . ====Project Groups/Components==== Loading this complains Explorer.dproj has been removed! Project Groups/Components/ SharpCompile.exe sharpe_s vn\Common\3rd party\DosCommand\DosComma nd.pas Around Line 260 --- -type TCharBuffer = array[0..MaxInt - 1] of Char; +type TCharBuffer = array[0..MaxInt - 1] of AnsiChar; --- Around Line 473 --- - pBuf^[i]: =InputLines_SHARED[0][i]; + pBuf^[i]: =AnsiChar(InputLines_SHAR ED[0][i]); --- Project Groups/Components/ SharpConsole.exe sharpe_s vn\Components\SharpConsol e\TextConverterUnit.pas A round Line 206 --- - Result := Result + ANSIToHTMLMap[s[i]] + Result := Result + ANSIToHTMLMap[AnsiChar(s[ i])] --- Around Line 411 --- - if CompareStr(ANSItoHTMLMap[ i], s) = 0 then + if CompareStr(ANSItoHTMLMap[ AnsiChar(i)], s) = 0 then --- Around Line 458 --- - result := result + ANSITo7Bit[s[i]] + result := result + ANSITo7Bit[AnsiChar(s[i]) ] --- sharpe_svn\Components\S harpConsole\FatThings.pas Around Line 765 --- -var ALeft, ATop: Integer; +var ALeft, ATop: Integer; temp: TDrawInfo; --- Around Line 787 --- - Flags := Flags + [dfDontDraw]; + temp := DrawInfo; + temp.Flags := Flags + [dfDontDraw]; PaintTo(Canvas, ALeft, ATop, LineHeight, Borders, temp.Flags); - Flags := Flags - [dfDontDraw]; --- Project Groups/Components/ SharpScript.exe sharpe_sv n\Common\Units\SharpScrip t\SharpFileUtils_Adapter. pas Around Line 112 --- - Result := strPas(InfoData); + Result := strPas(PAnsiChar(InfoData )); --- Project Groups/Components/ SharpCenter.exe sharpe_sv n\Components\SharpCenter\ uSharpCenterManager.pas A round Line 841 --- - tmp: ISharpCenterPluginEdit; + tmp:TPlugin; --- Around Line 850 --- - tmp := nil; --- Around Line 852 - EditInterface := tmp; + tmp := Plugin; + tmp.EditInterface := nil; + Plugin := tmp; --- Around Line 862 --- - tmp: ISharpCenterPluginEdit; + tmp:TPlugin; --- Around Line 871 --- - tmp := nil; --- Around Line 874 - ValidationInterface := tmp; + tmp := Plugin; + tmp.ValidationInterface := nil; + Plugin := tmp; --- Around Line 883 --- - tmp: ISharpCenterPluginEdit; + tmp:TPlugin; --- Around Line 892 --- - tmp := nil; --- Around Line 895 - PreviewInterface := tmp; + tmp := Plugin; + tmp.PreviewInterface := nil; + Plugin := tmp; --- Around Line 904 --- - tmp: ISharpCenterPluginEdit; + tmp:TPlugin; --- Around Line 913 --- - tmp := nil; --- Around Line 916 - TabInterface := tmp; + tmp := Plugin; + tmp.TabInterface := nil; + Plugin := tmp; --- sharpe_svn\Common\Delph i Components\SharpEColorEdi torEx\SharpEColorEditorEx .pas Around Line 488 --- - inherited Items[AIndex] as TSharpEColorEditorExItem; + {inherited Items[AIndex] as TSharpEColorEditorExItem; } --- Components should now build. . ====Project Groups/Configuration-
Objects==== Stops, complaining about unable to find JvVCL5Utils replace with Utils It builds with the change. . ====Project Groups/Configuration-
Themes==== Project Groups/Configuration- Themes/ CursorList.dll sharpe_svn \Plugins\Configurations\T hemes\CursorList\uSetting sWnd.pas Around Line 185 --- - hCursor := LoadCursorFromFile(PAnsiC har(path)); + hCursor := LoadCursorFromFile(PChar( path)); --- Now all build. . ====Project Groups/Configuration-
Services==== All built . ====Project Groups/Configuration-
Modules==== All built . ====Project Groups/Configuration-
Components==== All built ====Conclusion==== That said, though it builds, its got a LOT of problems. The application bar (default bottom SharpBar) sucks up 90% of a cpu core. SharpCore dies on run (fatal access violation). SharpCenter is plagued with non-fatal access violations. Lots of other stuff 'isn't quite right'. Since its building, with errors, and running enough to debug, I'm posting this. --- Now, if only I could prompt the dev's to move to 2010. I'm just a C/C++ programmer taking my first steps into Delphi. I don't think I did bad for not being fluent. Now, the few caveats that have plagued the whole process... Starting in 2009, the default type for a Char is WideChar and String is WideString. A LOT of typecasting has forced strings and chars into Ansi in the development. These will need corrected. I've band-aided where I could to get things built, and it seems some aren't done correctly. I'll be reviewing my changes to see how to fix them. Also, one thing that affects a few files is a bug in Delphi that was fixed in 2009, which previously allowed setting read-only records. This was 'abused' in a few places, and had to be fixed to compile. [ Edited Wed May 05 2010, 03:49PM ] | ||
| Back to top | | ||
| Billi Berserker |
| ||
![]() Registered Member #1 Joined: Mon Dec 13 2004, 01:12AMPosts: 853 | Thanks a lot for your efforts! It is very good to see that they picked up development of the PNGComponents and that it's available again in a new version. I didn't knew this. To be honest, we haven't been following the latest Delphi Developments at all. The Problem with Delphi is that still no free/personal/express version is available. All we own is Delphi 2007 (which we got sponsored from CodeGear), so that is the only version we can use to officially compile the shell. Which version is used for writing Code doesn't matter (you could even use a not so official version of 2007...) since it's open source and in the end the source code matters - but for compiling a release we need a licensed version, and the only version we own is Delphi 2007. Since they made a lot of changes (WideString, etc.) converting the source to Delphi 2010 would break our ability to compile it with Delphi 2007. However I'm really thankful for your efforts, this post will help a lot if at one point we can get our hands on Delphi 2010 licenses or if there will be a personal/express version at any point. (or if they will sponsor us again). It would certainly be really great to use D2010, but as you found out already it would break a lot of things and make a lot of work necessary to convert (and most importantly test everything). I think that would be stuff that has to wait until after the 0.8 release. BB - -email- Lead developer (SharpBar, SharpDesk, SharpTheme, Skin System,) | ||
| Back to top |
| ||
| FWishbringer |
| ||
![]() Registered Member #2786 Joined: Wed Apr 07 2010, 01:26PMPosts: 20 | Since I'm an experienced guniea pig (titled in several games under QA, can list if you need), I'm willing to help experiment and work on getting the project fully 2010 compatible. Was working with brum74 last night, and helped get SharpCompile playing nicely. Feel free to get my attention on IRC. | ||
| Back to top | | ||
| pixol |
| ||
Beware the sloth![]() Registered Member #3 Joined: Wed Dec 15 2004, 10:41AMPosts: 759 | Excellent work... Now If only Embarcadero would sponsor us with some 2010 licenses... Yaaaaawwwwnnnnn.... Sloths rule! Pixol - pixol@sharpe-shell.org Lead developer of SharpCenter + configuration. | ||
| Back to top | | ||
| FWishbringer |
| ||
![]() Registered Member #2786 Joined: Wed Apr 07 2010, 01:26PMPosts: 20 | Working on making things (as of today's revision anyway) compatible both ways. I'm sitting here trying to figure out how to handle the PNG library now. The version I found is simply a wrapper around the built in library for 2010. As per where the built in library came from, I found this... wrote ... A while back, some folks noticed that the TPNGImage project was taken down from SourceForge and they wondered what happened. Well, I’ll tell you what happened — we here at CodeGear/Embarcadero acquired the code and it is now officially part of the VCL. As a result, the open source project that was created and run by Gustavo Daud no longer exists. Gustavo held the copyright on the code, and he released it as open source under a proprietary license. We purchased the code from Gustavo, and as a result, the project on SourceForge no longer exists (The license under which Gustavo orginally released the code didn’t require that it remain available under that license). We are very grateful to Gustavo for this — as it really enhances the capabilities of the VCL. First and probably most obviously, is that TImage now supports the PNG format. PNG is a lossless compression format that was designed to replace the GIF format. You can assign a PNG image to any TImage and display it on your form. But we took it farther than that. David Lock of our R&D team did some really nice work on TImageList, and as a result, it supports holding lists of images of any type that TImage itself supports That means that you get PNG support (and BMP, JPG, and GIF support as well) in your TImageLists, giving you a lot more flexibility in your user interfaces and in the images you can choose for buttons, tool bars, menus, etc. Delphi 2009 includes full source code for the TPNGImage and of course for its integration into the VCL proper. (Added) If you are currently using TPNGImage under the license from Gustavo, you can continue to do so. But please note that you aren’t authorized to post that code anywhere. And if you didn’t know, there is also a nice set of PNG images for your use in: C:\Program Files\Common Files\CodeGear Shared\Images\GlyFX\Icons \PNG Problem is, I don't think the wrapper is working 'as expected'. Side note, I've only has to use two 'if compilerversion' thus far getting sharpcompile built. I am hoping I can find a way to finish building it correctly without more. | ||
| Back to top | | ||
| Billi Berserker |
| ||
![]() Registered Member #1 Joined: Mon Dec 13 2004, 01:12AMPosts: 853 | This is interesting. It seems that we are talking about two different PNG Component projects. We are using the PNG Components which are Copyright (C) 2002-2005 by Martijn Saly (www.thany.org) It would be interesting to know how those 3 png packages are related. [ Edited Fri May 28 2010, 12:24AM ] BB - -email- Lead developer (SharpBar, SharpDesk, SharpTheme, Skin System,) | ||
| Back to top |
| ||
Powered by e107 Forum System
Or do own analyze?




![[ Visitor ]](../../e107_themes/captain/forum/rank0.gif)

