Showing posts with label FreePascal. Show all posts
Showing posts with label FreePascal. Show all posts

Thursday, July 16, 2015

Channel DOA ( death or alive )

Youtube channel checker. DOA ( death or alive ).

Puyeng juga ngechecking channel satu persatu.. wakakkakakakaka. Di buat proyek iseng dengan freepascal.
Hanya untuk orang yang nggak suka manual.

CONTOH URL:
https://www.youtube.com/channel/UC0PaT70xARmR2CssBubzHYA
https://www.youtube.com/channel/UCKY8ryGHsY3rDhlmhZyOn2A 


#note
- sizenya gedhe setelah di ektrak, karena untuk debugging gw
- private software, no support
- no help. Liat gambar

http://www.mediafire.com/download/eq9a34cr1aom4e9/Channel_DOA.zip

Friday, November 14, 2014

Compiling lazarus 1.3 ( trunk ) and FPC 2.7.1 ( trunk ) , Error and NOTE


Compiling and commit svn


Installing embarcardero x4 and tried to compiled lazarus 1.3 ( trunk ) and FPC 2.7.1. Its weird error, cannot compile bla bla bla....

Tried to executing this command 
make clean bigide 
and got error
Error makefile 14

After 8 hours pain and struggling with this bitch. Searching through google and found some of this:

http://www.cheatengine.org/forum/viewtopic.php?t=573992&postdays=0&postorder=asc&start=0&sid=1beeedd8204588714081d531bac2d919
http://forum.lazarus.freepascal.org/index.php?topic=18727.0
http://forum.lazarus.freepascal.org/index.php?topic=25526.0

http://forum.lazarus.freepascal.org/index.php?topic=16839.0
http://forum.lazarus.freepascal.org/index.php/topic,16898.msg92757.html#msg92757

http://wiki.freepascal.org/Installing_Lazarus

update and deleting svn, multiple times


http://mistikhati.wordpress.com/2014/03/06/compile-fpc-dan-lazarus-di-windows-xp-bag-3/
http://mistikhati.wordpress.com/2014/03/06/compile-fpc-dan-lazarus-di-windows-xp-bag-2/
http://mistikhati.wordpress.com/2014/03/06/compile-fpc-dan-lazarus-di-windows-xp-bag-1/


And yeah nothing worked -_- and then......
Finally, I found something that really the problem. Embarcardero x4 adding path to system environtment and the problem is: x4 have own make.exe . So make.exe from fpc conflict with make.exe from X4.

So I uninstalling embarcardero x4, add my path fpc to environtment and its work flawlessly.  I keep my mind to check first the make.exe using Print full path of an executable command in Windows first before doing same mistake.

 Proudly using Lazarus 1.3 r FPC 2.7.1 i386-win32-win32/win64
Proudly using Lazarus 1.3 r FPC 2.7.1 i386-win32-win32/win64

And now I can building my own FMD :D

fmd-0.8.5.22 unofficil build
 
#nb for myselft for updating svn
fpc_src
make clean all install INSTALL_PREFIX=C:\opt\fpc-2.7.1 PP=C:\opt\ppc386.exe DATA2INC=C:\opt\fpc-2.7.1\fpcsrc\utils\data2inc.exe
lazarus
make clean bigide

Sunday, November 9, 2014

Building your OWN FPC and Lazarus



I produced this a while ago. Its laz/fpc installation in general.
If you can follow, then after that probably anything goes.
No one has proof read it yet though, but that might happen now.  ;)

We will recompile Lazarus sources with FPC 2.7.1 and also
use FPC 2.7.1 to build all applications that Lazarus produces.

To smoothly get updated versions of Lazarus and FPC you should
have a SVN client installed. I use Tortoise.

[1] Get Tortoise: http://tortoisesvn.net/downloads.html
     Install with COMMANDLINE TOOLS option checked so
     Lazarus AboutBox will show the correct SVN number.

[2] You need the release version of fpc to build the development
    versions of fpc. For 64 bit versions of fpc, the is no official
    release. But Lazarus provides a such a 64 bit fpc version.

    Install latest official Lazarus version to c:\lazarus\release
    http://www.lazarus.freepascal.org/index.php?page=downloads
    Before you start Lazarus, edit the shortcut:
    c:\lazarus\release\startlazarus.exe --pcp=c:\lazarus\release\configdir
    That means the settings will be isolated from other Lazarus installations.

[3] Install the source for FPC 2.71 by doing a Tortoise SVN Checkout:
    http://svn.freepascal.org/svn/fpc/trunk
    I suggest 'c:\fpc\trunk' as source directory. Rightclick it in the
    explorer and do Checkout with Tortoise. Choose the head version.
    All FPC sources will be downloaded to this directory.

[4] Now build fpc 2.7.1 using the fpc 2.6.2 binaries from Lazarus.
    Start a commandprompt at c:\fpc\trunk and issue these commands:

    PATH=c:\lazarus\release\fpc\2.6.2\bin\x86_64-win64\
    SET FPC=c:\lazarus\release\fpc\2.6.2\bin\x86_64-win64\fpc.exe
    make all
    make install INSTALL_PREFIX=C:\fpc\2.7.1

    (INSTALL_PREFIX represents the TARGET path for the
     newly compiled version)

    Whatever you have in your system path doesnt matter since you
    set your own temporary path from the prompt. Later we'll change
    the system path permanently.

    Exit/Close this commandprompt after make has finished!
    Dont reuse it because the path will point to wrong fpc version.

    When make finishes you will have a new directory: C:\fpc\2.7.1
    with the fpc 2.7.1 binaries in it. Because Lazarus uses the
    source files from fpc, you need to put a copy of \packages and
    \rtl directories and their content in the c:\fpc\2.7.1 directory.

    (If you dont do that you cant update the trunk version without
    affecting the current 2.7.1 fpc installation. Because when you
    update the trunk you will get some new sourcefiles and they will of
    course not match the binaries of your old installation without
    a recompile. So just copy packages and rtl. This way you can update
    the trunk fpc and install other versions of fpc in new dirs following
    the steps above).

    Since this is a fresh install of fpc, you have no fpc.cfg.
    Copy c:\lazarus\release\fpc\2.6.2\bin\x86_64-win64\fpc.cfg to
    c:\fpc\2.7.1\bin\x86_64-win64 and edit the paths. Lines starting
    with # means they are commented out. Just leave such lines as they
    are.

    If a line looks like this:
    -Fuc:\lazarus\release\fpc\$FPCVERSION/units/$fpctarget

    You should change it to:
    -Fuc:\fpc\2.7.1\$FPCVERSION/units/$fpctarget
   
    We are actually done with fpc 2.6.2 for now!
    But dont delete the release version of Lazarus or the
    2.6.2 fpc that comes with it because you always need it
    to recompile new fpc versions with it. New SVN versions
    must always be compiled with the release version of fpc.
    Plus Lazarus release can use it.

    Now Add c:\fpc\2.7.1\bin\x86_64-win64 to your system PATH:
    * In Explorer, Rightclick Computer: choose Properties.
    * Choose Advanced system settings
    * Click the Environment Variables button
    * In System Variables Listbox, scroll down to the Path variable
    and doubleclick it. Add c:\fpc\2.7.1\bin\x86_64-win64; at the
    BEGINNING of the line, before everything else and dont forget the
    semicolon.

    Now REBOOT! Yes. Otherwise there can be a mismatch between release version
    of fpc and the freshly compiled fpc.

[5] Install the source for the Lazarus development version by doing a
    Tortoise SVN Checkout: http://svn.freepascal.org/svn/lazarus/trunk

[6] Build Lazarus. From a NEW commandprompt, go to c:\lazarus\LazSVN and run:
    make clean bigide

[7] Go to the desktop and make yourself a shortcut to start Lazarus from.
    Choose startlazarus.exe as programfile:
    c:\lazarus\lazSVN startlazarus.exe --pcp=c:\lazarus\lazSVN\configdir

    Configdir is automatically created when you start Lazarus.
    If you dont supply a -pcp (primary config path) Lazarus will create
    a directory under C:\Users\Elvis\AppData\Local\lazarus

    When you start Lazarus for the first time you must fill in file locations
    for fpc.exe, fpc sources, make.exe and gdb.exe so Lazarus knows what
    compiler etc to use.

[8] Optional: Install latest binw64 binaries to c:\fpc\binw64 by doing a
    Tortoise SVN Checkout:
    http://svn.freepascal.org/svn/fpcbuild/trunk/install/binw64/


To summarize this. You now have a fpc trunk directory
with the development sources. With Tortoise you can update
fpc as often as you like. When you do that you must
follow the steps under [4], except for the fpc.cfg.

Also Lazarus can be independently update with Tortoise, just get
new sources and do a 'make clean bigide'. You will have to
reinstall 3rd party components that you have added to the
component palette though.


here full
http://forum.lazarus.freepascal.org/index.php/topic,24045.msg144389.html#msg144389

Thursday, November 6, 2014

Note when BUILDING FMD


QUESTION:

@Nurcholif
hey there sir, thanks for wonderful unofficial build. But I'm getting error when tried to build with the source of fmd 0.8.3.13.

forms\frmMain.pas(586,33) Error: identifier idents no member "Glyph"

using:

    lazarus 1.0.12
    fpc 2.6.2
    win7

Thanks for your time.

ANSWER FROM NURCHOLIF
Are those from ExceptionLogger package?
My bad. I changed Tbutton on ExceptionForm to Tbitbtn.
You can change by yourself. Open ExceptionForm > select button > change class > TBitBtn
Or just mark comment those lines. It's not important. Just to added icon to those button.

RESULT: 
Thanks for your time @nurcholif
its worked like charm.


For those who may be get same problem.This is what I did:

    update to lazarus 1.2.4 ( in lazarus 1.0.12, you may need modified upacker.pas )

First:

    comment those line ( problem solve )

Second.
still not satisfied , I changing button class in package UExceptionForm.pas
Open ExceptionForm > select button > change class > TBitBtn

#NOTE
Worked like charm. :D
note

I dont know why but in all TVirtualStringTree have black colour.
if you have same problem like I did, just change the color to clwhite

sorry for english, its not my native language

Tuesday, November 4, 2014

UTF8 unicode long path HACK [WINDOWS]

function ShortFileName (const FileName: WideString): Widestring;
    var aTmp: WideString;
    begin
      SetLength(aTmp,255);
      if Windows.GetShortPathNameW (PWideChar (FileName), @aTmp[1], 254) = 0
      then
        Result:= FileName
      else
        Result:=aTmp;
    end;

HOW TO USE:

 
procedure TForm1.Button1Click(Sender: TObject);
var sn:String;
begin
 If OpenDialog1.Execute then
 begin
   sn:=ShortFileName(UTF8Decode(OpenDialog1.FileName));
   Caption:=sn;
   if FileExists(sn) then Memo1.Lines.LoadFromFile(sn);
 end;
end;
 
Or
 
hiddenImage.Picture.LoadFromFile(UTF8ToConsole(ShortFileName(UTF8Decode('C\imagefiles.jgp'))));

Saturday, November 1, 2014

Parsing xml for amazon product advertising using lazarus, freepascal



Through internet, I ended up using OMNIXML. though better library called oxml, but I've failed to make that working out.
  • http://stackoverflow.com/questions/5513917/delphi-xe-omnixml-using-selectnode
  • http://stackoverflow.com/questions/3594015/anyone-has-sample-code-to-load-an-xml-using-omnixml
  • http://forum.lazarus.freepascal.org/index.php?topic=9401.0

just selectpath like this

/ItemLookupResponse/Items/Item/ASIN

And Its worked


Friday, October 31, 2014

Helper for RAW STREAM and mimicking browser Lazarus, Freepascal ( Case: Login into GOOGLE )



 This where I learning using synapse and raw. ( note I dont have background on pascal or delphi )
  • http://forum.lazarus.freepascal.org/index.php?topic=12333.0
  • http://stackoverflow.com/questions/11471513/how-to-send-a-file-and-other-post-data-with-synapse
  • http://forum.lazarus.freepascal.org/index.php?topic=19685.0
  • http://stackoverflow.com/questions/8598401/delphi-synapse-how-to-check-the-size-of-the-response-with-ttcpblocksocket

http://stackoverflow.com/questions/23573799/amazon-mws-api-call-using-delphi-indy

As far I know, C# .net httpwebrequest is painfull when dealing with cookies. ( you can search in this blog, How hard to dealing with cookies ).

Then, just came to my mind we I dont move to socket programming. Its easier, RAW ( to be honest I just loved raw better than condom ) And just wrote what I need.

Basically I just ended up using synapse, Freepascal and lazarus for mimicking login into GOOGLE.

And Its weird, that I dont need using cookies to maintenance. Hey its just first step to RAW socket programming.


Tuesday, July 29, 2014

Can not find unit httpsend used by Unit1. Check if package laz_synapse is in the dependencies

Can not find unit httpsend used by Unit1. Check if package laz_synapse is in the dependencies.


if you have those message, just do this


open the menu "project\project inspector", press the add button, select the New requirement tab and select the synapse package in the package name combo box and press Create New Requirement