View Issue Details

IDProjectCategoryView StatusLast Update
0006209JEDI VCL02 Installationpublic2015-09-14 13:20
ReporterAriochAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.48 
Summary0006209: Package Generator (and JVCL Installer) treats win64 as win32
Descriptionhttp://newsportal.delphi-jedi.org/article.php?id=1210&group=jedi.jvcl

win64-incompatible unit is included into targets like XE2/Win64
TagsNo tags attached.

Relationships

child of 0006160 confirmed JvNTEventLog shows wrong properties 

Activities

2013-10-08 16:45

 

0001-Win64-platform-needs-Win64-conditional-not-win32.patch (4,442 bytes)
From 489d10768985e7715cd22e6ecf68062c0a2f0222 Mon Sep 17 00:00:00 2001
From: the-Arioch <the_Arioch@nm.ru>
Date: Tue, 8 Oct 2013 18:37:25 +0400
Subject: [PATCH] * Win64 platform needs Win64 conditional, not win32 *
 all_win32 targetted files are incompatible with Win64 and should not be
 included in Win64 packages

---
 .../devtools/PackagesGenerator/GenerateTargets.pas | 24 ++++++++++++++++++----
 .../PackagesGenerator/PackageGenerator.pas         |  2 +-
 jvcl/packages/d16_x64/JvSystem.dpk                 |  3 +--
 3 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/jvcl/devtools/PackagesGenerator/GenerateTargets.pas b/jvcl/devtools/PackagesGenerator/GenerateTargets.pas
index 0fda159..36f4517 100644
--- a/jvcl/devtools/PackagesGenerator/GenerateTargets.pas
+++ b/jvcl/devtools/PackagesGenerator/GenerateTargets.pas
@@ -60,6 +60,7 @@ implementation
 
 uses
   SysUtils,
+  StrUtils,
   {$IFNDEF COMPILER12_UP}
   JvJCLUtils,
   {$ENDIF ~COMPILER12_UP}
@@ -73,7 +74,7 @@ type
   end;
 
 const
-  TargetDefines: array [0..7] of TTargetDefine =
+  TargetDefines: array [0..12] of TTargetDefine =
                 (
                   (TargetName: 'c6'; Define: 'VER140'),
                   (TargetName: 'd6'; Define: 'VER140'),
@@ -82,7 +83,12 @@ const
                   (TargetName: 'd10'; Define: 'VER180'),
                   (TargetName: 'd11'; Define: 'VER180,VER185'),
                   (TargetName: 'd12'; Define: 'VER200'),
-                  (TargetName: 'd14'; Define: 'VER210')
+                  (TargetName: 'd14'; Define: 'VER210'),
+                  (TargetName: 'd15'; Define: 'VER220'),
+                  (TargetName: 'd16'; Define: 'VER230'),
+                  (TargetName: 'd17'; Define: 'VER240'),
+                  (TargetName: 'd18'; Define: 'VER250'),
+                  (TargetName: 'd19'; Define: 'VER260')
                 );
 
 { TTarget }
@@ -91,6 +97,7 @@ constructor TTarget.Create(Node: TJclSimpleXmlElem);
 var
   I: Integer;
   Tmp: TStringList;
+  DelphiName: string;
 begin
   inherited Create;
   FName := AnsiLowerCase(Node.Properties.ItemNamed['name'].Value);
@@ -125,11 +132,20 @@ begin
   if Assigned(Node.Properties.ItemNamed['IsDotNet']) then
     FIsDotNet := Node.Properties.ItemNamed['IsDotNet'].BoolValue;
 
-  FDefines.Add('WIN32');
+  DelphiName := FName;
+  if EndsText('_x64', FName) then begin
+     FDefines.Add('WIN64');
+     SetLength(DelphiName, Length(DelphiName) - Length('_x64') );
+  end else begin
+     FDefines.Add('WIN32');
+  end;
+// Potential gotcha if new platforms would ever be added
+// Like with Delphi/LLVM or Lazarus
+
   FDefines.Add('CONDITIONALEXPRESSIONS');
 
   for I := Low(TargetDefines) to High(TargetDefines) do
-    if SameText(TargetDefines[I].TargetName, Name) then
+    if SameText(TargetDefines[I].TargetName, DelphiName) then
     begin
       Tmp := TStringList.Create;
       try
diff --git a/jvcl/devtools/PackagesGenerator/PackageGenerator.pas b/jvcl/devtools/PackagesGenerator/PackageGenerator.pas
index ac3595c..229527f 100644
--- a/jvcl/devtools/PackagesGenerator/PackageGenerator.pas
+++ b/jvcl/devtools/PackagesGenerator/PackageGenerator.pas
@@ -1112,7 +1112,7 @@ begin
         outFile.SaveToFile(OutFileName)
       else
       begin
-        CopyFile(PChar(templateName), PChar(OutFileName), False);
+        Win32Check( CopyFile(PChar(templateName), PChar(OutFileName), False) );
         FileSetDate(OutFileName, DateTimeToFileDate(Now)); // adjust file time
       end;
     end
diff --git a/jvcl/packages/d16_x64/JvSystem.dpk b/jvcl/packages/d16_x64/JvSystem.dpk
index 7cdb013..5f5b23e 100644
--- a/jvcl/packages/d16_x64/JvSystem.dpk
+++ b/jvcl/packages/d16_x64/JvSystem.dpk
@@ -4,7 +4,7 @@ package JvSystem;
      DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
             ALWAYS EDIT THE RELATED XML FILE (JvSystem-R.xml)
 
-     Last generated: 13-06-2012  13:45:58 UTC
+     Last generated: 08-10-2013  14:34:19 UTC
 -----------------------------------------------------------------------------
 }
 
@@ -69,7 +69,6 @@ contains
   JvJoystick in '..\..\run\JvJoystick.pas' ,
   JvMRUList in '..\..\run\JvMRUList.pas' ,
   JvMRUManager in '..\..\run\JvMRUManager.pas' ,
-  JvNTEventLog in '..\..\run\JvNTEventLog.pas' ,
   JvPerfMon95 in '..\..\run\JvPerfMon95.pas' ,
   JvRas32 in '..\..\run\JvRas32.pas' ,
   JvScreenResolution in '..\..\run\JvScreenResolution.pas' ,
-- 
1.8.3.msysgit.0

obones

2013-12-16 11:09

administrator   ~0020847

Using the current GIT content, JvNTEventLog is not included in JvSystem.dpk if its target is set to "all_win32".

Arioch

2014-01-10 12:07

developer   ~0020895

yes, you wrote in http://newsportal.delphi-jedi.org/article.php?id=1223&group=jedi.jvcl

then clsoe

Issue History

Date Modified Username Field Change
2013-10-08 16:45 Arioch New Issue
2013-10-08 16:45 Arioch File Added: 0001-Win64-platform-needs-Win64-conditional-not-win32.patch
2013-10-08 16:45 Arioch Relationship added child of 0006160
2013-12-13 11:07 obones Status new => acknowledged
2013-12-16 11:09 obones Note Added: 0020847
2013-12-16 11:09 obones Status acknowledged => feedback
2014-01-10 12:07 Arioch Note Added: 0020895
2014-01-29 09:57 obones Status feedback => resolved
2014-01-29 09:57 obones Fixed in Version => Daily / GIT
2014-01-29 09:57 obones Resolution open => fixed
2014-01-29 09:57 obones Assigned To => obones
2015-09-14 13:20 obones Fixed in Version Daily / GIT => 3.48