FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   -+- COMPLETE - Inno Setup Script -+- (https://fileforums.com/showthread.php?t=96170)

Dante1995 10-10-2014 06:10

freearc no compatible sorry..

try this I do not know :(


C:\Games:
Code:

DefaultDirName={sd}\Game\FolderGamesName

Compiler 10-10-2014 10:12

But you can use Isdone as well.

Code:

if not ISExec ( 0, 0, 0, ExpandConstant('{tmp}\yourfile.exe'), ExpandConstant('x -o+ "{src}\data.bin" "{app}\"'), ExpandConstant('{tmp}'), '...',false) then break;
You can edit parameters under ExpandConstant

Dante1995 10-10-2014 11:12

I'm not sure that it works, but try you never know :)

Dante1995 10-10-2014 15:10

Arc test
 
EXAMPLE

//TestArcCompression = Copyright © by InnoUltra.ru :)

Dante1995 15-10-2014 03:48

Multi Unpacked
 
Delphi Multi Unpacked

PreSupport Precomp ecc...
Support Arc,Srep,7-zip ecc... and FreeArc.bin,FreeArc.cab extension

You have to update the files in the folder Bins for your needs :)

ChronoCross 15-10-2014 06:23

1 Attachment(s)
Quote:

Originally Posted by Dante1995 (Post 434970)
Delphi Multi Unpacked

Unpacked Arc,Srep,Rar,7-zip,zip ecc..

hello Dante the application open very well and the path selection and save folder too, but the extraction not work, only i have void folders.

I use this Attachment 10197 and work fine, for srep and precomp.

maybe can you try this files.

Im working in GUI application too for extraction in VS

Dante1995 15-10-2014 07:18

Quote:

Originally Posted by ChronoCross (Post 434976)
hello Dante the application open very well and the path selection and save folder too, but the extraction not work, only i have void folders.

I use this Attachment 10197 and work fine, for srep and precomp.

maybe can you try this files.

Im working in GUI application too for extraction in VS


your files are not equal to my MU, if you are using different compression from my arc.ini, the program will extract only the folders or anything-

you can not create a universal program, the maximum you can create a program that compresses and decompresses only specified methods in those methods :)

one creates its algorithmic methods and sets my MU, so you always have the decompressor ready to use, with regard arc, rar, zip, instead it is universal

Tested
Code:

-ep-- -r -lc- -mt1 -mrep:263mb+srep+exe+delta+lzma:150mb:normal:bt4:128
File:

ChronoCross 15-10-2014 08:26

2 Attachment(s)
Quote:

Originally Posted by Dante1995 (Post 434979)
your files are not equal to my MU, if you are using different compression from my arc.ini, the program will extract only the folders or anything-

you can not create a universal program, the maximum you can create a program that compresses and decompresses only specified methods in those methods :)

one creates its algorithmic methods and sets my MU, so you always have the decompressor ready to use, with regard arc, rar, zip, instead it is universal

Tested
Code:

-ep-- -r -lc- -mt1 -mrep:263mb+srep+exe+delta+lzma:150mb:normal:bt4:128
File:

if you use 1
Code:

-mrep:263mb+srep+exe+delta+lzma:150mb:normal:bt4:128
Data1.bin 37.426 bytes

if you use 2
Code:

-msrep+exe2+delta+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
data2.bin 36.566 bytes

2 is better Why? because "rep" generate a entropy thats srep lzma can't compress and generate double compression.(innecesary)

Bulat says
rep= use files less 1GB
Srep= Use files more 1GB

Attachment 10201

PD: maybe i have the wrong MU application?
Attachment 10200

felice2011 15-10-2014 08:30

Quote:

Originally Posted by Dante1995 (Post 434979)
your files are not equal to my MU, if you are using different compression from my arc.ini, the program will extract only the folders or anything-

you can not create a universal program, the maximum you can create a program that compresses and decompresses only specified methods in those methods :)

one creates its algorithmic methods and sets my MU, so you always have the decompressor ready to use, with regard arc, rar, zip, instead it is universal

Tested
Code:

-ep-- -r -lc- -mt1 -mrep:263mb+srep+exe+delta+lzma:150mb:normal:bt4:128
File:

I have almost stolen the idea...:D:D:D:D

I was working myself to one thing.:rolleyes:

Cazzo mi freghi le iddeee...:p:p:p:p

Dante1995 15-10-2014 08:48

and the boys, this is a program done in 10 minutes and try a few things, then on pc dating is limited, no implementation to a relase from the first page .. :rolleyes:
ChronoCross me method this is an example, not a recommendation :)


then why use Visual Studio (VisualBasic, Visual C++), if you do not know Delphi code, use Inno Setup code:
example found in InnoUltra InnoSetup 5\Script


Quote:

SHFileOperation.iss x Compressor
Code:

;***************************************************************;
;****************** SHFileOperation.iss ************************;
;***************************************************************;
;* Include this file in project. Example:
;* #include "SHFileOperation.iss"
;***************************************************************;
;************************ 1 ************************************;
;* function CopyDir(const fromDir, toDir: string): Boolean;
;* Example 1 (without <fromDir> trailing backslash):
;*    CopyDir('C:\TMP\MyApp', 'C:\TMP\Backup');
;* Result: C:\TMP\Backup\MyApp\..all <MyApp> subdirs and files
;* Example 2 (with <fromDir> trailing backslash):
;*    CopyDir('C:\TMP\MyApp\', 'C:\TMP\Backup');
;* Result: C:\TMP\Backup\..all <MyApp> subdirs and files
;***************************************************************;
;************************ 2 ************************************;
;* function MoveDir(const fromDir, toDir: string): Boolean;
;* Example 1 (without <fromDir> trailing backslash):
;*    MoveDir('C:\TMP\MyApp', 'C:\TMP\Backup');
;* Result: C:\TMP\Backup\MyApp\..all <MyApp> subdirs and files
;* Example 2 (with <fromDir> trailing backslash):
;*    MoveDir('C:\TMP\MyApp\', 'C:\TMP\Backup');
;* Result: C:\TMP\Backup\..all <MyApp> subdirs and files
;***************************************************************;
;************************ 3 ************************************;
;* function DelDir(dir: string; toRecycle: Boolean): Boolean;
;*  If <toRecycle> is True, <dir> deleted in Recycle Bin.
;***************************************************************;
;************************ 4 ************************************;
;* function RenameDir(const fromDir, toDir: string): Boolean;
;***************************************************************;
;***************************************************************;
;***************************************************************;

[_Code]
type
  TSHFileOpStruct =  record
    Wnd: HWND;
    wFunc: UINT;
    pFrom: PANSICHAR;
    pTo: PANSICHAR;
    fFlags: Word; // FILEOP_FLAGS;
    fAnyOperationsAborted: BOOL;
    hNameMappings: HWND; // Pointer;
    lpszProgressTitle: PANSICHAR; { only used if FOF_SIMPLEPROGRESS }
  end;

const
// use in wFunc
  { $EXTERNALSYM FO_MOVE }
  FO_MOVE          = $0001;
  { $EXTERNALSYM FO_COPY }
  FO_COPY          = $0002;
  { $EXTERNALSYM FO_DELETE }
  FO_DELETE        = $0003;
  { $EXTERNALSYM FO_RENAME }
  FO_RENAME        = $0004;
// use in fFlags
  { $EXTERNALSYM FOF_MULTIDESTFILES }
  FOF_MULTIDESTFILES        = $0001;
  { $EXTERNALSYM FOF_CONFIRMMOUSE }
  FOF_CONFIRMMOUSE          = $0002;
  { $EXTERNALSYM FOF_SILENT }
  FOF_SILENT                = $0004;  { don't create progress/report }
  { $EXTERNALSYM FOF_RENAMEONCOLLISION }
  FOF_RENAMEONCOLLISION      = $0008;
  { $EXTERNALSYM FOF_NOCONFIRMATION }
  FOF_NOCONFIRMATION        = $0010;  { Don't prompt the user. }
  { $EXTERNALSYM FOF_WANTMAPPINGHANDLE }
  FOF_WANTMAPPINGHANDLE      = $0020;  { Fill in
SHFILEOPSTRUCT.hNameMappings
                                          Must be freed using
SHFreeNameMappings }
  { $EXTERNALSYM FOF_ALLOWUNDO }
  FOF_ALLOWUNDO              = $0040;
  { $EXTERNALSYM FOF_FILESONLY }
  FOF_FILESONLY              = $0080;  { on *.*, do only files }
  { $EXTERNALSYM FOF_SIMPLEPROGRESS }
  FOF_SIMPLEPROGRESS        = $0100;  { means don't show names of files }
  { $EXTERNALSYM FOF_NOCONFIRMMKDIR }
  FOF_NOCONFIRMMKDIR        = $0200;  { don't confirm making any
needed dirs }
  { $EXTERNALSYM FOF_NOERRORUI }
  FOF_NOERRORUI              = $0400;  { don't put up error UI }


function SHFileOperation(const lpFileOp: TSHFileOpStruct):Integer;
external '[email protected] stdcall';

{****************************************************************}
{****************************************************************}
{****************************************************************}

function BackupDir(const fromDir, toDir: string; IsMove: Boolean): Boolean;
var
  fos: TSHFileOpStruct;
  _fromDir, _toDir: string;
  SR: TFindRec;
  res: Boolean;
begin
    ForceDirectories(toDir);
  if IsMove then
    fos.wFunc  := FO_MOVE else
    fos.wFunc  := FO_COPY;
    fos.fFlags := FOF_FILESONLY or FOF_SILENT or
              FOF_NOCONFIRMATION or FOF_NOCONFIRMMKDIR;
    _fromDir:= AddBackslash(fromDir);
    _toDir  := AddBackslash(toDir);
  if (Length(fromDir) = Length(_fromDir)) then
    begin
        res:= FindFirst(_fromDir + '*', SR);
      try
        while res do
        begin
          if (SR.Name <> '') and (SR.Name <> '.') and (SR.Name <> '..') then
          begin
            if SR.Attributes = FILE_ATTRIBUTE_DIRECTORY then
              begin
                _fromDir:= _fromDir + SR.Name + #0#0;
                _toDir  := _toDir + #0#0;
                fos.pFrom  := PANSICHAR(_fromDir);
                fos.pTo    := PANSICHAR(_toDir);
              end else
              begin
                _fromDir:= _fromDir + SR.Name + #0#0;
                _toDir  := _toDir  + SR.Name + #0#0;
                fos.pFrom  := PANSICHAR(_fromDir);
                fos.pTo    := PANSICHAR(_toDir);
              end;
                Result := (0 = ShFileOperation(fos));
                _fromDir:= ExtractFilePath(_fromDir);
                _toDir:= ExtractFilePath(_toDir);
          end;
          res := FindNext(SR);
        end;
      finally
        FindClose(SR);
      end;
    end else
    begin
      _fromDir:= RemoveBackslashUnlessRoot(_fromDir) + #0#0;
      _toDir  := RemoveBackslashUnlessRoot(_toDir)  + #0#0;
      fos.pFrom  := PANSICHAR(_fromDir);
      fos.pTo    := PANSICHAR(_toDir);
      Result := (0 = ShFileOperation(fos));
    end;
end;

{****************************************************************}
function MoveDir(const fromDir, toDir: string): Boolean;
begin
  Result := BackupDir(fromDir, toDir, True);
end;

{****************************************************************}
function CopyDir(const fromDir, toDir: string): Boolean;
begin
  Result := BackupDir(fromDir, toDir, False);
end;

{****************************************************************}
function DelDir(dir: string; toRecycle: Boolean): Boolean;
var
  fos: TSHFileOpStruct;
  _dir: string;
begin
    _dir:= RemoveBackslashUnlessRoot(dir) + #0#0;
    fos.wFunc  := FO_DELETE;
    fos.fFlags := FOF_SILENT or FOF_NOCONFIRMATION;
  if toRecycle then
    fos.fFlags := fos.fFlags or FOF_ALLOWUNDO;
    fos.pFrom  := PANSICHAR(_dir);
  Result := (0 = ShFileOperation(fos));
end;

{****************************************************************}
function RenameDir(const fromDir, toDir: string): Boolean;
var
  fos: TSHFileOpStruct;
  _fromDir, _toDir: string;
begin
    _fromDir:= RemoveBackslashUnlessRoot(fromDir) + #0#0;
    _toDir  := RemoveBackslashUnlessRoot(toDir) + #0#0;
    fos.wFunc  := FO_RENAME;
    fos.fFlags := FOF_FILESONLY or FOF_ALLOWUNDO or
              FOF_SILENT or FOF_NOCONFIRMATION;
    fos.pFrom  := PANSICHAR(_fromDir);
    fos.pTo    := PANSICHAR(_toDir);
  Result := (0 = ShFileOperation(fos));
end;

{****************************************************************}
function FilesMaskOperation(const fromDir, toDir, fileMask: string; FileOp: Integer; EmptyDirRemove: Boolean; toRecycle: Boolean): Boolean;
var
  fos: TSHFileOpStruct;
  _fromDir, _toDir: string;
  FSR, DSR: TFindRec;
  FindResult: Boolean;
  APath: string;
begin
  APath := AddBackslash(fromDir);
  FindResult := FindFirst(APath + fileMask, FSR);
  try
    while FindResult do
    begin
      if FSR.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then
        begin
          Case FileOp of
            FO_COPY:
              begin
                fos.wFunc  := FO_COPY;
              end;
            FO_MOVE:
              begin
                fos.wFunc  := FO_MOVE;
              end;
            FO_DELETE:
              begin
                fos.wFunc  := FO_DELETE;
                if toRecycle then fos.fFlags := fos.fFlags or FOF_ALLOWUNDO;
              end;
            FO_RENAME:
              begin
                fos.wFunc  := FO_RENAME;
              end;
          else
            ;
          end;
            fos.fFlags := fos.fFlags or FOF_FILESONLY or FOF_SILENT or
                  FOF_NOCONFIRMATION or FOF_NOCONFIRMMKDIR;
            _fromDir:= APath + FSR.Name + #0#0;
            _toDir:= AddBackslash(toDir) + FSR.Name + #0#0;
            ForceDirectories(ExtractFilePath(_toDir));
            fos.pFrom  := PANSICHAR(_fromDir);
            fos.pTo    := PANSICHAR(_toDir);
            Result := (0 = ShFileOperation(fos));
        end;
      FindResult := FindNext(FSR);
    end;
    FindResult := FindFirst(APath + '*.*', DSR);
    while FindResult do
    begin
      if ((DSR.Attributes and FILE_ATTRIBUTE_DIRECTORY) = FILE_ATTRIBUTE_DIRECTORY) and
        not ((DSR.Name = '.') or (DSR.Name = '..')) then
{Recursion} FilesMaskOperation(APath + DSR.Name, AddBackslash(toDir) + DSR.Name, fileMask, FileOp, EmptyDirRemove, toRecycle);
      FindResult := FindNext(DSR);
    end;
  finally
    FindClose(FSR);
    FindClose(DSR);
    if EmptyDirRemove then RemoveDir(APath);
  end;
end;

function CopyFiles(const fromDir, toDir, fileMask: string): Boolean;
begin
  Result := FilesMaskOperation(fromDir, toDir, fileMask,
        FO_COPY, False, False);
end;

function MoveFiles(const fromDir, toDir, fileMask: string): Boolean;
begin
  Result := FilesMaskOperation(fromDir, toDir, fileMask,
        FO_MOVE, True, False);
end;

function DelFiles(const fromDir, fileMask: string; toRecycle: Boolean ): Boolean;
begin
  Result := FilesMaskOperation(fromDir, '', fileMask,
        FO_DELETE, True, toRecycle);
end;


Dante1995 21-10-2014 16:14

Angry Birds Collection NSIS - IS
 
Update today

Dante1995 24-10-2014 09:40

C.I.U v1.0.0.6 by yener .iss
 
2 Attachment(s)
correct the color of transparency, changing from white to black

ChronoCross 25-10-2014 23:48

hello Dante1995.

Is possible make a menu setup with videos Like a DVD?
I try to make a menu setup like Assasin creed in unity but i think is wated time.
I try to make setup menu videos in after effects and exported in xvid.
But Idon't know how to add the correct buttons.
thanks

Dante1995 26-10-2014 03:58

Yours is a question without reference to something I do not understand what you want to do

Dante1995 26-10-2014 04:51

C.I.U SmallInstaller PSD
 
C.I.U SmallInstaller Phtoshop psd

Souvik Giri 26-10-2014 06:14

Dante1995, can u give a PRECOMP+SREP+IZMA compressor?

Dante1995 26-10-2014 07:09

Quote:

Originally Posted by Souvik Giri (Post 435446)
Dante1995, can u give a PRECOMP+SREP+IZMA compressor?

ok

Dante1995 26-10-2014 07:14

Mini Installer
 
Spend Time :)

Dante1995 26-10-2014 22:41

ISEE 2 in 1
 
Ansi + Unicode + dll pack ver 121216

Dante1995 27-10-2014 14:24

ShellExec (guide)
 
Tutorial..

read requests on the forum from time to time agree with the solution to the problem :)

minh_k43sj 28-10-2014 06:47

I use compress with Dante was upload at post #57

Error when test compresss with a folder, not see output Data.bin when compress finish

http://i.imgur.com/RvcYUed.jpg

Dante1995 28-10-2014 07:17

close background programs (antivirus,mail,java,fb,chrome ecc. )
limit memory -ld
example -ld200m

Adonix 31-10-2014 20:53

1 Attachment(s)
Quote:

Originally Posted by Dante1995 (Post 434320)
Simple Installer ISDone

compiling error..

Dante1995 01-11-2014 22:10

Use Inno EE (u)

Adonix 01-11-2014 22:32

Quote:

Originally Posted by dante1995 (Post 435620)

done :d

ChronoCross 02-11-2014 08:51

Quote:

Originally Posted by Dante1995 (Post 435449)
Spend Time :)

Hello Dante1995, there is any way to add below in the progress bar status

information about the how many KB remaining to complete the installation.


example:

||||||||||83%|||||........

12546/90000 KB


or mB

thanks advance

Dante1995 02-11-2014 10:26

Quote:

Originally Posted by ChronoCross (Post 435634)
Hello Dante1995, there is any way to add below in the progress bar status

information about the how many KB remaining to complete the installation.


example:

||||||||||83%|||||........

12546/90000 KB


or mB

thanks advance

read the code of Bulat, it seems to me that he has already created the sequences

Adonix 03-11-2014 20:44

Quote:

Originally Posted by Dante1995 (Post 434320)
Simple Installer ISDone

in output folder there is "data1.arc" what is it for ? should i delete it or it's important file ?

in main_2.iss file what we have to change for different games each time ?

do i have to change the marked things in images each time ??
http://i.imgur.com/XKh8HvR.jpg
http://i.imgur.com/k5sGf9Q.jpg

If i have the different output name like audio-1.bin file then where to make changes in main_2.iss script, please tell all places which we have to change.

if i have only 1 .bin file then do we have to change anything in script ? or if we have 2 or more bin files ??

Dante1995 03-11-2014 22:43

Quote:

Originally Posted by Adonix (Post 435680)
in output folder there is "data1.arc" what is it for ? should i delete it or it's important file ?

in main_2.iss file what we have to change for different games each time ?

do i have to change the marked things in images each time ??
http://i.imgur.com/XKh8HvR.jpg
http://i.imgur.com/k5sGf9Q.jpg

If i have the different output name like audio-1.bin file then where to make changes in main_2.iss script, please tell all places which we have to change.

if i have only 1 .bin file then do we have to change anything in script ? or if we have 2 or more bin files ??

=-=-=-==-=-=-==-=-=-==-=-=-==-=-=-==-=-=-==-=-=-==-=-=-==-=-=-=
Components:

Code:

#Define DirectX          'True'
#Define VisualC          'True'
#Define Physx            'True'
#Define Frameworks    'True'

True = Active
False = Disable



the progress bar must always be 100% same as the final value, otherwise the process will end before reaching this value
Default is set to unpack a single file
to use multiple repositories (data.extension) must make a division
if we set 100% on (2) archives progress unpacked the archive (1) 100% and then continue with the store 2 came to 200%, and is not to arrive at this value.
then you'll have to set as follows.

Archives:
data1.arc 100% = 1 archive

2 Archives
Code:

data1.arc 50%
data2.arc 50%

3 Archives
Code:

data1.arc 33%
data2.arc 33%
data3.arc 34%

4 Archives
Code:

data1.arc 25%
data2.arc 25%
data3.arc 25%
data4.arc 25%

5 Archives
Code:

data1.arc 20%
data2.arc 20%
data3.arc 20%
data4.arc 20%
data5.arc 20%

Respect the name and extension, it is important that it is (data1, data2, data3) with extension (arc, bin or cab), you can also save with a different extension and give a name to your liking.

example name and extension custom:
data1.game or game.data

final example x 2 Archives:
Code:

#define bin1perc 50
#define bin2perc 50

#define bin1 "data1.game"
#define bin2 "data2.game"


Adonix 03-11-2014 23:04

Quote:

Originally Posted by Dante1995 (Post 435681)
=-=-=-==-=-=-==-=-=-==-=-=-==-=-=-==-=-=-==-=-=-==-=-=-==-=-=-=
Components:

Code:

#Define DirectX          'True'
#Define VisualC          'True'
#Define Physx            'True'
#Define Frameworks    'True'

True = Active
False = Disable



the progress bar must always be 100% same as the final value, otherwise the process will end before reaching this value he store 2 came to 200%, and is not to arrive at this value.
then you'll have to set as follows.
.
.
.
.
.
.
.
.

#define bin1 "data1.game"
#define bin2 "data2.game"[/CODE]

Thanks......But :(

i tested this installer :- http://fileforums.com/showpost.php?p...0&postcount=22

everything was going good but reaching at 25-30% it showed error "precomp.exe has stopped working".
i tested other small file size also but again at 5% it showed precomp problem
please help me. i am using precomp version 0.42 and below compression script to make .bin files.
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''
arc a -lc8 -ep1 -ed -r -w.\ Data\Data-1.bin -mprecomp+srep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''
Please help to fix the error.

Dante1995 04-11-2014 09:49

BBoxScript
 
1 Attachment(s)
:D BBoxScript :D is test
working 100%
lang english

Andrey167 04-11-2014 10:35

Quote:

Originally Posted by Dante1995 (Post 435691)
:D BBoxScript :D

Great Work Bro, do not tell how to add the components page here?

Dante1995 04-11-2014 13:31

Quote:

Adonix
please do not post again in my topic .. this is spam
:mad:

Adonix 04-11-2014 18:13

Quote:

Originally Posted by Dante1995 (Post 435702)
please do not post again in my topic .. this is spam
:mad:

sorry man i got exited too much.

minh_k43sj 04-11-2014 20:00

Quote:

Originally Posted by Dante1995 (Post 435691)
:D BBoxScript :D is test
working 100%
lang english

great :)
you can add music background to scrip ? :)

Dante1995 05-11-2014 00:47

Quote:

Originally Posted by minh_k43sj (Post 435705)
great :)
you can add music background to scrip ? :)

Code:

[Files]
Source: File\Bass.dll; DestDir: {tmp}; Flags: dontcopy deleteafterinstall noencryption nocompression
Source: File\music.mp3; DestDir: {tmp}; Flags: dontcopy deleteafterinstall noencryption nocompression

[ Code]
type
HSTREAM = DWORD;

function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean;
external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset: DWORD; length: DWORD; flags: DWORD): HSTREAM;
external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start(): Boolean;
external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_Pause(): Boolean;
external 'BASS_Pause@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean;
external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_Stop(): Boolean;
external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free(): Boolean;
external 'BASS_Free@files:BASS.dll stdcall delayload';


const
BASS_SAMPLE_LOOP = 4;

var
MusicButton: TButton;
Name: string;
i : Integer;

procedure MusicButtonOnClick(Sender: TObject);
begin
if MusicButton.Caption = 'Music On' then
begin
MusicButton.Caption := 'Music Off';
BASS_Pause;
end else
begin                                               
MusicButton.Caption := 'Music On';
BASS_Start;
end;
end;

procedure InitializeWizard();
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('music.mp3');
if BASS_Init(-1, 44100, 0, 0, 0) then
begin
BASS_Start;
Name:=ExpandConstant('{tmp}\music.mp3');
i:=BASS_StreamCreateFile(FALSE, PAnsiChar(Name), 0, 0, 4);
if i <> 0 then
begin
BASS_ChannelPlay(i, True);
end;

MusicButton := TNewButton.Create(WizardForm);
MusicButton.Parent := WizardForm;
MusicButton.SetBounds(4,337,131,20);
MusicButton.Caption := 'Music On';
MusicButton.OnClick:=@MusicButtonOnClick;
end;
end;

procedure DeinitializeSetup();
begin
BASS_Stop;
BASS_Free;
end;


minh_k43sj 05-11-2014 04:30

Quote:

Originally Posted by Dante1995 (Post 435691)
:D BBoxScript :D is test
working 100%
lang english

How to add skin.cjstyles to scrip, please help me :)

punchao 05-11-2014 04:39

Bro,where I put data1.bin, before compiling?

Dante1995 05-11-2014 18:54

Quote:

Originally Posted by minh_k43sj (Post 435711)
How to add skin.cjstyles to scrip, please help me :)

Simply enter the code under the following headings in blue and if there is no paste all the code

ex: only
Code:

UnloadSkin;
or
all
Code:

procedure DeinitializeUninstall;
begin
UnloadSkin;
end;



Simply enter the isSkin.dll files and Tiger.cjstyles in the folder style

#define SkinDll "isSkin.dll"
#define StyleName "Tiger.cjstyles"

[Setup]

[Files]
Source: "style\{#SkinDll}"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;
Source: "style\{#StyleName}"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;

[ Code]
procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar); external 'LoadSkin@{tmp}\{#SkinDll} stdcall delayload';
procedure UnloadSkin; external 'UnloadSkin@{tmp}\{#SkinDll} stdcall delayload';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external '[email protected] stdcall';

function InitializeSetup: Boolean;
begin

ExtractTemporaryFile('{#SkinDll}');
ExtractTemporaryFile('{#StyleName}');
LoadSkin(ExpandConstant('{tmp}\{#StyleName}'), '');

Result:=True;
end;

procedure DeinitializeSetup;
begin

ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}') ), 0);
UnloadSkin;
end;

function InitializeUninstall: Boolean;
begin

FileCopy(ExpandConstant('{app}\{#SkinDll}'), ExpandConstant('{tmp}\{#SkinDll}'), False);
FileCopy(ExpandConstant('{app}\{#StyleName}'), ExpandConstant('{tmp}\{#StyleName}'), False);
LoadSkin(ExpandConstant('{tmp}\{#StyleName}'), '');
Result:=True;
end;

procedure DeinitializeUninstall;
begin

UnloadSkin;
end;

Souvik Giri 06-11-2014 17:25

Another request. Please, give metro.cjstyles.


All times are GMT -7. The time now is 23:18.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com