Przeglądaj źródła

Make it easier to get started with debugging by outputting to a separate Bin dir and having a batch file to prepare it. If you already work with IS please run this batch file and also open it to see which files you should delete from your Projects dir to further clean it. Does not automatically copy ISCrypt.dll.

Martijn Laan 1 rok temu
rodzic
commit
1f682b82d1

+ 3 - 5
Projects/.gitignore

@@ -1,7 +1,5 @@
-*.dcu
-*.dll
+*.dsk
 *.dproj.local
-*.exe
+*.groupproj.local
 *.identcache
-buildtag.inc
-setup-*.bin
+*.tvsconfig

+ 4 - 0
Projects/Bin/.gitignore

@@ -0,0 +1,4 @@
+*.dcu
+*.dll
+*.exe
+setup-*.bin

+ 6 - 6
Projects/Debug.iss → Projects/Bin/Debug.iss

@@ -9,19 +9,19 @@ AppName=ɯɐɹƃoɹd ʎɯ
 AppVerName=My Program version 1.5
 DefaultDirName={autopf}\My Program
 UseSetupLdr=0
-OutputDir=..\Projects
+OutputDir=.
 AppVersion=1.2.3        
-OutputBaseFilename=setup
+OutputBaseFilename=Setup
 PrivilegesRequired=lowest
 
 [Languages]
 Name: en; MessagesFile: "compiler:Default.isl"
-Name: nl; MessagesFile: "..\Files\Languages\Dutch.isl"
+Name: nl; MessagesFile: "..\..\Files\Languages\Dutch.isl"
 
 [Files]
-Source: "..\Examples\MyProg.exe"; DestDir: "{app}"
-Source: "..\Examples\MyProg.chm"; DestDir: "{app}"
-Source: "..\Examples\Readme.txt"; DestDir: "{app}"; Flags: isreadme
+Source: "..\..\Examples\MyProg.exe"; DestDir: "{app}"
+Source: "..\..\Examples\MyProg.chm"; DestDir: "{app}"
+Source: "..\..\Examples\Readme.txt"; DestDir: "{app}"; Flags: isreadme
 
 [Code]
 function InitializeSetup: Boolean;

+ 0 - 0
Projects/Debug2.iss → Projects/Bin/Debug2.iss


+ 8 - 0
Projects/Bin/synch-isfiles.bat

@@ -0,0 +1,8 @@
+copy ..\..\Files\Default.isl
+copy ..\..\Files\ISPPBuiltins.iss
+copy ..\..\Files\is*.dll
+copy ..\..\Files\islzma*.exe
+copy ..\..\Files\ISetup.chm
+copy ..\..\Files\ISPP.chm
+
+pause

+ 1 - 0
Projects/Compil32.dproj

@@ -71,6 +71,7 @@
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
         <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+        <DCC_ExeOutput>Bin</DCC_ExeOutput>
         <Debugger_RunParams>Debug.iss</Debugger_RunParams>
     </PropertyGroup>
     <ItemGroup>

+ 1 - 0
Projects/Dcu/.gitignore

@@ -0,0 +1 @@
+*.dcu

+ 1 - 0
Projects/ISCC.dproj

@@ -70,6 +70,7 @@
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
         <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+        <DCC_ExeOutput>Bin</DCC_ExeOutput>
     </PropertyGroup>
     <ItemGroup>
         <DelphiCompile Include="$(MainSource)">

+ 2 - 1
Projects/ISCmplr.dproj

@@ -72,7 +72,8 @@
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
         <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-        <Debugger_HostApplication>Compil32.exe</Debugger_HostApplication>
+        <DCC_ExeOutput>Bin</DCC_ExeOutput>
+        <Debugger_HostApplication>Bin\Compil32.exe</Debugger_HostApplication>
         <Debugger_RunParams>Debug.iss</Debugger_RunParams>
     </PropertyGroup>
     <ItemGroup>

+ 1 - 0
Projects/ISPP/Dcu/.gitignore

@@ -0,0 +1 @@
+*.dcu

+ 3 - 3
Projects/ISPP/ISPP.dproj

@@ -69,10 +69,10 @@
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
         <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-        <DCC_ExeOutput>..</DCC_ExeOutput>
-        <Debugger_HostApplication>..\Compil32.exe</Debugger_HostApplication>
+        <DCC_ExeOutput>..\Bin</DCC_ExeOutput>
+        <Debugger_HostApplication>..\Bin\Compil32.exe</Debugger_HostApplication>
         <Debugger_RunParams>Debug.iss</Debugger_RunParams>
-        <Debugger_CWD>..</Debugger_CWD>
+        <Debugger_CWD>..\Bin</Debugger_CWD>
     </PropertyGroup>
     <ItemGroup>
         <DelphiCompile Include="$(MainSource)">

+ 1 - 0
Projects/Setup.dproj

@@ -69,6 +69,7 @@
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
         <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+        <DCC_ExeOutput>Bin</DCC_ExeOutput>
     </PropertyGroup>
     <ItemGroup>
         <DelphiCompile Include="$(MainSource)">

+ 1 - 0
Projects/SetupLdr.dproj

@@ -67,6 +67,7 @@
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
         <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+        <DCC_ExeOutput>Bin</DCC_ExeOutput>
     </PropertyGroup>
     <ItemGroup>
         <DelphiCompile Include="$(MainSource)">

+ 13 - 6
README.md

@@ -161,10 +161,17 @@ How do the projects link together?
 Source code tips
 ----------------
 
-- When debugging the Setup project you should set ``UseSetupLdr=no`` and
-  ``OutputBaseFilename=setup`` in your script, and copy the resulting setup-*.bin
-  files to the source code directory. This way you can simulate an actual
-  installation while running under the Delphi debugger.
+- When building the projects in Debug mode it outputs to Projects\Bin and when
+  debugging it will run from within this directory. To prepare this directory
+  with some extra files you must run **Projects\Bin\synch-isfiles.bat**.
+
+- When debugging the Setup project you should first build all projects in Debug
+  mode, then run the Compil32 project and compile the Debug.iss script which
+  should open automatically, and finally open and run the Setup project.
+  This way you can simulate an actual installation while running under the
+  Delphi debugger.
+  
+- When building the projects in Release mode it outputs to Files.
   
 - All of the forms in the Setup project, with the exception of Main.dfm, have
   Scaled set to False. This is because they dynamically scale themselves at
@@ -177,9 +184,9 @@ Source code tips
 
 - To debug the uninstaller first run Setup.exe to completion with the
   ``/DETACHEDMSG`` command line parameter set. Afterwards copy uninst000.dat and
-  uninst000.msg as setup.dat and setup.msg to the Projects directory in your
+  uninst000.msg as setup.dat and setup.msg to the Projects\Bin directory in your
   issrc path. Then open the Setup project and set the command line parameters to
-  ``/UNINSTMODE "/SECONDPHASE=<your issrc path\Projects\Setup.exe"`` and start
+  ``/UNINSTMODE "/SECONDPHASE=<your issrc path\Projects\Bin\Setup.exe"`` and start
   debugging. Note: each time setup.dat and setup.msg will be deleted if you
   allow the uninstaller to complete so make sure to keep copies.