Jump to content

Regarding import-tmpl folder & reading


lekkereten

Recommended Posts


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

It is clear that all these messages are annoying:

[Error]: File not found: conf/import/packet_conf.txt
[Error]: Configuration file (conf/import/inter_conf.txt) not found.
[Error]: Configuration file (conf/import/login_conf.txt) not found.

So I thought in two ways to avoid it:

- Doesn't display the import files reading if they're missing (which they are by default ->import-tmpl);

- Rename import-tmpl to import and let the emulator read it even if the files have no content.

Please discuss if you feel like so.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

I would like to let it like it is now, since ppl need to manually rename them in order to get them working thus knowing what they do and how they work, making it silent will just make them useless if the user doesn't know what they do also keeping them as template will not override user changes when they do svn update

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

You have a strong point. But let this roll and see what people think about.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

The Linux build process (both make and CMake) already create the /import/ folder from the template folder.

It's just the Windows build process that we need to fix.

Can Visual Studio be told to copy files/folders in the compile process?

If not, then maybe a batch file to do this?

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

Could do something like this:

Index: map-server_sql.vcxproj
===================================================================
--- map-server_sql.vcxproj	(revision 16962)
+++ map-server_sql.vcxproj	(working copy)
@@ -271,4 +271,15 @@
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
+  <Target Name="AfterBuild">
+    <Copy SourceFiles="..\conf\import-tmpl\battle_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />
+    <Copy SourceFiles="..\conf\import-tmpl\char_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />
+    <Copy SourceFiles="..\conf\import-tmpl\inter_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />
+    <Copy SourceFiles="..\conf\import-tmpl\log_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />	
+    <Copy SourceFiles="..\conf\import-tmpl\login_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />
+    <Copy SourceFiles="..\conf\import-tmpl\map_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />
+    <Copy SourceFiles="..\conf\import-tmpl\msg_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />
+    <Copy SourceFiles="..\conf\import-tmpl\packet_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />
+    <Copy SourceFiles="..\conf\import-tmpl\script_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" />
+  </Target>
</Project>
\ No newline at end of file

  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  213
  • Reputation:   109
  • Joined:  05/21/12
  • Last Seen:  

Agreed with Brian.

Not a bad idea, mkbu95.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

Yeah, I think it would be better to alter the VS project files rather than the code.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Added by mkbu95 in r16971 and r16975.

Link to comment
Share on other sites

×
×
  • Create New...