Changeset 1722
- Timestamp:
- 05/02/07 10:39:40
(2 years ago)
- Author:
- dsugar
- Message:
better checks for existing stuff on disc before attempting to create it again. It could already
exist if the project is being recreated.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1694 |
r1722 |
|
| 104 | 104 | |
|---|
| 105 | 105 | IFile makeFile = buildDir.getFile(FrameworkNature.m_makeFile); |
|---|
| 106 | | |
|---|
| 107 | | String sPath = FrameworkNature.m_resourcesDir |
|---|
| 108 | | + IPath.SEPARATOR + FrameworkNature.m_buildDir |
|---|
| 109 | | + IPath.SEPARATOR + FrameworkNature.m_makeFile; |
|---|
| 110 | | URL basePathURL = SEFramework_Plugin.getDefault().getBundle().getEntry(sPath); |
|---|
| 111 | | |
|---|
| 112 | | InputStream streamMakefile = basePathURL.openStream(); |
|---|
| 113 | | makeFile.create(streamMakefile, true, null); |
|---|
| | 106 | if (!makeFile.exists()) |
|---|
| | 107 | { |
|---|
| | 108 | String sPath = FrameworkNature.m_resourcesDir |
|---|
| | 109 | + IPath.SEPARATOR + FrameworkNature.m_buildDir |
|---|
| | 110 | + IPath.SEPARATOR + FrameworkNature.m_makeFile; |
|---|
| | 111 | URL basePathURL = SEFramework_Plugin.getDefault().getBundle().getEntry(sPath); |
|---|
| | 112 | |
|---|
| | 113 | InputStream streamMakefile = basePathURL.openStream(); |
|---|
| | 114 | makeFile.create(streamMakefile, true, null); |
|---|
| | 115 | } |
|---|
| 114 | 116 | } |
|---|
| 115 | 117 | catch (Exception e) |
|---|
| … | … | |
| 126 | 128 | confDir.create(true, false, null); |
|---|
| 127 | 129 | |
|---|
| 128 | | IFile specFile = confDir.getFile(FrameworkNature.m_specFile); |
|---|
| 129 | | String sPath = FrameworkNature.m_resourcesDir |
|---|
| 130 | | + IPath.SEPARATOR + FrameworkNature.m_confDir |
|---|
| 131 | | + IPath.SEPARATOR + FrameworkNature.m_specFile; |
|---|
| 132 | | URL basePathURL = SEFramework_Plugin.getDefault().getBundle().getEntry (sPath); |
|---|
| 133 | | |
|---|
| 134 | | /*Create a blank file 'selinux_policy.spec'*/ |
|---|
| 135 | | InputStream streamSpecfile = basePathURL.openStream(); |
|---|
| 136 | | specFile.create(streamSpecfile, true, null); |
|---|
| | 130 | IFile specFile = confDir.getFile(FrameworkNature.m_specFile); |
|---|
| | 131 | if (!specFile.exists()) |
|---|
| | 132 | { |
|---|
| | 133 | String sPath = FrameworkNature.m_resourcesDir |
|---|
| | 134 | + IPath.SEPARATOR + FrameworkNature.m_confDir |
|---|
| | 135 | + IPath.SEPARATOR + FrameworkNature.m_specFile; |
|---|
| | 136 | URL basePathURL = SEFramework_Plugin.getDefault().getBundle().getEntry (sPath); |
|---|
| | 137 | |
|---|
| | 138 | /*Create a blank file 'selinux_policy.spec'*/ |
|---|
| | 139 | InputStream streamSpecfile = basePathURL.openStream(); |
|---|
| | 140 | specFile.create(streamSpecfile, true, null); |
|---|
| | 141 | } |
|---|
| 137 | 142 | } |
|---|
| 138 | 143 | catch (Exception e) |
|---|
| r1694 |
r1722 |
|
| 155 | 155 | try |
|---|
| 156 | 156 | { |
|---|
| 157 | | String sPath = FrameworkNature.m_resourcesDir + IPath.SEPARATOR + FrameworkNature.m_supportMacroFile; |
|---|
| 158 | | URL basePathURL = SEFramework_Plugin.getDefault().getBundle().getEntry(sPath); |
|---|
| 159 | 157 | |
|---|
| 160 | 158 | // IContainer policyDir = nat.getSupportMacroIFolder(frameDir); //TODO: future!! added in 1.1.11 of SLIDE |
|---|
| 161 | 159 | IFile supportFile = systemDir.getFile("policy/support/" + FrameworkNature.m_supportMacroFile); //$NON-NLS-1$ |
|---|
| 162 | | |
|---|
| 163 | | InputStream supportFileStream = basePathURL.openStream(); |
|---|
| 164 | | supportFile.create(supportFileStream, true, null); |
|---|
| 165 | | |
|---|
| | 160 | |
|---|
| | 161 | if (!supportFile.exists()) |
|---|
| | 162 | { |
|---|
| | 163 | String sPath = FrameworkNature.m_resourcesDir + IPath.SEPARATOR + FrameworkNature.m_supportMacroFile; |
|---|
| | 164 | URL basePathURL = SEFramework_Plugin.getDefault().getBundle().getEntry(sPath); |
|---|
| | 165 | InputStream supportFileStream = basePathURL.openStream(); |
|---|
| | 166 | supportFile.create(supportFileStream, true, null); |
|---|
| | 167 | } |
|---|
| | 168 | |
|---|
| 166 | 169 | File buildConfFile = nat.GetBuildConfPath (frameDir); |
|---|
| 167 | 170 | if (buildConfFile.exists()) |
|---|
Download in other formats:
* Generating other formats may take time.