Autor Beitrag
ingo.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: So 06.02.05 18:08 
Hy,

ich hab mehrere kleine Programme geschrieben die aber eine recht große Dateigröße haben.
Verfügt jemand über einen guten Link wo verzeichnet ist, welche Uses welchen Befehlsumfang besitzt, sodas ich dann überflüssige entfernen kann?
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: So 06.02.05 18:10 
Wie wärs mit der DOH :gruebel:?

AXMD
I.MacLeod
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 109



BeitragVerfasst: So 06.02.05 19:08 
Ich würde ja sagen: Einfach die Unit entfernen, und wenns danach nicht mehr klappt wieder einfügen. Dummerweise wird das nicht viel bringen, da iirc ungenutzte Methoden usw. von Delphi sowieso nicht in die Exe übernommen werden. Wenn die entfernte Unit also keine initialization/finalization-Bereiche hatte die 25 Klassen und 10000 Zeilen Code nötig machen, wird dir wohl nur der Verzicht auf die VCL oder die Verwendung eines Exe-Packers übrig bleiben.

_________________
{$APPTYPE CONSOLE}uses SysUtils;const a='{$APPTYPE CONSOLE}uses SysUtils;const a=%s;begin write(Format(a,[#39+a+#39]))end.';begin write(Format(a,[#39+a+#39]))end.
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 06.02.05 19:21 
ingo. hat folgendes geschrieben:

Verfügt jemand über einen guten Link wo verzeichnet ist, welche Uses welchen Befehlsumfang besitzt, sodas ich dann überflüssige entfernen kann?

Icarus

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mo 07.02.05 11:24 
Da man mich hier verwiesen hat, probier ich's jetzt hier. :roll:

Löscht man einfach alle Units aus dem uses heraus, ohne die das Programm trotzdem läuft, wird es gerademal um 1KB kleiner. Ich vermute stark, dass dieses 1KB nur damit zu tun hat, dass ja jetzt im Code 1 Zeile weniger beim uses steht.

Also wie dann??

PS.: Bei den angegebenen Links blick ich nicht so ganz durch. :cry:

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Mo 07.02.05 12:10 
I.MacLeod hat folgendes geschrieben:
Wenn die entfernte Unit also keine initialization/finalization-Bereiche hatte die 25 Klassen und 10000 Zeilen Code nötig machen, wird dir wohl nur der Verzicht auf die VCL oder die Verwendung eines Exe-Packers übrig bleiben.

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mo 07.02.05 12:16 
Ich zitier' mich am besten wieder mal selber:

WeBsPaCe hat folgendes geschrieben:
PS.: Bei den angegebenen Links blick ich nicht so ganz durch.

Verzicht auf VCL kommt nicht in Frage. Und das mit den EXE-Packern raff' ich ja nicht. :roll:

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Mo 07.02.05 12:48 
Also, UPX: Lad upx.sourceforge.net/download/upx125w.zip runter. Leg die upx.exe der Einfachheit halber in dein EXE-Ausgabeverzeichnis (also da, wo nachher deine EXE drin ist). Dann machst n neues Batch-File mit dem Inhalt:

ausblenden Quelltext
1:
2:
3:
@echo off
echo Starte UPX...
upx -9 Project1.exe


und wenn du die EXE dann verteilen willst (wenn du also ne kleine EXE haben willst), führst einfach das Batch-File aus und gut is :)



MrSaint

EDIT:
falls du die upx.exe nich in das Verzeichnis legen willst, nimm folgende Batch-Datei und pass den Pfad eben an den an, in dem die upx.exe liegt:

ausblenden Quelltext
1:
2:
3:
4:
@echo off
PATH = %PATH%;D:\Tools\upx
echo Starte UPX...
upx -9 Project1.exe

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mo 07.02.05 12:58 
Gut. Dann sind die 351KB zu 146KB geworden.

Geht's nich noch kleiner?? :D

//EDIT: Wie geht denn das: www.delphi-forum.de/viewtopic.php?t=35945

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Mo 07.02.05 13:05 
WeBsPaCe hat folgendes geschrieben:
//EDIT: Wie geht denn das: www.delphi-forum.de/viewtopic.php?t=35945


Das is auch non-VCL:
bonanzas.rinet.ru/ hat folgendes geschrieben:
KOL - Key Objects Library is a set of objects to develop power (but small) 32 bit Windows GUI applications using Delphi but without VCL. It is distributed free of charge, with source code




MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
MitschL
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 211

Win 98 SE, Win 2000
D5 Pers, D6 Pers und D7 Pro
BeitragVerfasst: Mo 07.02.05 13:08 
Meine Vermutung,

direkte Benutzung der Windows API oder alles in ASM...

gegrüßt!

_________________
"Bloßes Ignorieren ist noch keine Toleranz." (Theodor Fontane)
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mo 07.02.05 13:09 
Ok. Sorry. :|

Danke für alle Antworten. Ich schau mir glaub ich das non-VCL doch mal an. ;)

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mo 07.02.05 15:58 
MitschL hat folgendes geschrieben:
Meine Vermutung,
direkte Benutzung der Windows API oder alles in ASM...

ganz so schlimm wars nicht, ich habe alles schön mit dem formulardesigner von Delphi gemacht und die fertigen KOL-Komponenten draufgeknallt (z.B. ein gradientpanel, wo man 2 farbwerte angibt und der farbverlauf dann berechnet wird - wesentlich platzschonender als ein Bitmap zu laden). das geht mit hilfe des MCK (mirror classes kit), welcher auch zu KOL gehört.
KOL is halt so was wie VCL, nur fast alles mit assembler und weit effizienter (maschinennäher) programmiert.

Wenn ich mir die üblichen "NON-VCL"-apps ansehe, wie von Luckie und Assarbad propagiert, wird mir fast schwindlig, da muss man ja jede systemmessage manuell abarbeiten. mit so nem krimskrams muss man sich mit KOL nicht auseinandersetzen, ausser man will spezielle funktionen einbauen.

Wenn man sich mit KOL ein bischen befasst kann man damit wahnsinns apps erstellen.
Die Einarbeitszeit liegt bei ca. 1 woche... man sollte halt gut die Docs auf der KOL-page studieren.

weitere infos und links zu KOL gibts auf meiner seite krazz.net/retnyg