Commits

Anonymous committed 8796dfc

Set platform to x86 to allow single build to run x86 and x64

  • Participants
  • Parent commits d07caee

Comments (0)

Files changed (9)

File trunk/SODDI_Setup/SODDI_Setup.vdproj

         "DisplayName" = "8:Debug"
         "IsDebugOnly" = "11:TRUE"
         "IsReleaseOnly" = "11:FALSE"
-        "OutputFilename" = "8:SODDIv.10.msi"
+        "OutputFilename" = "8:debug\\soddi.11.msi"
         "PackageFilesAs" = "3:2"
         "PackageFileSize" = "3:-2147483648"
         "CabType" = "3:1"
             "PrerequisitesLocation" = "2:1"
             "Url" = "8:"
             "ComponentsUrl" = "8:"
+                "Items"
+                {
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.3.5.SP1"
+                    {
+                    "Name" = "8:.NET Framework 3.5 SP1"
+                    "ProductCode" = "8:Microsoft.Net.Framework.3.5.SP1"
+                    }
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
+                    {
+                    "Name" = "8:Windows Installer 3.1"
+                    "ProductCode" = "8:Microsoft.Windows.Installer.3.1"
+                    }
+                }
             }
         }
         "Release"
         "DisplayName" = "8:Release"
         "IsDebugOnly" = "11:FALSE"
         "IsReleaseOnly" = "11:TRUE"
-        "OutputFilename" = "8:soddi.10.msi"
+        "OutputFilename" = "8:release\\soddi.11.msi"
         "PackageFilesAs" = "3:2"
         "PackageFileSize" = "3:-2147483648"
         "CabType" = "3:1"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E128584B507D40A69BA89300B7920E85"
             {
-            "SourcePath" = "8:..\\soddi\\obj\\Release\\SODDI.exe"
+            "SourcePath" = "8:..\\soddi\\obj\\x86\\Release\\SODDI.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ED917B8630934D53AECC1BE99182E7CF"

File trunk/soddi.sln

 # Visual Studio 2008
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "soddi", "soddi\soddi.csproj", "{94451A1F-9DBA-438C-956F-CD1C072310B2}"
 EndProject
-Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "SODDI_Setup", "SODDI_Setup\SODDI_Setup.vdproj", "{85B8525F-8C2A-49BD-9902-06A881B2F829}"
+Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "SODDI_Setup", "SODDI_Setup\SODDI_Setup.vdproj", "{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}"
 EndProject
 Global
 	GlobalSection(MercurialSourceControlSolutionProperties) = preSolution
 		{94451A1F-9DBA-438C-956F-CD1C072310B2}.Release|Any CPU.Build.0 = Release|Any CPU
 		{94451A1F-9DBA-438C-956F-CD1C072310B2}.Release|x86.ActiveCfg = Release|x86
 		{94451A1F-9DBA-438C-956F-CD1C072310B2}.Release|x86.Build.0 = Release|x86
-		{85B8525F-8C2A-49BD-9902-06A881B2F829}.Debug|Any CPU.ActiveCfg = Debug
-		{85B8525F-8C2A-49BD-9902-06A881B2F829}.Debug|x86.ActiveCfg = Debug
-		{85B8525F-8C2A-49BD-9902-06A881B2F829}.Debug|x86.Build.0 = Debug
-		{85B8525F-8C2A-49BD-9902-06A881B2F829}.Release|Any CPU.ActiveCfg = Release
-		{85B8525F-8C2A-49BD-9902-06A881B2F829}.Release|x86.ActiveCfg = Release
-		{85B8525F-8C2A-49BD-9902-06A881B2F829}.Release|x86.Build.0 = Release
+		{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}.Debug|Any CPU.ActiveCfg = Debug
+		{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}.Debug|Any CPU.Build.0 = Debug
+		{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}.Debug|x86.ActiveCfg = Debug
+		{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}.Debug|x86.Build.0 = Debug
+		{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}.Release|Any CPU.ActiveCfg = Release
+		{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}.Release|Any CPU.Build.0 = Release
+		{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}.Release|x86.ActiveCfg = Release
+		{CB758D8A-3B3D-4CC4-AF05-005F60AD6DCC}.Release|x86.Build.0 = Release
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

File trunk/soddi/Configuration/DbProviders.cs

 //  *
 //  * Date: April 01 2010 
 //  */
+// 04/09/2010 - added a catch to prevent crash if provider not found
+
 
 #region
 
             foreach (DataRow prov in DbProviderFactories.GetFactoryClasses().Rows)
             {
                 string invariant = (string) prov["InvariantName"];
-                Type type =
-                    insertTypes.Find(
-                        t =>
-                        ((LoaderAttribute) t.GetCustomAttributes(typeof (LoaderAttribute), true)[0]).
-                            ProviderInvariantName == invariant);
-                if (type != null)
+                try
                 {
-                    Add(new DbProviderInfo(prov) {BulkInsertType = type});
+                    Type type =
+                insertTypes.Find(
+                    t =>
+                    ((LoaderAttribute)t.GetCustomAttributes(typeof(LoaderAttribute), true)[0]).
+                        ProviderInvariantName == invariant);
+                    if (type != null)
+                    {
+                        Add(new DbProviderInfo(prov) { BulkInsertType = type });
+                    }
+                }
+                catch (Exception ex)
+                {
+
+                    Console.WriteLine("Error adding provider {0}:\r\n{1}",invariant,ex.Message);
                 }
             }
         }

File trunk/soddi/Gui/ListViewStyle.cs

     /// Adapted from http://www.codeproject.com/KB/list/listviewxp.aspx
     public static class ListViewStyle
     {
+#if !MONO
+
         #region LVM enum
 
         public enum LVM
             styles |= exStyle;
             SendMessage(lv.Handle, (int) LVM.LVMSetextendedlistviewstyle, 0, (int) styles);
         }
+#endif
     }
+
 }

File trunk/soddi/Gui/frmUI.cs

 
         private void FormLoad(object sender, EventArgs e)
         {
+#if !MONO
             TasksListView.SetExStyles();
+#endif
             SourceTextChanged(null, EventArgs.Empty);
             sourceTextBox.Focus();
         }
                 listView1.CheckedItems.Cast<ListViewItem>().Select(i => i.Tag).Cast<ImportTarget>().ToList();
             Configuration.Configuration tconfig = new Configuration.Configuration
                 {
-                    Provider = (DbProviderInfo) dbProvidersComboBox.SelectedItem,
+                    Provider = (DbProviderInfo)dbProvidersComboBox.SelectedItem,
                     Source = sourceTextBox.Text,
                     Targets = _importTargets,
                     //Targets =  TargetListBox.CheckedItems.Cast<ImportTarget>().ToList(),
-                    BatchSize = (int) BatchSizeNumericUpDown.Value,
+                    BatchSize = (int)BatchSizeNumericUpDown.Value,
                     Split = splitCheckBox.Checked,
                     Indices = indicesCheckBox.Checked,
                     FullText = fullTextCheckBox.Checked
                     StatusLabel.Text =
                         string.Format((_abort ? Resources.Rs_ImpAbort : Resources.Rs_ImpComplete) + "\r\n",
                                       count.ToString("#,##0"),
-                                      _timer.ElapsedMilliseconds/1000f/60f);
+                                      _timer.ElapsedMilliseconds / 1000f / 60f);
                 });
 
 
             {
                 foreach (ImportTarget target in targets)
                 {
-                    listView1.Items.Add(new ListViewItem(new[] {target.Name, target.Schema})
+                    listView1.Items.Add(new ListViewItem(new[] { target.Name, target.Schema })
                         {
                             Tag = target,
                             Checked = selected.Find(t => string.Compare(t.Path, target.Path, true) == 0) != null
 
         private void listView1_AfterLabelEdit(object sender, LabelEditEventArgs e)
         {
-            ImportTarget target = (ImportTarget) listView1.Items[e.Item].Tag;
+            ImportTarget target = (ImportTarget)listView1.Items[e.Item].Tag;
             target.Schema = e.Label;
         }
 
 
             try
             {
-                DbProviderInfo info = (DbProviderInfo) dbProvidersComboBox.SelectedItem;
+                DbProviderInfo info = (DbProviderInfo)dbProvidersComboBox.SelectedItem;
                 DbConnectionStringBuilder csb = info.Factory.CreateConnectionStringBuilder();
                 csb.ConnectionString = targetTextBox.Text;
                 targetTextBox.Text = csb.ConnectionString;
         private void BrowseSourceButton_Click(object sender, EventArgs e)
         {
             var bfd = new FolderBrowserDialog();
-            if(bfd.ShowDialog()== DialogResult.OK)
+            if (bfd.ShowDialog() == DialogResult.OK)
             {
                 sourceTextBox.Text = bfd.SelectedPath;
             }

File trunk/soddi/Properties/AssemblyInfo.cs

 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 
-[assembly: AssemblyVersion("0.1.0.0")]
-[assembly: AssemblyFileVersion("0.1.0.0")]
+[assembly: AssemblyVersion("0.1.1.0")]
+[assembly: AssemblyFileVersion("0.1.1.0")]

File trunk/soddi/README.txt

 
-StackOverflow Data Dump Import v.10
+StackOverflow Data Dump Import v.11
 
   ClickOnce Installer: http://skysanders.net/tools/se/soddi/publish.htm
 
   licensed under MIT/GPL - see license.txt
   
   info:http://skysanders.net/tools/se
-  msi :http://skysanders.net/files/soddi.10.msi
-  bin :http://skysanders.net/files/soddi.10.zip
+  msi :http://skysanders.net/files/soddi.11.msi
+  bin :http://skysanders.net/files/soddi.11.zip
   src :http://bitbucket.org/bitpusher/soddi/
 
 
 http://blog.stackoverflow.com/category/cc-wiki-dump/
 
 04/01/2010 - Sky Sanders <sky.sanders@gmail.com>
+
+04/09/2010 - Explicitly set platform to x86 to allow same binaries to run on x64.

File trunk/soddi/ReadMe.htm

 <pre>
 
 
-<strong>StackOverflow Data Dump Import v.10</strong>
+<strong>StackOverflow Data Dump Import v.11</strong>
 
   ClickOnce Installer: <a href="http://skysanders.net/tools/se/soddi/publish.htm">http://skysanders.net/tools/se/soddi/publish.htm</a>
 
   (c) 2010 Sky Sanders
   licensed under MIT/GPL - see license.txt
   
-  msi :<a href="http://skysanders.net/files/soddi.10.msi">http://skysanders.net/files/soddi.10.msi</a>
+  msi :<a href="http://skysanders.net/files/soddi.10.msi">http://skysanders.net/files/soddi.11.msi</a>
   info:<a href="http://skysanders.net/tools/se">http://skysanders.net/tools/se</a>
-  bin :<a href="http://skysanders.net/files/soddi.10.zip">http://skysanders.net/files/soddi.10.zip</a>
+  bin :<a href="http://skysanders.net/files/soddi.10.zip">http://skysanders.net/files/soddi.11.zip</a>
   src :<a href="http://bitbucket.org/bitpusher/soddi/">http://bitbucket.org/bitpusher/soddi/</a>
 
 
 
 04/01/2010 - Sky Sanders
 
+04/09/2010 - Explicitly set platform to x86 to allow same binaries to run on x64.
 </pre>
 </body>
 </html>

File trunk/soddi/soddi.csproj

     <SuiteName>StackExchange Tools</SuiteName>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>4</ApplicationRevision>
-    <ApplicationVersion>0.1.0.%2a</ApplicationVersion>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>0.1.1.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
     <PublishWizardCompleted>true</PublishWizardCompleted>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
+    <DefineConstants>TRACE;MONO</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>