Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Fragen zu Projekt


5 replies to this topic

knarz

knarz
  • Full Members
  • 11 posts

Posted 21 September 2007 - 20:41

Moin moin

erstmal muss ich sagen, GENIAL das ich das Forum gefunden hab.
und hoffe auch ein einiges an Hilfestellung zu erhalten rolleyes.gif

Folgendes:

Ich muss ein Projekt realisieren mit Folgendem Inhalt:

Splashscreen und dann soll rechts in der ecke der kleine initialisierungsbalken angezeigt werden.

Eine normale installation ohne extras (erstmla, ggf. dann noch logos rein, aber das würde ich dann vorher nochmal hier rechachieren)

SdRegisterUserEx mit CdKeyabfrage aus einer DLL funktion herraus. (habe 2 vorhandene funktionen würde das vorher noch weiter probieren)

INIdatei generierung. (skriptteil vorhanden)

Am ende soll als ein Feature verpack eine EXE mit Switches ausgeführt werden, während dieser Zeit soll dann eine Message à la "Anderes Programm wird Installiert ausgegeben"
_________

Das gut ist: Der CODE an sich ist da. nur ich bekomm den nicht angepasst da es eine version mit demo und convertierung war.

ich möchte meine probleme chronologisch beheben und das fängt beim splashscreen an.

habs zwar in den Splashscreen kram in den Supportfolder kopiert, aber da tut sich garnix. - im debug mode wird der pfad mal rot mal nicht und vor allem ist er sehr ich glaube ZU lang.

habs dann damit irgendwie probiert:

CODE

   string  InvitationSetup[255], svTempDir;
   string  szSerial;

und in splash
 
   LongPathToQuote( szName, TRUE );


bei

CODE
  Enable( BITMAPFADE );
wird der String im Debug rot.
CODE
 Pfad in etwa: %temp%\GUID\GUID\splash.bmp und da ne GUID sehr lang ist... naja


da ich es sehr übersichtlich haben möchte werde ich teile der skripts auslagern.

setup.rul
CODE

//===========================================================================
//
//  File Name:    Setup.rul
//
//  Description:  Blank setup main script file
//
//  Comments:     Blank setup is an empty setup project. If you want to
//      create a new project via. step-by step instructions use the
//      Project Assistant.
//
//===========================================================================

// Included header files ----------------------------------------------------
#include "ifx.h"
#include "splash.rul"

// ---- script function prototypes -----



//---------------------------------------------------------------------------                                                                        
// OnFirstUIBefore
//
// First Install UI Sequence - Before Move Data
//
// The OnFirstUIBefore event is called by OnShowUI when the setup is
// running in first install mode. By default this event displays UI allowing
// the end user to specify installation parameters.
//
// Note: This event will not be called automatically in a
// program...endprogram style setup.
//---------------------------------------------------------------------------
function OnFirstUIBefore()  

   number  nResult;
   number  nLevel;
   number  nvSize, nSetupType;
   number  nId;
   string  szTitle, szMsg;
   string  szOpt1, szOpt2, szLicenseFile;
   string  szName, szCompany;
   string  szTargetPath;
   string  svDir;
   string  szFeatures, szTargetdir;
   string  szId;  
   BOOL    bLicenseAccepted;  
   
   string  InvitationSetup[255], svTempDir;
   string  szSerial;
begin    
   SetupScreen();
   nSetupType = COMPLETE;
         
if ( ALLUSERS ) then
 TARGETDIR = PROGRAMFILES ^ IFX_COMPANY_NAME ^ IFX_PRODUCT_NAME;  
   else
 TARGETDIR = FOLDER_APPDATA ^ IFX_COMPANY_NAME ^ IFX_PRODUCT_NAME;
   endif;

// Customize the default TARGETDIR for multi-instance application.
// TODO: If you want something different customize the code below.
if( MAINT_OPTION = MAINT_OPTION_MULTI_INSTANCE  && MULTI_INSTANCE_COUNT > 0) then

 // Start with the current multi-instance count plus one.
 nId = MULTI_INSTANCE_COUNT + 1;

 // Find a unique TARGETDIR.
 while( ExistsDir( TARGETDIR ) = EXISTS )
 
  // Convert to string.
  NumToStr( szId, nId );
 
  // Update IFX_MULTI_INSTANCE_SUFFIX
  IFX_MULTI_INSTANCE_SUFFIX = "_" + szId;
 
  // Update TARGETDIR
  TARGETDIR = TARGETDIR + IFX_MULTI_INSTANCE_SUFFIX;
 
  // Update nId
  nId = nId + 1;

 endwhile;

endif;

   svDir = TARGETDIR;
   szName = "";
   szCompany = "";
   bLicenseAccepted = TRUE;

// Beginning of UI Sequence  

Dlg_Start:
   nResult = 0;  
 
Dlg_SdWelcome:
   szTitle = "";
   szMsg = "";
   //{{IS_SCRIPT_TAG(Dlg_SdWelcome)
   nResult = SdWelcome( szTitle, szMsg );
   //}}IS_SCRIPT_TAG(Dlg_SdWelcome)
   if (nResult = BACK) goto Dlg_Start;

Dlg_SdLicense2:
   szTitle = "";
   szOpt1 = "";
   szOpt2 = "";
   //{{IS_SCRIPT_TAG(License_File_Path)
   szLicenseFile = SUPPORTDIR ^ "license.txt";
   //}}IS_SCRIPT_TAG(License_File_Path)
   //{{IS_SCRIPT_TAG(Dlg_SdLicense2)
   nResult = SdLicense2( szTitle, szOpt1, szOpt2, szLicenseFile, bLicenseAccepted );
   //}}IS_SCRIPT_TAG(Dlg_SdLicense2)
   if (nResult = BACK) then
       goto Dlg_SdWelcome;
   else
       bLicenseAccepted = TRUE;
   endif;

Dlg_SdRegisterUserEx:
   szMsg = "";
   szTitle = "";
   //{{IS_SCRIPT_TAG(Dlg_SdRegisterUserEx)
   nResult = SdRegisterUserEx( szTitle, szMsg, szName, szCompany, szSerial );
   //}}IS_SCRIPT_TAG(Dlg_SdRegisterUserEx)
   if (nResult = BACK) goto Dlg_SdLicense2;

Dlg_SetupType2:  
   szTitle = "";
   szMsg = "";
   //{{IS_SCRIPT_TAG(Dlg_SetupType2)
   nResult = SetupType2( szTitle, szMsg, "", nSetupType, 0 );
   //}}IS_SCRIPT_TAG(Dlg_SetupType2)
   if (nResult = BACK) then
       goto Dlg_SdRegisterUserEx;
   else
       nSetupType = nResult;
       if (nSetupType != CUSTOM) then
           szTargetPath = TARGETDIR;
           nvSize = 0;
           FeatureCompareSizeRequired( MEDIA, szTargetPath, nvSize );
           if (nvSize != 0) then      
               MessageBox( szSdStr_NotEnoughSpace, WARNING );
               goto Dlg_SetupType2;
           endif;
       endif;  
   endif;

Dlg_SdAskDestPath2:
   if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType2;
szTitle = "";
   szMsg = "";
   if (nSetupType = CUSTOM) then
               //{{IS_SCRIPT_TAG(Dlg_SdAskDestPath2)
 nResult = SdAskDestPath2( szTitle, szMsg, svDir );
               //}}IS_SCRIPT_TAG(Dlg_SdAskDestPath2)
       TARGETDIR = svDir;
   endif;
   if (nResult = BACK) goto Dlg_SetupType2;

Dlg_SdFeatureTree:
   if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath2;
   szTitle = "";
   szMsg = "";
   szTargetdir = TARGETDIR;
   szFeatures = "";
   nLevel = 2;
   if (nSetupType = CUSTOM) then
       //{{IS_SCRIPT_TAG(Dlg_SdFeatureTree)
       nResult = SdFeatureTree( szTitle, szMsg, szTargetdir, szFeatures, nLevel );
       //}}IS_SCRIPT_TAG(Dlg_SdFeatureTree)
       if (nResult = BACK) goto Dlg_SdAskDestPath2;  
   endif;

Dlg_ObjDialogs:
   nResult = ShowObjWizardPages( nResult );
   if (nResult = BACK) goto Dlg_SdFeatureTree;
   
Dlg_SdStartCopy2:
   szTitle = "";
   szMsg = "";
   //{{IS_SCRIPT_TAG(Dlg_SdStartCopy2)
   nResult = SdStartCopy2( szTitle, szMsg );
   //}}IS_SCRIPT_TAG(Dlg_SdStartCopy2)
   if (nResult = BACK) goto Dlg_ObjDialogs;

   return 0;
end;


splash.rul
CODE

prototype SetupScreen();

function SetupScreen()
STRING szName;
begin
 LongPathToQuote( szName, TRUE );
   szName = SUPPORTDIR ^ "SPLASH.BMP";  
   Enable( BITMAPFADE );
SetDisplayEffect (EFF_FADE);  
PlaceBitmap("szName", 1, 10, 10, CENTERED );
Enable( BITMAPFADE );
  Delay( 1 );
end;


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 September 2007 - 21:38

Ich dachte eigentlich, das mit dem Splash wäre so das Standard-Verhalten. Ich habe aber schon länger nicht mehr mit DevStudio 9 und auch nicht mehr mit INstalLScript Projekten gearbeitet, deshalb kann ich mich auch täuschen. Aber der Splash-Screen kommt, bevor das Script gestartet wird, du musst also nichts im Skript machen. Die Datei muss aber eine BMP sein, und zwar RGB encoded. Mach sie mal mit Paint auf und speichere sie wieder. Und der Dateiname ist fest, du musst sie entsprechend der Doku benennen.

knarz

knarz
  • Full Members
  • 11 posts

Posted 21 September 2007 - 23:28

Das war wohl auch das Problem als ich die Datei von SPLASH.BMP mal eben in SETUP.BMP umbenannt habe, wurde sie auch sofort angezeigt ... (grrr)


Edited by knarz, 22 September 2007 - 00:41.


knarz

knarz
  • Full Members
  • 11 posts

Posted 22 September 2007 - 11:09

So hab jetzt die ganze nacht durch gemacht und bin auch recht weit gekommen... ich bekomm aber folgendes einfach nicht hin:

Targetdir als einen string zu verpacken der aber variabel bleibt:

CODE

function DONGLE_Installing()
   STRING szDir, szProgram, szCmdLine, szMsg;
   
begin
// szDir=TARGETDIR ^ "FCAD_BIN" ^ "mplayerc.exe";
// szProgram=LongPathToShortPath(szDir);
   szCmdLine="";
   szMsg="";
   Disable (BACKBUTTON);
   SdShowMsg ( @DONGLE_INFO , TRUE );
   if (LaunchAppAndWait (@DONGLE_FILE, szCmdLine, WAIT) < 0) then
    MessageBox (@DONGLE_FAIL, SEVERE);
   endif;    
   SdShowMsg ( @DONGLE_INFO , FALSE );
end;


ich habs mit LongPathToShortPath , LongPathToQuote probiert.
nix... bekomm's einfach nicht hin.

keyabfragde durch 3 dateien usw. hab ich alles hinbekommen.. aber das gerade nich..

http://forum.install...showtopic=16369
hat mir auch nicht geholfen

dass, das eine im kommentar ist, ist mir klar... aber sonst kann ich nicht kompilieren weils ja kein string ist...

Edited by knarz, 22 September 2007 - 11:27.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 September 2007 - 12:20

Was steht denn in @DONGLE_FILE ?
Welche Fehlermeldung /-nummer bekonnst du denn? Zur Laufzeit oder schon beim kompilieren? Probiers doch mal mit
szProgram = @DONGLE_FILE;
LaunchAppAndWait (szProgram, ...


knarz

knarz
  • Full Members
  • 11 posts

Posted 04 October 2007 - 22:49

danke für die hilfe, aber das thema hab ich selber in den griff bekommen. das problem war das ich beim Feature "installing" ausgewählt habe und nicht "installed" IS wollte was ausführen dabei war die datei noch nicht installiert/kopiert.

gibt aber neue kleinigkeiten:

problem: beim deinstallieren werden die dateien gelöscht aber nicht der root ordner und ein weitere ordner.

ebenfalls bekomm ich es nicht hin aus der registry einen wert auszulesen, dauernd der fehler:

C:\WORKPLACE\Projekt\script files\featureevents.rul(43) : error C8046: '1' : numeric variable required
C:\WORKPLACE\Projekt\script files\featureevents.rul(43) : error C8046: 'szNum' : numeric variable required

CODE
export prototype Setup_Uninstall();
function Setup_Uninstall()
STRING szDir, svValue, szNum;
   begin
   RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
   RegDBGetKeyValueEx ( "\\Software\\xx xx\\xx xx" , "Path" , REGDB_STRING , svValue , szNum );
      SetStatusWindow( 0, @SETUP_UNINSTALL);
       if (DeleteDir (TARGETDIR, ROOT) = 0) then
           MessageBox (TARGETDIR + " was deleted.", INFORMATION);
       else
           MessageBox ("Unable to delete directory.", SEVERE);
       endif;        
end;


auch wenn ich szNum in der funktion als NUMBER deklariere bringt es nichts


kleinigkeit wäre noch, das ich bei der deinstallation als statusmessage nur sehen "Deinstallation", nicht jede einzelen datei die deinstalliert wird.... (am besten wäre einfach Order löschen, denn da sind ca. 3000 kleine dateien drin)

ebenfalls soll eigentlich nur die Option zum entfernen (mit kleinem hinweis das der gesamte ordner, egal mit welchem inhalt) angeboten werden, nicht Repair oder modify.

CODE

szKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + PRODUCT_GUID;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);

RegDBSetKeyValueEx(szKey,"NoModify",REGDB_NUMBER, "1" , 1);
RegDBSetKeyValueEx(szKey,"NoRepair",REGDB_NUMBER, "1" , 1);


funktionieren nicht, wird weiterhin angeboten bei der deinstallation.